REALTIME WEBSOCKET
Authenticate the device
The production WebSocket lifecycle keeps desired commands, applied state and telemetry explicit.
First message
Within 15 seconds of connecting, send the one-time/rotated secret from local configuration.
{"type":"auth","device_secret":"YOUR_DEVICE_SECRET"}Wait for {"event":"authenticated"} before publishing presence, state or telemetry.