REALTIME WEBSOCKET
State and telemetry
The production WebSocket lifecycle keeps desired commands, applied state and telemetry explicit.
Separate message types
{"type":"state","state":{"power":true,"brightness":50}}
{"type":"telemetry","telemetry":{"temperature":28.4,"humidity":56.2}}
{"type":"presence","online":true}Every key is validated against the device’s canonical capabilities.