-
After two days of research, I am not able to code a python program to update a value of my signalk. Someone can help me? Thank
**> cd_ /home/pi ; /usr/bin/env /bin/python /home/pi/.vscode/extensions/ms-python.debugpy-2025.10.0-linux-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher 35883 -- /home/pi/import\ websocket.py Connexion fermée ###__**
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I don't really know any Python, but there seem to be several WebSocket implementations for it. If I
Context defaults to self and the server will fill in $source and timestamp. |
Beta Was this translation helpful? Give feedback.
-
Thank a lot but nothing appear, but i think i need an authentification
Le ven. 22 août 2025, 21:09, Teppo Kurki ***@***.***> a
écrit :
… I don't really know any Python, but there seem to be several WebSocket
implementations for it. If I pip install websockets this works on my
machine
import json
from websockets.sync.client import connect
delta_message = {
"updates": [
{
"values": [
{
"path": "navigation.speedOverGround",
"value": 3.5
}
]
}
]
}
def sendOnce():
with connect("ws://localhost:3001/signalk/v1/stream?subscribe=none") as websocket:
websocket.send(json.dumps(delta_message))
sendOnce()
Context defaults to self and the server will fill in $source and timestamp.
—
Reply to this email directly, view it on GitHub
<#196 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANP45XANMTCCNS4OWAS7DP33O5TIJAVCNFSM6AAAAACER2GLMWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMJZGI3TONI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
I don't really know any Python, but there seem to be several WebSocket implementations for it. If I
pip install websockets
this works on my machineContext defaults to self and the server will fill in $source and timestamp.