REALTIME WEBSOCKET

Commands and ACK

The production WebSocket lifecycle keeps desired commands, applied state and telemetry explicit.

Apply, then acknowledge

API commandevent=commandApply outputApplied-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.