REALTIME WEBSOCKET
Commands and ACK
The production WebSocket lifecycle keeps desired commands, applied state and telemetry explicit.
Apply, then acknowledge
API command→event=command→Apply output→Applied-state ACK
// server → device
{"event":"command","command_id":"uuid","state":{"power":true}}
// device → server
{"type":"state","state":{"power":true}}The matching report marks the command acknowledged and updates the owner WebSocket.