Modifications

Sauter à la navigation Sauter à la recherche
16 octets ajoutés ,  3 septembre 2017 à 21:10
Ligne 73 : Ligne 73 :     
== WebSocket ==
 
== WebSocket ==
 +
{{traduction}}
 +
 
Register your client at ws://your.unipi.ip.address/ws to receive status messages. Once it is connected, you can also send various commands to the UniPi All messages in websocket are sent in JSON string format, eg. {"dev":"relay", "circuit":"1", "value":"1"} to set Relay 1 On. Check the wsbase.js in www/js/ folder to see example of controlling the UniPi using websocket.
 
Register your client at ws://your.unipi.ip.address/ws to receive status messages. Once it is connected, you can also send various commands to the UniPi All messages in websocket are sent in JSON string format, eg. {"dev":"relay", "circuit":"1", "value":"1"} to set Relay 1 On. Check the wsbase.js in www/js/ folder to see example of controlling the UniPi using websocket.
  
29 917

modifications

Menu de navigation