2018-02-21, 03:37 PM
Hello,
I have been struggling for few days to understand how everything works.
Good news is, I know a little bit how it is supposed to work now. Bad news is, I am stuck with some piece of code and I do not understand why. I hope you can help me on this.
This idea was simply to set "navigation.speedOverGround" with a short Python code and to check the result in localhost:3000/@signalk/instrumentpanel/
I used partly the code given here: https://github.com/olewsaa/Yacht-compute...lK-test.py
And the rest from SK-simulator.py
With the SK-simulator, the instrument panel is updated, with my code, nothing happens...
Any idea why??
Thanks a lot.
Lucas
I have been struggling for few days to understand how everything works.
Good news is, I know a little bit how it is supposed to work now. Bad news is, I am stuck with some piece of code and I do not understand why. I hope you can help me on this.
This idea was simply to set "navigation.speedOverGround" with a short Python code and to check the result in localhost:3000/@signalk/instrumentpanel/
I used partly the code given here: https://github.com/olewsaa/Yacht-compute...lK-test.py
And the rest from SK-simulator.py
With the SK-simulator, the instrument panel is updated, with my code, nothing happens...
Any idea why??
Thanks a lot.
Lucas
Code:
#!/usr/bin/env python
import time, socket
# Initiate socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# socket.AF_INET is Internet
# socket.SOCK_DGRAM) is UDP
while True:
SignalK='{"updates": [{"$source": "OPsimulation","values":[ {"path":"navigation.speedOverGround","value":"1"+}]}]}'
print(SignalK)
sock.sendto(SignalK, ('127.0.0.1', 55557))