Protocol - bharat-1809/wizctl GitHub Wiki
Protocol
WiZ lights communicate over UDP port 38899 using JSON messages.
Timeout behavior
Protocol requests use per-attempt timeout (3s default). Each retry gets its own full timeout window.
Discovery uses a total timeout (10s default). All broadcast packets are sent within this window and responses are collected continuously.
Default retry config
| Retries | Initial | Max | Strategy | |
|---|---|---|---|---|
| Protocol | 5 | 750ms | 3s | exponential |
| Discovery | 5 | 500ms | 3s | exponential |
Message format
// Request state
{"method":"getPilot","params":{}}
// Response
{"method":"getPilot","result":{"state":true,"dimming":75,"sceneId":6,"mac":"abc123"}}
// Set color
{"method":"setPilot","params":{"r":255,"g":100,"b":50,"dimming":80}}