Standardize API UART parity and update docs

This commit is contained in:
2026-06-04 14:10:13 -06:00
parent 6884bc7b32
commit f46e72fc7f
7 changed files with 576 additions and 6 deletions
+27
View File
@@ -205,3 +205,30 @@ Runtime behavior:
If STA disconnects, the ESP32 retries saved networks by priority every 30 seconds.
AP mode remains available as a recovery path.
---
# UART Parity Notes
UART should use the same generic command model as HTTP.
## Preferred Relay Command
Preferred:
{"type":"set_relay","id":"relay_1","state":true}
Legacy accepted shape:
{"type":"set_relay","relay":"relay_1","enabled":true}
Preferred response:
{"type":"relay_response","ok":true,"id":"relay_1","state":true}
## WiFi Priority Config
{"type":"config_wifi","networks":[{"ssid":"Starlink","password":"password","priority":1},{"ssid":"Home WiFi","password":"password","priority":2}]}
Lower priority numbers are tried first.