-
Notifications
You must be signed in to change notification settings - Fork 69
HOWTO: Sensors
The easiest way to send sensor data to a SK server that does not require authentication is to send it as delta messages over broadcast or unicast UDP. A Single delta message should fit into the single UDP package. You will need to configure the UDP input connection to the Node server.
The easiest way to send sensor to a SK that has either SSL enabled or requires authentication or both is via WebSockets. The sensors should connect to the server with subscribe=none with the proper authentication data and send deltas.
Source data, context and timestamps are optional - Node server will fill in them for you, but you can use a dot limited string as $source
to identify the sensor. Node server accepts input over ws by default.
A sensor can bootstrap its connectivity by
- using DNS-SD to discover the server
- sending an access request that the server's admin can approve to grant access
Do not connect to the Node server with active or default subscriptions and never read what the server sends you. This will cause outgoing buffer overflow on the server and it will kill your connection.
Node server is largely schema agnostic - it doesn't much care about what the actual paths you are using are. If you want to have SK clients to show more than just path and values you can add metadata on the server. On Node server this happens by editing the defaults.json
file that is read by the server upon startup.
There is currently no way that a sensor can provide metadata but there is some work started in that direction..