Files
overland-controller/docs/PARITY_MATRIX.md
T

112 lines
3.2 KiB
Markdown

# Command Parity Matrix
This document tracks the intended command model across the three control
surfaces. HTTP and USB serial are active. UART JSON is a compile-time optional
service interface and is disabled in the current Cargo build.
Control surfaces:
- USB serial console
- UART JSON protocol
- HTTP API
## Current Parity
| Feature | USB Serial | UART JSON | HTTP API | Notes |
|---|---:|---:|---:|---|
| Health | No | No | Yes | `/api/v1/health` is lightweight HTTP liveness |
| Capabilities | No | No | Yes | `/api/v1/capabilities` supports client discovery |
| Status | Yes | Yes | Yes | `/api/v1/status` equals `status_request` |
| Config view | Yes | Yes | Yes | `/api/v1/config` equals `config_request` |
| Config export | No | No | Yes | `/api/v1/config/export` includes WiFi passwords |
| Config import | No | No | Yes | `/api/v1/config/import` persists restored config |
| Relay control | Yes | Yes | Yes | Preferred HTTP endpoint is `POST /api/v1/relay/set` |
| Device name config | Yes | Yes | Yes | `devicename`, `config_device`, `/api/v1/config/device` |
| Relay config | Yes | Yes | Yes | `relayname`, `config_relay`, `/api/v1/config/relay` |
| Temperature config | Yes | Yes | Yes | `tempname`, `config_temp`, `/api/v1/config/temp` |
| BMS config | Yes | Yes | Yes | `bmsname`/`bmsaddr`, `config_bms`, `/api/v1/config/bms` |
| Save config | Yes | Yes | Yes | `save`, `save_config`, `/api/v1/config/save` |
| Factory reset | Yes | Yes | Yes | AP remains recovery path |
| BMS setup enter | Yes | Yes | Yes | Setup pauses normal BMS reconnect behavior |
| BMS setup exit | Yes | Yes | Yes | Returns to normal mode |
| BLE scan | Yes | Yes | Yes | Some BMS devices require repeated scans |
| Select BMS | Yes | Yes | Yes | Uses most recent scan result index |
| WiFi config | Yes | Yes | Yes | Supports multiple saved STA networks |
| WiFi priority | Yes | Yes | Yes | Lower priority number is tried first |
| WiFi connect | Yes | Yes | Yes | AP remains available |
| WiFi clear | Yes | Yes | Yes | Clears saved STA networks |
## Preferred Command Model
Use generic IDs everywhere.
Relays:
relay_1
relay_2
relay_3
relay_4
relay_5
relay_6
Temperature sensors:
temp_1 through temp_4
Preferred relay command shape:
{
"type": "set_relay",
"id": "relay_1",
"state": true
}
Legacy UART relay fields may still be accepted:
relay
enabled
Preferred HTTP relay endpoint:
POST /api/v1/relay/set
Only the versioned HTTP API is registered; root relay routes are not supported.
## Response Shape Standard
Success responses should include:
ok: true
Error responses should include:
ok: false
error: "error_code"
Status/config responses should preserve the generic data model used by `/status`.
---
# Project Status
API/USB serial parity status:
ACTIVE
Covered:
Status
Configuration
Relays
WiFi
BMS
Temperature Sensors
Save Config
Factory Reset
Future additions must be implemented on HTTP and USB serial. Implement them on
UART JSON only when that optional interface is enabled for a supported service
workflow.
- Temperature sensor config/status parity now includes the `weather` boolean flag for outside-air display selection.