This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SignalK paths
#3
A very simple test to illustrate how simple it CAN (not right) be done :

 import time, socket


# Initiate socket 
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# socket.AF_INET is  Internet
# socket.SOCK_DGRAM) is  UDP



print("Trying to send values to SignalK")

while True:
    t=input("Please enter a number: ")
    x = float(t)

    SignalK='{"updates": [{"$source": "OrangePi","values":[ {"path":"OrangePi.signalK.manual","value":'+format(x,'5.3f')+'}]}]}'
    print(SignalK)

    sock.sendto(SignalK, ('192.168.1.160', 55557))
Reply


Messages In This Thread
SignalK paths - by skipper@sy-barranas - 2019-01-23, 11:52 PM
RE: SignalK paths - by ddelorme - 2019-01-25, 02:07 PM
RE: SignalK paths - by olewsaa - 2019-01-31, 01:06 PM
RE: SignalK paths - by ddelorme - 2019-01-31, 05:10 PM
RE: SignalK paths - by olewsaa - 2019-01-31, 08:56 PM
SignalK paths - by tkurki - 2019-02-01, 06:43 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)