docs: align active hardware and API guidance
This commit is contained in:
1 parent
ab5424d82e
commit
6b39e7e438
24 files changed
+219
-261
No files matched your search
@@ -8,9 +8,10 @@ Current target vehicle:
|
|||||||
|
|
||||||
The firmware itself is intended to stay vehicle-agnostic.
|
The firmware itself is intended to stay vehicle-agnostic.
|
||||||
|
|
||||||
## Current Version
|
## Current Build
|
||||||
|
|
||||||
0.5.0
|
The controller reports its build version through `GET /api/v1/health` and
|
||||||
|
`GET /api/v1/status`. Treat that runtime value as authoritative.
|
||||||
|
|
||||||
## What It Does
|
## What It Does
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ The ESP32 controller currently provides:
|
|||||||
|
|
||||||
- Local WebUI
|
- Local WebUI
|
||||||
- HTTP API
|
- HTTP API
|
||||||
- UART JSON protocol
|
- Optional UART JSON diagnostics protocol
|
||||||
- USB serial maintenance commands
|
- USB serial maintenance commands
|
||||||
- Relay control
|
- Relay control
|
||||||
- JBD/Xiaoxiang BLE BMS telemetry
|
- JBD/Xiaoxiang BLE BMS telemetry
|
||||||
@@ -32,11 +33,14 @@ The ESP32 controller currently provides:
|
|||||||
|
|
||||||
Current controller:
|
Current controller:
|
||||||
|
|
||||||
- ESP32 2-relay board
|
- LILYGO T-Relay-S3 6-relay board
|
||||||
|
- Six low-current relay/control outputs driven through the onboard 74HC595
|
||||||
|
- DS18B20 OneWire bus on GPIO 15
|
||||||
|
|
||||||
Primary dashboard target:
|
Primary dashboard target:
|
||||||
|
|
||||||
- Waveshare ESP32-S3-Touch-LCD-5
|
- Waveshare ESP32-S3 Touch LCD 5B
|
||||||
|
- 1024x600 display
|
||||||
- WiFi client to the Cargo ESP32 access point
|
- WiFi client to the Cargo ESP32 access point
|
||||||
- HTTP API integration
|
- HTTP API integration
|
||||||
|
|
||||||
@@ -78,7 +82,6 @@ A future Pi Zero may be added for long-term logging or richer local integrations
|
|||||||
|
|
||||||
Important docs:
|
Important docs:
|
||||||
|
|
||||||
- `docs/project-state.md`
|
|
||||||
- `docs/API.md`
|
- `docs/API.md`
|
||||||
- `docs/ARCHITECTURE.md`
|
- `docs/ARCHITECTURE.md`
|
||||||
- `docs/HARDWARE.md`
|
- `docs/HARDWARE.md`
|
||||||
@@ -88,7 +91,7 @@ Important docs:
|
|||||||
- `docs/SERIAL_COMMANDS.md`
|
- `docs/SERIAL_COMMANDS.md`
|
||||||
- `docs/PARITY_MATRIX.md`
|
- `docs/PARITY_MATRIX.md`
|
||||||
- `docs/TEMP_SETUP.md`
|
- `docs/TEMP_SETUP.md`
|
||||||
- `docs/ROADMAP.md`
|
- `docs/roadmap.md`
|
||||||
- `docs/CHANGELOG.md`
|
- `docs/CHANGELOG.md`
|
||||||
|
|
||||||
## Safety
|
## Safety
|
||||||
|
|||||||
+29
-49
@@ -16,11 +16,9 @@ Current API base path:
|
|||||||
|
|
||||||
All documented endpoints are local-first and must continue to work without internet access. Consumers should ignore unknown response fields for forward compatibility.
|
All documented endpoints are local-first and must continue to work without internet access. Consumers should ignore unknown response fields for forward compatibility.
|
||||||
|
|
||||||
Current firmware version:
|
The API returns the running build version in each system, health, and
|
||||||
|
capabilities response. Do not treat examples in this document as a version
|
||||||
```text
|
source of truth.
|
||||||
0.5.0
|
|
||||||
```
|
|
||||||
|
|
||||||
## Current Endpoints
|
## Current Endpoints
|
||||||
|
|
||||||
@@ -41,6 +39,9 @@ POST /api/v1/config/temp
|
|||||||
POST /api/v1/config/bms
|
POST /api/v1/config/bms
|
||||||
POST /api/v1/config/save
|
POST /api/v1/config/save
|
||||||
POST /api/v1/config/factory-reset
|
POST /api/v1/config/factory-reset
|
||||||
|
GET /api/v1/config/ap
|
||||||
|
POST /api/v1/config/ap
|
||||||
|
POST /api/v1/config/ap/reset
|
||||||
|
|
||||||
GET /api/v1/config/wifi
|
GET /api/v1/config/wifi
|
||||||
POST /api/v1/config/wifi
|
POST /api/v1/config/wifi
|
||||||
@@ -55,18 +56,12 @@ POST /api/v1/bms/setup/enter
|
|||||||
POST /api/v1/bms/setup/exit
|
POST /api/v1/bms/setup/exit
|
||||||
POST /api/v1/bms/scan
|
POST /api/v1/bms/scan
|
||||||
POST /api/v1/bms/select
|
POST /api/v1/bms/select
|
||||||
|
|
||||||
|
POST /api/v1/system/ota
|
||||||
```
|
```
|
||||||
|
|
||||||
Pre-versioned root routes remain registered as compatibility aliases for existing local clients. New clients should use `/api/v1`.
|
Only `/api/v1` routes are registered. New clients must use the versioned API
|
||||||
|
prefix; root-route compatibility aliases are not available.
|
||||||
Legacy GET relay routes remain available only as root compatibility aliases:
|
|
||||||
|
|
||||||
```text
|
|
||||||
GET /relay/relay_1/on
|
|
||||||
GET /relay/relay_1/off
|
|
||||||
GET /relay/relay_2/on
|
|
||||||
GET /relay/relay_2/off
|
|
||||||
```
|
|
||||||
|
|
||||||
## Dashboard Contract
|
## Dashboard Contract
|
||||||
|
|
||||||
@@ -91,7 +86,7 @@ Returns a lightweight liveness response for dashboards and service tools.
|
|||||||
"ok": true,
|
"ok": true,
|
||||||
"api_version": "v1",
|
"api_version": "v1",
|
||||||
"firmware_name": "overland-controller",
|
"firmware_name": "overland-controller",
|
||||||
"firmware_version": "0.5.0",
|
"firmware_version": "<running build version>",
|
||||||
"uptime_seconds": 123,
|
"uptime_seconds": 123,
|
||||||
"network": {
|
"network": {
|
||||||
"ap_enabled": true,
|
"ap_enabled": true,
|
||||||
@@ -120,14 +115,14 @@ Returns API and feature discovery data for clients.
|
|||||||
"ok": true,
|
"ok": true,
|
||||||
"api_version": "v1",
|
"api_version": "v1",
|
||||||
"firmware_name": "overland-controller",
|
"firmware_name": "overland-controller",
|
||||||
"firmware_version": "0.5.0",
|
"firmware_version": "<running build version>",
|
||||||
"endpoints": [
|
"endpoints": [
|
||||||
"GET /api/v1/status",
|
"GET /api/v1/status",
|
||||||
"POST /api/v1/relay/set"
|
"POST /api/v1/relay/set"
|
||||||
],
|
],
|
||||||
"limits": {
|
"limits": {
|
||||||
"relay_count": 2,
|
"relay_count": 6,
|
||||||
"temperature_sensor_count": 8,
|
"temperature_sensor_count": 4,
|
||||||
"runtime_temperature_status_count": 4,
|
"runtime_temperature_status_count": 4,
|
||||||
"wifi_network_count": 3
|
"wifi_network_count": 3
|
||||||
},
|
},
|
||||||
@@ -137,8 +132,8 @@ Returns API and feature discovery data for clients.
|
|||||||
"wifi_config": true,
|
"wifi_config": true,
|
||||||
"config_backup_restore": true,
|
"config_backup_restore": true,
|
||||||
"bms_setup": true,
|
"bms_setup": true,
|
||||||
"uart_json": true,
|
"uart_json": false,
|
||||||
"root_compatibility_aliases": true
|
"root_compatibility_aliases": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -244,7 +239,8 @@ Fields:
|
|||||||
| `online` | Current sensor detection state |
|
| `online` | Current sensor detection state |
|
||||||
| `temperature_f` | Current Fahrenheit value, or `null` when offline |
|
| `temperature_f` | Current Fahrenheit value, or `null` when offline |
|
||||||
|
|
||||||
Config supports `temp_1` through `temp_8`. Current `/api/v1/status` runtime output is limited to the configured count capped at four sensors.
|
Config supports `temp_1` through `temp_4`. `/api/v1/status` returns the
|
||||||
|
configured runtime sensors, capped at four.
|
||||||
|
|
||||||
### relays
|
### relays
|
||||||
|
|
||||||
@@ -252,7 +248,7 @@ Config supports `temp_1` through `temp_8`. Current `/api/v1/status` runtime outp
|
|||||||
{
|
{
|
||||||
"id": "relay_1",
|
"id": "relay_1",
|
||||||
"name": "Aux Power",
|
"name": "Aux Power",
|
||||||
"pin": 16,
|
"hardware_channel": 1,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"state": false
|
"state": false
|
||||||
}
|
}
|
||||||
@@ -263,6 +259,10 @@ Valid relay IDs:
|
|||||||
```text
|
```text
|
||||||
relay_1
|
relay_1
|
||||||
relay_2
|
relay_2
|
||||||
|
relay_3
|
||||||
|
relay_4
|
||||||
|
relay_5
|
||||||
|
relay_6
|
||||||
```
|
```
|
||||||
|
|
||||||
Relay names are user configuration. Firmware and clients should use generic IDs for commands.
|
Relay names are user configuration. Firmware and clients should use generic IDs for commands.
|
||||||
@@ -319,7 +319,7 @@ The AP remains enabled even when STA WiFi is configured or connected.
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"firmware_name": "overland-controller",
|
"firmware_name": "overland-controller",
|
||||||
"firmware_version": "0.5.0",
|
"firmware_version": "<running build version>",
|
||||||
"build_date": "Jun 7 2026",
|
"build_date": "Jun 7 2026",
|
||||||
"build_time": "12:00:00",
|
"build_time": "12:00:00",
|
||||||
"uptime_seconds": 123
|
"uptime_seconds": 123
|
||||||
@@ -394,7 +394,7 @@ Fields:
|
|||||||
|
|
||||||
| Field | Required | Description |
|
| Field | Required | Description |
|
||||||
|---|---:|---|
|
|---|---:|---|
|
||||||
| `id` | Yes | `relay_1` or `relay_2` |
|
| `id` | Yes | `relay_1` through `relay_6` |
|
||||||
| `name` | No | User display name |
|
| `name` | No | User display name |
|
||||||
| `enabled` | No | Configured enabled state. When set to `false`, the relay output is forced OFF and future relay control requests are rejected with `relay_disabled`. |
|
| `enabled` | No | Configured enabled state. When set to `false`, the relay output is forced OFF and future relay control requests are rejected with `relay_disabled`. |
|
||||||
|
|
||||||
@@ -418,7 +418,7 @@ Fields:
|
|||||||
|
|
||||||
| Field | Required | Description |
|
| Field | Required | Description |
|
||||||
|---|---:|---|
|
|---|---:|---|
|
||||||
| `id` | Yes | `temp_1` through `temp_8` |
|
| `id` | Yes | `temp_1` through `temp_4` |
|
||||||
| `name` | No | User display name |
|
| `name` | No | User display name |
|
||||||
| `address` | No | DS18B20 address |
|
| `address` | No | DS18B20 address |
|
||||||
| `enabled` | No | Configured enabled state |
|
| `enabled` | No | Configured enabled state |
|
||||||
@@ -472,7 +472,7 @@ Important: export includes saved WiFi passwords so the backup can be restored. T
|
|||||||
"ok": true,
|
"ok": true,
|
||||||
"api_version": "v1",
|
"api_version": "v1",
|
||||||
"firmware_name": "overland-controller",
|
"firmware_name": "overland-controller",
|
||||||
"firmware_version": "0.5.0",
|
"firmware_version": "<running build version>",
|
||||||
"config": {
|
"config": {
|
||||||
"device_name": "Overland Controller",
|
"device_name": "Overland Controller",
|
||||||
"temperature_sensor_count": 4,
|
"temperature_sensor_count": 4,
|
||||||
@@ -541,27 +541,6 @@ Response:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Legacy GET relay routes
|
|
||||||
|
|
||||||
These routes remain for compatibility but should not be used by new clients:
|
|
||||||
|
|
||||||
```text
|
|
||||||
GET /relay/relay_1/on
|
|
||||||
GET /relay/relay_1/off
|
|
||||||
GET /relay/relay_2/on
|
|
||||||
GET /relay/relay_2/off
|
|
||||||
```
|
|
||||||
|
|
||||||
Response:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"ok": true,
|
|
||||||
"id": "relay_1",
|
|
||||||
"state": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## WiFi
|
## WiFi
|
||||||
|
|
||||||
### GET /api/v1/config/wifi
|
### GET /api/v1/config/wifi
|
||||||
@@ -836,7 +815,8 @@ Some serial/UART errors use `message` instead of `error`; HTTP clients should re
|
|||||||
|
|
||||||
Current stable API prefix is `/api/v1`, for example `GET /api/v1/status`.
|
Current stable API prefix is `/api/v1`, for example `GET /api/v1/status`.
|
||||||
|
|
||||||
Pre-versioned root routes remain registered as local compatibility aliases. Do not add new root-only HTTP API routes.
|
Pre-versioned root routes are not registered. Do not add new root-only HTTP
|
||||||
|
API routes.
|
||||||
|
|
||||||
New fields may be added to existing JSON objects. Consumers should ignore unknown fields.
|
New fields may be added to existing JSON objects. Consumers should ignore unknown fields.
|
||||||
|
|
||||||
|
|||||||
+18
-36
@@ -32,8 +32,8 @@ The Cargo ESP32 should not depend on the dashboard, phone, home server, or inter
|
|||||||
|
|
||||||
Target hardware:
|
Target hardware:
|
||||||
|
|
||||||
- Waveshare ESP32-S3-Touch-LCD-5
|
- Waveshare ESP32-S3 Touch LCD 5B
|
||||||
- 5 inch 800x480 capacitive touchscreen
|
- 5 inch 1024x600 capacitive touchscreen
|
||||||
- ESP32-S3
|
- ESP32-S3
|
||||||
- 16MB flash
|
- 16MB flash
|
||||||
- 8MB PSRAM
|
- 8MB PSRAM
|
||||||
@@ -101,7 +101,8 @@ Preferred direction:
|
|||||||
POST /api/v1/config/import
|
POST /api/v1/config/import
|
||||||
POST /api/v1/relay/set
|
POST /api/v1/relay/set
|
||||||
|
|
||||||
Pre-versioned root routes remain registered as compatibility aliases for existing local clients.
|
Only `/api/v1` routes are registered; root-route compatibility aliases are not
|
||||||
|
part of the current API.
|
||||||
|
|
||||||
## Generic IDs
|
## Generic IDs
|
||||||
|
|
||||||
@@ -111,17 +112,14 @@ Relays:
|
|||||||
|
|
||||||
relay_1
|
relay_1
|
||||||
relay_2
|
relay_2
|
||||||
|
relay_3
|
||||||
|
relay_4
|
||||||
|
relay_5
|
||||||
|
relay_6
|
||||||
|
|
||||||
Temperature sensors:
|
Temperature sensors:
|
||||||
|
|
||||||
temp_1
|
temp_1 through temp_4
|
||||||
temp_2
|
|
||||||
temp_3
|
|
||||||
temp_4
|
|
||||||
temp_5
|
|
||||||
temp_6
|
|
||||||
temp_7
|
|
||||||
temp_8
|
|
||||||
|
|
||||||
Install-specific names belong in saved configuration only.
|
Install-specific names belong in saved configuration only.
|
||||||
|
|
||||||
@@ -201,15 +199,9 @@ Active dashboard communication is WiFi/HTTP using `/api/v1`.
|
|||||||
|
|
||||||
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
||||||
|
|
||||||
Current Cargo ESP32 GPIO plan:
|
The active LILYGO Cargo profile uses its onboard 74HC595 for relay control.
|
||||||
|
GPIO4 is the relay output-enable pin and the DS18B20 OneWire bus uses GPIO15.
|
||||||
- GPIO 16: Relay 1 trigger output
|
See `docs/HARDWARE.md` for the complete current pin map.
|
||||||
- GPIO 17: Relay 2 trigger output
|
|
||||||
- GPIO 4: DS18B20 OneWire temperature bus
|
|
||||||
- GPIO 34: Ignition sense input
|
|
||||||
- GPIO 21: SSD1306 OLED I2C SDA
|
|
||||||
- GPIO 22: SSD1306 OLED I2C SCL
|
|
||||||
- GPIO 25: OLED setup/status button
|
|
||||||
|
|
||||||
## Role Boundary Summary
|
## Role Boundary Summary
|
||||||
|
|
||||||
@@ -266,7 +258,7 @@ This means future dashboard work should display existing Cargo ESP temperature t
|
|||||||
|
|
||||||
## Cargo ESP API Contract
|
## Cargo ESP API Contract
|
||||||
|
|
||||||
The Cargo ESP API contract is documented in `docs/cargo-api-contract.md`.
|
The Cargo ESP API contract is documented in `docs/API.md`.
|
||||||
|
|
||||||
The Cargo ESP32 is the source of truth for:
|
The Cargo ESP32 is the source of truth for:
|
||||||
|
|
||||||
@@ -278,22 +270,12 @@ The Cargo ESP32 is the source of truth for:
|
|||||||
|
|
||||||
The ESP32-S3 dashboard should consume Cargo ESP API data over WiFi/HTTP REST instead of directly owning cargo sensors or relay state.
|
The ESP32-S3 dashboard should consume Cargo ESP API data over WiFi/HTTP REST instead of directly owning cargo sensors or relay state.
|
||||||
|
|
||||||
## Cargo ESP Hardware Transition Plan
|
## Cargo ESP Hardware Profile
|
||||||
|
|
||||||
Current active development and testing remains on the existing 2-channel relay board.
|
The active Cargo profile is `lilygo_trelay_s3_6ch`: six outputs driven through
|
||||||
|
the LILYGO T-Relay-S3 onboard 74HC595. Clients must render the output list
|
||||||
A LILYGO T-Relay-S3 6-way board has been ordered as a future Cargo ESP candidate.
|
returned by the API rather than assuming a fixed relay count. Bench test relay
|
||||||
|
boot state and CH1–CH6 mapping before connecting vehicle loads.
|
||||||
Transition strategy:
|
|
||||||
|
|
||||||
- Keep current 2-channel board working.
|
|
||||||
- Make the Cargo ESP API output-count agnostic.
|
|
||||||
- Represent outputs as a list of output objects.
|
|
||||||
- Let clients render whatever output list the Cargo ESP exposes.
|
|
||||||
- Add a hardware profile/config layer before migrating firmware to LilyGO.
|
|
||||||
- Bench test LilyGO relay boot behavior before connecting it to the WUPP block.
|
|
||||||
|
|
||||||
The API should not require redesign when moving from 2 outputs to 6 outputs.
|
|
||||||
|
|
||||||
## Planned WebSocket Push Layer
|
## Planned WebSocket Push Layer
|
||||||
|
|
||||||
|
|||||||
@@ -46,12 +46,16 @@ Relays use generic firmware IDs:
|
|||||||
|
|
||||||
relay_1
|
relay_1
|
||||||
relay_2
|
relay_2
|
||||||
|
relay_3
|
||||||
|
relay_4
|
||||||
|
relay_5
|
||||||
|
relay_6
|
||||||
|
|
||||||
Each relay has:
|
Each relay has:
|
||||||
|
|
||||||
- id
|
- id
|
||||||
- name
|
- name
|
||||||
- pin
|
- hardware channel
|
||||||
- enabled
|
- enabled
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
@@ -75,14 +79,7 @@ Disabled relays are forced OFF immediately, hidden from normal dashboard control
|
|||||||
|
|
||||||
Temperature sensors use generic firmware IDs:
|
Temperature sensors use generic firmware IDs:
|
||||||
|
|
||||||
temp_1
|
temp_1 through temp_4
|
||||||
temp_2
|
|
||||||
temp_3
|
|
||||||
temp_4
|
|
||||||
temp_5
|
|
||||||
temp_6
|
|
||||||
temp_7
|
|
||||||
temp_8
|
|
||||||
|
|
||||||
Each sensor has:
|
Each sensor has:
|
||||||
|
|
||||||
|
|||||||
+17
-26
@@ -24,12 +24,12 @@ Do not directly route fridge, Starlink, inverter, lights, or other major loads t
|
|||||||
|
|
||||||
Target:
|
Target:
|
||||||
|
|
||||||
Waveshare ESP32-S3-Touch-LCD-5
|
Waveshare ESP32-S3 Touch LCD 5B
|
||||||
|
|
||||||
Reasons:
|
Reasons:
|
||||||
|
|
||||||
- ESP32-S3 is mature enough for LVGL dashboard
|
- ESP32-S3 is mature enough for LVGL dashboard
|
||||||
- 5 inch 800x480 display gives enough UI space
|
- 5 inch 1024x600 display gives enough UI space
|
||||||
- WiFi connects to Cargo ESP32 AP
|
- WiFi connects to Cargo ESP32 AP
|
||||||
- CAN interface with onboard TJA1051 supports future OBD-II vehicle data
|
- CAN interface with onboard TJA1051 supports future OBD-II vehicle data
|
||||||
- microSD allows future logging
|
- microSD allows future logging
|
||||||
@@ -149,15 +149,8 @@ Active dashboard communication is WiFi/HTTP using `/api/v1`.
|
|||||||
|
|
||||||
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
||||||
|
|
||||||
Current Cargo ESP32 GPIO plan:
|
Current Cargo ESP32 GPIO plan is defined by the active LILYGO T-Relay-S3
|
||||||
|
profile below. Do not use the retired direct-GPIO relay map.
|
||||||
- GPIO 16: Relay 1 trigger output
|
|
||||||
- GPIO 17: Relay 2 trigger output
|
|
||||||
- GPIO 4: DS18B20 OneWire temperature bus
|
|
||||||
- GPIO 34: Ignition sense input
|
|
||||||
- GPIO 21: SSD1306 OLED I2C SDA
|
|
||||||
- GPIO 22: SSD1306 OLED I2C SCL
|
|
||||||
- GPIO 25: OLED setup/status button
|
|
||||||
|
|
||||||
## Automotive Load-Switching Layer
|
## Automotive Load-Switching Layer
|
||||||
|
|
||||||
@@ -214,13 +207,12 @@ Current expectation:
|
|||||||
|
|
||||||
Do not move cargo/fridge temperature sensing to the dashboard controller unless the architecture is explicitly changed later.
|
Do not move cargo/fridge temperature sensing to the dashboard controller unless the architecture is explicitly changed later.
|
||||||
|
|
||||||
## Ordered Cargo ESP Hardware: LILYGO T-Relay-S3 6-Way
|
## Cargo Controller: LILYGO T-Relay-S3 6-Way
|
||||||
|
|
||||||
The LILYGO T-Relay-S3 6-way board has been ordered as a future Cargo ESP candidate.
|
The active Cargo controller is the LILYGO T-Relay-S3 6-way board. Its relay
|
||||||
|
outputs are low-current control outputs; they do not carry major load current.
|
||||||
|
|
||||||
Current active testing should continue on the existing 2-channel relay board until the LilyGO board arrives and is bench tested.
|
Current role:
|
||||||
|
|
||||||
Planned LilyGO role:
|
|
||||||
|
|
||||||
LILYGO T-Relay-S3 6-way
|
LILYGO T-Relay-S3 6-way
|
||||||
-> low-current control/relay outputs
|
-> low-current control/relay outputs
|
||||||
@@ -228,17 +220,18 @@ Planned LilyGO role:
|
|||||||
-> fused load switching
|
-> fused load switching
|
||||||
Fridge / Starlink / lights / spare / spare / spare
|
Fridge / Starlink / lights / spare / spare / spare
|
||||||
|
|
||||||
Important guardrails:
|
Guardrails:
|
||||||
|
|
||||||
- Do not migrate active firmware assumptions until the board is physically available.
|
|
||||||
- Bench test relay boot behavior before connecting to WUPP or vehicle loads.
|
- Bench test relay boot behavior before connecting to WUPP or vehicle loads.
|
||||||
- Confirm relay polarity/state behavior.
|
- Confirm relay polarity/state behavior.
|
||||||
- Confirm available GPIO for DS18B20 and any optional OLED/status hardware.
|
- Confirm available GPIO for DS18B20 and any optional OLED/status hardware.
|
||||||
- Treat the LilyGO board as the controller, not the high-current load path.
|
- Treat the LilyGO board as the controller, not the high-current load path.
|
||||||
|
|
||||||
## M9N GPS Module
|
## Sensor-node GPS and IMU
|
||||||
|
|
||||||
The dashboard enclosure will include an M9N GPS module connected to the ESP32-S3 dashboard over UART. It will provide GPS fix status, satellite count, position, speed, and UTC time. Future work will use GPS time/location for automatic timezone and DST handling.
|
The XIAO ESP32-C6 node provides MAX-M10S GPS and BNO086 IMU telemetry to the
|
||||||
|
dashboard over RS485. The dashboard does not need a second, direct GPS module
|
||||||
|
for the current architecture.
|
||||||
|
|
||||||
## XIAO sensor-node RS485 link
|
## XIAO sensor-node RS485 link
|
||||||
|
|
||||||
@@ -252,11 +245,8 @@ The dashboard uses the Waveshare ESP32-S3-Touch-LCD-5B onboard RS485 receiver fo
|
|||||||
The onboard transceiver handles direction automatically. Configure 115200 baud, 8-N-1, connect A-to-A, B-to-B, and share ground. Keep **USB CDC On Boot** enabled so USB diagnostics do not claim the RS485 UART pins.
|
The onboard transceiver handles direction automatically. Configure 115200 baud, 8-N-1, connect A-to-A, B-to-B, and share ground. Keep **USB CDC On Boot** enabled so USB diagnostics do not claim the RS485 UART pins.
|
||||||
|
|
||||||
|
|
||||||
### LilyGO T-Relay-S3 6-relay cargo controller
|
Relay control is handled through the onboard 74HC595 shift register, not direct
|
||||||
|
ESP32 GPIO relay outputs.
|
||||||
The cargo ESP now targets the LilyGO T-Relay-S3 6-relay board.
|
|
||||||
|
|
||||||
Relay control is handled through the onboard 74HC595 shift register, not direct ESP32 GPIO relay outputs.
|
|
||||||
|
|
||||||
| Function | GPIO |
|
| Function | GPIO |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
@@ -274,6 +264,7 @@ Relay control is handled through the onboard 74HC595 shift register, not direct
|
|||||||
| relay_5 | CH5 | SR5 |
|
| relay_5 | CH5 | SR5 |
|
||||||
| relay_6 | CH6 | SR6 |
|
| relay_6 | CH6 | SR6 |
|
||||||
|
|
||||||
GPIO4 is reserved for relay output-enable on this board, so the DS18B20 OneWire bus is moved to GPIO14.
|
GPIO4 is reserved for relay output-enable on this board, so the DS18B20 OneWire
|
||||||
|
bus uses GPIO15.
|
||||||
|
|
||||||
Avoid GPIO35-GPIO37 on the LilyGO T-Relay-S3 because they are used by Octal SPI flash.
|
Avoid GPIO35-GPIO37 on the LilyGO T-Relay-S3 because they are used by Octal SPI flash.
|
||||||
+14
-17
@@ -1,6 +1,8 @@
|
|||||||
# Command Parity Matrix
|
# Command Parity Matrix
|
||||||
|
|
||||||
This document tracks feature parity across the three control surfaces.
|
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:
|
Control surfaces:
|
||||||
|
|
||||||
@@ -42,10 +44,14 @@ Relays:
|
|||||||
|
|
||||||
relay_1
|
relay_1
|
||||||
relay_2
|
relay_2
|
||||||
|
relay_3
|
||||||
|
relay_4
|
||||||
|
relay_5
|
||||||
|
relay_6
|
||||||
|
|
||||||
Temperature sensors:
|
Temperature sensors:
|
||||||
|
|
||||||
temp_1 through temp_8
|
temp_1 through temp_4
|
||||||
|
|
||||||
Preferred relay command shape:
|
Preferred relay command shape:
|
||||||
|
|
||||||
@@ -64,12 +70,7 @@ Preferred HTTP relay endpoint:
|
|||||||
|
|
||||||
POST /api/v1/relay/set
|
POST /api/v1/relay/set
|
||||||
|
|
||||||
Legacy root HTTP relay routes remain for compatibility:
|
Only the versioned HTTP API is registered; root relay routes are not supported.
|
||||||
|
|
||||||
GET /relay/relay_1/on
|
|
||||||
GET /relay/relay_1/off
|
|
||||||
GET /relay/relay_2/on
|
|
||||||
GET /relay/relay_2/off
|
|
||||||
|
|
||||||
## Response Shape Standard
|
## Response Shape Standard
|
||||||
|
|
||||||
@@ -88,9 +89,9 @@ Status/config responses should preserve the generic data model used by `/status`
|
|||||||
|
|
||||||
# Project Status
|
# Project Status
|
||||||
|
|
||||||
API/UART/USB parity status:
|
API/USB serial parity status:
|
||||||
|
|
||||||
COMPLETE
|
ACTIVE
|
||||||
|
|
||||||
Covered:
|
Covered:
|
||||||
|
|
||||||
@@ -103,12 +104,8 @@ Covered:
|
|||||||
Save Config
|
Save Config
|
||||||
Factory Reset
|
Factory Reset
|
||||||
|
|
||||||
Future additions must be implemented on:
|
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
|
||||||
USB Serial
|
workflow.
|
||||||
UART JSON
|
|
||||||
HTTP API
|
|
||||||
|
|
||||||
before parity is considered maintained.
|
|
||||||
|
|
||||||
- Temperature sensor config/status parity now includes the `weather` boolean flag for outside-air display selection.
|
- Temperature sensor config/status parity now includes the `weather` boolean flag for outside-air display selection.
|
||||||
+6
-25
@@ -12,8 +12,6 @@ This folder contains project documentation for Overland Controller.
|
|||||||
|
|
||||||
## Project Tracking
|
## Project Tracking
|
||||||
|
|
||||||
- `CHATGPT_HANDOFF.md` - Concise assistant handoff with current status, goals, constraints, and validation notes
|
|
||||||
- `project-state.md` - Current project state
|
|
||||||
- `roadmap.md` - Roadmap and future plans
|
- `roadmap.md` - Roadmap and future plans
|
||||||
- `decisions.md` - Architecture and implementation decisions
|
- `decisions.md` - Architecture and implementation decisions
|
||||||
|
|
||||||
@@ -30,29 +28,12 @@ Older or duplicate documents have been moved to `archive/`.
|
|||||||
|
|
||||||
Archived documents are kept for history, but the primary documents above should be treated as the current source of truth.
|
Archived documents are kept for history, but the primary documents above should be treated as the current source of truth.
|
||||||
|
|
||||||
## Parity
|
## Supporting References
|
||||||
|
|
||||||
- `PARITY_MATRIX.md` - Command parity across USB serial, UART JSON, and HTTP API
|
|
||||||
|
|
||||||
|
- `PARITY_MATRIX.md` - Command parity across USB serial, optional UART JSON, and HTTP API
|
||||||
- `controller-roles.md` - Cargo ESP vs Dashboard ESP32-S3 responsibility boundaries
|
- `controller-roles.md` - Cargo ESP vs Dashboard ESP32-S3 responsibility boundaries
|
||||||
|
- `SENSOR_NODE_PROTOCOL.md` - XIAO ESP32-C6 BNO086/MAX-M10S RS485 telemetry contract
|
||||||
|
- `waveshare-5b-bringup-checklist.md` - Waveshare ESP32-S3 Touch LCD 5B bench checklist
|
||||||
|
|
||||||
- `../archive/legacy-pico-dashboard/` - Archived Pico dashboard implementation kept for reference only.
|
The active dashboard firmware lives in `../firmware/esp32-s3-dashboard/`.
|
||||||
- `../firmware/esp32-s3-dashboard/` - Current ESP32-S3 dashboard firmware placeholder.
|
The active Cargo hardware profile is the LILYGO T-Relay-S3 6-relay board.
|
||||||
|
|
||||||
- `repo-cleanup-audit.md` - Active repo audit for stale Pico/UART dashboard references and DS18B20 documentation status.
|
|
||||||
- `API.md` - High-level API notes and telemetry ownership.
|
|
||||||
|
|
||||||
- `cargo-api-contract.md` - Cargo ESP API ownership and expected API areas for WebUI/dashboard clients.
|
|
||||||
|
|
||||||
- `pre-lilygo-baseline-checklist.md` - Checklist for creating a known-good Cargo ESP 2-channel baseline before future LilyGO migration.
|
|
||||||
|
|
||||||
## LilyGO Transition
|
|
||||||
|
|
||||||
The LILYGO T-Relay-S3 6-way board has been ordered as a future Cargo ESP candidate.
|
|
||||||
|
|
||||||
Current development remains on the 2-channel relay board while the API and docs are prepared for output-count-agnostic operation.
|
|
||||||
|
|
||||||
- `api-v1-audit.md` - Audit of legacy API paths vs `/api/v1` namespace.
|
|
||||||
- `SENSOR_NODE_PROTOCOL.md` - XIAO ESP32-C6 BNO086/MAX-M10S RS485 telemetry contract.
|
|
||||||
|
|
||||||
- `waveshare-5b-bringup-checklist.md` - Bench bring-up checklist for the Waveshare ESP32-S3 Touch LCD 5B dashboard.
|
|
||||||
@@ -160,7 +160,7 @@ text OK relay renamed
|
|||||||
|
|
||||||
Temperature sensor IDs:
|
Temperature sensor IDs:
|
||||||
|
|
||||||
text temp_1 temp_2 temp_3 temp_4 temp_5 temp_6 temp_7 temp_8
|
text temp_1 temp_2 temp_3 temp_4
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -449,6 +449,6 @@ Wiring reminder:
|
|||||||
|
|
||||||
DS18B20 red -> 3.3V
|
DS18B20 red -> 3.3V
|
||||||
DS18B20 black -> GND
|
DS18B20 black -> GND
|
||||||
DS18B20 yellow -> GPIO4
|
DS18B20 yellow -> GPIO15
|
||||||
|
|
||||||
A single 4.7k resistor is required between 3.3V and GPIO4/data.
|
A single 4.7k resistor is required between 3.3V and GPIO15/data.
|
||||||
+2
-2
@@ -6,7 +6,7 @@ All DS18B20 sensors share a single 1-Wire bus.
|
|||||||
|
|
||||||
ESP32:
|
ESP32:
|
||||||
|
|
||||||
GPIO4 = DATA
|
GPIO15 = DATA
|
||||||
3.3V = VCC
|
3.3V = VCC
|
||||||
GND = GND
|
GND = GND
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@ Example:
|
|||||||
|
|
|
|
||||||
4.7k
|
4.7k
|
||||||
|
|
|
|
||||||
GPIO4 ----+---------------- Sensor Yellow
|
GPIO15 ---+---------------- Sensor Yellow
|
||||||
|
|
||||||
GND ----------------------- Sensor Black
|
GND ----------------------- Sensor Black
|
||||||
|
|
||||||
|
|||||||
+7
-10
@@ -36,10 +36,14 @@ Relays:
|
|||||||
|
|
||||||
relay_1
|
relay_1
|
||||||
relay_2
|
relay_2
|
||||||
|
relay_3
|
||||||
|
relay_4
|
||||||
|
relay_5
|
||||||
|
relay_6
|
||||||
|
|
||||||
Temperature sensors:
|
Temperature sensors:
|
||||||
|
|
||||||
temp_1 through temp_8
|
temp_1 through temp_4
|
||||||
|
|
||||||
## Status Request
|
## Status Request
|
||||||
|
|
||||||
@@ -282,12 +286,5 @@ Active dashboard communication is WiFi/HTTP using `/api/v1`.
|
|||||||
|
|
||||||
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
||||||
|
|
||||||
Current Cargo ESP32 GPIO plan:
|
The active Cargo profile is `lilygo_trelay_s3_6ch`: relay control uses the
|
||||||
|
onboard 74HC595, GPIO4 is relay output-enable, and DS18B20 OneWire uses GPIO15.
|
||||||
- GPIO 16: Relay 1 trigger output
|
|
||||||
- GPIO 17: Relay 2 trigger output
|
|
||||||
- GPIO 4: DS18B20 OneWire temperature bus
|
|
||||||
- GPIO 34: Ignition sense input
|
|
||||||
- GPIO 21: SSD1306 OLED I2C SDA
|
|
||||||
- GPIO 22: SSD1306 OLED I2C SCL
|
|
||||||
- GPIO 25: OLED setup/status button
|
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+13
-18
@@ -18,7 +18,7 @@ Cargo ESP32 Controller
|
|||||||
|
|
||||||
Waveshare ESP32-S3 Dashboard
|
Waveshare ESP32-S3 Dashboard
|
||||||
- Connects to cargo ESP32 AP
|
- Connects to cargo ESP32 AP
|
||||||
- Polls /status
|
- Polls `/api/v1/status`
|
||||||
- Renders LVGL dashboard
|
- Renders LVGL dashboard
|
||||||
- Sends relay commands over HTTP
|
- Sends relay commands over HTTP
|
||||||
|
|
||||||
@@ -165,15 +165,9 @@ Active dashboard communication is WiFi/HTTP using `/api/v1`.
|
|||||||
|
|
||||||
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
||||||
|
|
||||||
Current Cargo ESP32 GPIO plan:
|
The dashboard does not use the Cargo controller's relay or OneWire GPIO. The
|
||||||
|
active Cargo profile is `lilygo_trelay_s3_6ch`; see `docs/HARDWARE.md` for its
|
||||||
- GPIO 16: Relay 1 trigger output
|
current pin map.
|
||||||
- GPIO 17: Relay 2 trigger output
|
|
||||||
- GPIO 4: DS18B20 OneWire temperature bus
|
|
||||||
- GPIO 34: Ignition sense input
|
|
||||||
- GPIO 21: SSD1306 OLED I2C SDA
|
|
||||||
- GPIO 22: SSD1306 OLED I2C SCL
|
|
||||||
- GPIO 25: OLED setup/status button
|
|
||||||
|
|
||||||
## Not Dashboard Responsibilities
|
## Not Dashboard Responsibilities
|
||||||
|
|
||||||
@@ -195,7 +189,8 @@ DS18B20 sensors are already implemented on the Cargo ESP/WebUI/API side. For v1,
|
|||||||
|
|
||||||
## API Dependency
|
## API Dependency
|
||||||
|
|
||||||
The ESP32-S3 dashboard depends on the Cargo ESP API contract documented in `docs/cargo-api-contract.md`.
|
The ESP32-S3 dashboard depends on the Cargo ESP API contract documented in
|
||||||
|
`docs/API.md`.
|
||||||
|
|
||||||
For v1, the dashboard should consume:
|
For v1, the dashboard should consume:
|
||||||
|
|
||||||
@@ -243,14 +238,12 @@ Implemented:
|
|||||||
- WiFi signal strength display
|
- WiFi signal strength display
|
||||||
- Cargo ESP connectivity indicator
|
- Cargo ESP connectivity indicator
|
||||||
|
|
||||||
Planned next work:
|
Next work:
|
||||||
|
|
||||||
- Temperature card redesign
|
- Temperature card redesign
|
||||||
- Swipe/page navigation
|
|
||||||
- Battery detail page
|
|
||||||
- Vehicle data page
|
- Vehicle data page
|
||||||
- CAN/OBD-II integration
|
- Validate coolant data from passive CAN captures
|
||||||
- BNO085/BNO086 tilt visualization
|
- BNO086/MAX-M10S off-road visualization
|
||||||
|
|
||||||
### Temperature Sensor Grouping
|
### Temperature Sensor Grouping
|
||||||
|
|
||||||
@@ -295,9 +288,11 @@ Each temperature sensor supports optional high-temperature alerting:
|
|||||||
|
|
||||||
When enabled and the live sensor temperature exceeds the configured threshold, the Cargo ESP includes `high_alert: true` for that sensor in `/api/v1/status`. The ESP32-S3 dashboard colors the affected grouped temperature tile red if any sensor in that displayed group is in alert.
|
When enabled and the live sensor temperature exceeds the configured threshold, the Cargo ESP includes `high_alert: true` for that sensor in `/api/v1/status`. The ESP32-S3 dashboard colors the affected grouped temperature tile red if any sensor in that displayed group is in alert.
|
||||||
|
|
||||||
## M9N GPS Module
|
## Sensor-node GPS and IMU
|
||||||
|
|
||||||
The dashboard enclosure will include an M9N GPS module connected to the ESP32-S3 dashboard over UART. It will provide GPS fix status, satellite count, position, speed, and UTC time. Future work will use GPS time/location for automatic timezone and DST handling.
|
The dashboard already receives MAX-M10S GPS and BNO086 IMU telemetry from the
|
||||||
|
XIAO ESP32-C6 over RS485. A dedicated vehicle/off-road page is the remaining
|
||||||
|
product work.
|
||||||
|
|
||||||
### Hidden Dashboard Diagnostics
|
### Hidden Dashboard Diagnostics
|
||||||
|
|
||||||
|
|||||||
+5
-8
@@ -70,15 +70,12 @@ Firmware uses generic identifiers:
|
|||||||
|
|
||||||
relay_1
|
relay_1
|
||||||
relay_2
|
relay_2
|
||||||
|
relay_3
|
||||||
|
relay_4
|
||||||
|
relay_5
|
||||||
|
relay_6
|
||||||
|
|
||||||
temp_1
|
temp_1 through temp_4
|
||||||
temp_2
|
|
||||||
temp_3
|
|
||||||
temp_4
|
|
||||||
temp_5
|
|
||||||
temp_6
|
|
||||||
temp_7
|
|
||||||
temp_8
|
|
||||||
|
|
||||||
Reason:
|
Reason:
|
||||||
|
|
||||||
|
|||||||
+22
-32
@@ -1,6 +1,6 @@
|
|||||||
# Roadmap
|
# Roadmap
|
||||||
|
|
||||||
## Phase 1: Solid Local Cargo Controller
|
## Phase 1: Solid Local Cargo Controller — established
|
||||||
|
|
||||||
- Reliable relay control
|
- Reliable relay control
|
||||||
- Reliable DS18B20 temps
|
- Reliable DS18B20 temps
|
||||||
@@ -10,14 +10,12 @@
|
|||||||
- Stable HTTP API
|
- Stable HTTP API
|
||||||
- Clear status/config/control model
|
- Clear status/config/control model
|
||||||
|
|
||||||
## Phase 2: Waveshare ESP32-S3 Dashboard
|
## Phase 2: Waveshare ESP32-S3 Dashboard — in progress
|
||||||
|
|
||||||
- LVGL project scaffold
|
- LVGL dashboard, WiFi client, HTTP status polling, relay commands, and stale
|
||||||
- WiFi client to Cargo ESP32 AP
|
state handling are implemented.
|
||||||
- Poll /status
|
- Continue dashboard UX and vehicle-data integration without moving Cargo
|
||||||
- Display battery, relays, temps, and alarms
|
control authority.
|
||||||
- Send relay commands
|
|
||||||
- Handle offline/stale/failed-command states
|
|
||||||
|
|
||||||
UI direction:
|
UI direction:
|
||||||
|
|
||||||
@@ -28,13 +26,11 @@ UI direction:
|
|||||||
- Smooth subtle animations
|
- Smooth subtle animations
|
||||||
- No stock LVGL demo look
|
- No stock LVGL demo look
|
||||||
|
|
||||||
## Phase 3: Vehicle Data
|
## Phase 3: Vehicle Data — in progress
|
||||||
|
|
||||||
- Connect Waveshare CAN to OBD-II CAN-H/CAN-L
|
- Passive CAN capture and coolant PID diagnostics are implemented on the
|
||||||
- Keep CAN termination disabled
|
dashboard; keep CAN termination disabled.
|
||||||
- Read coolant temp via PID 0105
|
- Validate coolant data before adding RPM, speed, or any active OBD polling.
|
||||||
- Read RPM via PID 010C
|
|
||||||
- Read vehicle speed via PID 010D
|
|
||||||
|
|
||||||
## Phase 4: Transmission Temperature
|
## Phase 4: Transmission Temperature
|
||||||
|
|
||||||
@@ -136,22 +132,16 @@ Active dashboard communication is WiFi/HTTP using `/api/v1`.
|
|||||||
|
|
||||||
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
The old Pico/dashboard UART path is retired from active hardware use. USB Serial remains available for development, debug, and manual configuration from a computer.
|
||||||
|
|
||||||
Current Cargo ESP32 GPIO plan:
|
The active Cargo profile is `lilygo_trelay_s3_6ch`. Relays are driven by the
|
||||||
|
onboard 74HC595; GPIO4 is relay output-enable and DS18B20 OneWire uses GPIO15.
|
||||||
- GPIO 16: Relay 1 trigger output
|
See `docs/HARDWARE.md` for the full pin map.
|
||||||
- GPIO 17: Relay 2 trigger output
|
|
||||||
- GPIO 4: DS18B20 OneWire temperature bus
|
|
||||||
- GPIO 34: Ignition sense input
|
|
||||||
- GPIO 21: SSD1306 OLED I2C SDA
|
|
||||||
- GPIO 22: SSD1306 OLED I2C SCL
|
|
||||||
- GPIO 25: OLED setup/status button
|
|
||||||
|
|
||||||
## Future Wishlist Parking Lot
|
## Future Wishlist Parking Lot
|
||||||
|
|
||||||
These are intentionally not committed v1 architecture until explicitly promoted:
|
These are intentionally not committed v1 architecture until explicitly promoted:
|
||||||
|
|
||||||
- BNO085/BNO086 tilt sensor
|
- Dedicated off-road visualization for the existing BNO086/MAX-M10S RS485 node
|
||||||
- CAN sniffing beyond standard OBD-II polling
|
- CAN signal identification beyond the current passive capture and coolant work
|
||||||
- Fault-code support
|
- Fault-code support
|
||||||
- Standalone dashboard mode
|
- Standalone dashboard mode
|
||||||
- Additional cargo outputs
|
- Additional cargo outputs
|
||||||
@@ -183,15 +173,15 @@ Next Dashboard Milestones:
|
|||||||
|
|
||||||
- Temperature card redesign
|
- Temperature card redesign
|
||||||
- Swipe navigation
|
- Swipe navigation
|
||||||
- Battery detail page
|
|
||||||
- Vehicle page
|
- Vehicle page
|
||||||
- OBD-II integration
|
- Validate coolant data from captured vehicle traffic
|
||||||
- CAN integration
|
- BNO086/MAX-M10S off-road attitude display
|
||||||
- BNO085/BNO086 off-road attitude display
|
|
||||||
|
|
||||||
## M9N GPS Module
|
## Sensor-node GPS and IMU
|
||||||
|
|
||||||
The dashboard enclosure will include an M9N GPS module connected to the ESP32-S3 dashboard over UART. It will provide GPS fix status, satellite count, position, speed, and UTC time. Future work will use GPS time/location for automatic timezone and DST handling.
|
The XIAO ESP32-C6 sensor node already provides MAX-M10S GPS and BNO086 IMU
|
||||||
|
telemetry to the dashboard over RS485. Future work is a dedicated vehicle/off-road
|
||||||
|
presentation, not a second dashboard-local GPS design.
|
||||||
|
|
||||||
## Planned: WebSocket live dashboard updates
|
## Planned: WebSocket live dashboard updates
|
||||||
|
|
||||||
@@ -220,6 +210,6 @@ Rationale:
|
|||||||
- [x] Expand cargo relay model from 2 outputs to 6 outputs.
|
- [x] Expand cargo relay model from 2 outputs to 6 outputs.
|
||||||
- [x] Replace direct GPIO relay writes with LilyGO 74HC595 shift-register writes.
|
- [x] Replace direct GPIO relay writes with LilyGO 74HC595 shift-register writes.
|
||||||
- [x] Map relay_1 through relay_6 to CH1 through CH6.
|
- [x] Map relay_1 through relay_6 to CH1 through CH6.
|
||||||
- [x] Move DS18B20 OneWire default from GPIO4 to GPIO14 because GPIO4 is relay nOE.
|
- [x] Move DS18B20 OneWire from GPIO4 to GPIO15 because GPIO4 is relay nOE.
|
||||||
- [ ] Bench test relay boot behavior with no vehicle loads connected.
|
- [ ] Bench test relay boot behavior with no vehicle loads connected.
|
||||||
- [ ] Confirm CH1-CH6 order with a meter or test lamp before wiring vehicle loads.
|
- [ ] Confirm CH1-CH6 order with a meter or test lamp before wiring vehicle loads.
|
||||||
@@ -11,18 +11,14 @@ Target Hardware:
|
|||||||
|
|
||||||
Current Status:
|
Current Status:
|
||||||
|
|
||||||
- Basic dashboard bring-up sketch created
|
- Functional LVGL dashboard with WiFi/API integration, relay controls, battery
|
||||||
|
detail navigation, passive CAN diagnostics, and XIAO RS485 telemetry reception
|
||||||
|
|
||||||
Upcoming milestones:
|
Next milestones:
|
||||||
|
|
||||||
1. Serial bring-up
|
1. Vehicle/off-road dashboard page
|
||||||
2. Display bring-up
|
2. Validate coolant data from passive CAN captures
|
||||||
3. Touch validation
|
3. Present XIAO GPS/IMU telemetry outside the diagnostics overlay
|
||||||
4. WiFi connection
|
|
||||||
5. Cargo ESP API integration
|
|
||||||
6. LVGL dashboard
|
|
||||||
7. CAN integration
|
|
||||||
8. Vehicle telemetry
|
|
||||||
|
|
||||||
Cargo ESP API Base:
|
Cargo ESP API Base:
|
||||||
|
|
||||||
@@ -48,10 +44,10 @@ Current screen shows:
|
|||||||
- Waveshare ESP32-S3 Touch LCD 5B hardware target
|
- Waveshare ESP32-S3 Touch LCD 5B hardware target
|
||||||
- 1024x600 display note
|
- 1024x600 display note
|
||||||
- `/api/v1` Cargo API base
|
- `/api/v1` Cargo API base
|
||||||
- WiFi placeholder
|
- WiFi and Cargo API connection state
|
||||||
- Touch test button
|
- Touch test button
|
||||||
|
|
||||||
This is intentionally not connected to WiFi or the Cargo ESP yet.
|
The screen is shown while the dashboard connects to the Cargo ESP API.
|
||||||
|
|
||||||
|
|
||||||
## Firmware Structure
|
## Firmware Structure
|
||||||
|
|||||||
@@ -3616,8 +3616,8 @@ void handleCapabilities() {
|
|||||||
features["wifi_config"] = true;
|
features["wifi_config"] = true;
|
||||||
features["config_backup_restore"] = true;
|
features["config_backup_restore"] = true;
|
||||||
features["bms_setup"] = true;
|
features["bms_setup"] = true;
|
||||||
features["uart_json"] = true;
|
features["uart_json"] = DASHBOARD_UART_ENABLED == 1;
|
||||||
features["root_compatibility_aliases"] = true;
|
features["root_compatibility_aliases"] = false;
|
||||||
|
|
||||||
String output;
|
String output;
|
||||||
serializeJson(doc, output);
|
serializeJson(doc, output);
|
||||||
|
|||||||
+14
-5
@@ -1,19 +1,28 @@
|
|||||||
# Hardware BOM
|
# Hardware BOM
|
||||||
|
|
||||||
## Ordered
|
## Active Controller
|
||||||
|
|
||||||
- ESP32 2-Channel Relay Board
|
- LILYGO T-Relay-S3 6-relay board
|
||||||
|
- External fused automotive relays/contactors or a suitable fused distribution layer for major loads
|
||||||
|
|
||||||
## Required
|
## Required
|
||||||
|
|
||||||
- 4x DS18B20 Waterproof Sensors
|
- 4x DS18B20 Waterproof Sensors
|
||||||
- Waveshare ESP32-S3-Touch-LCD-5 dashboard
|
- Waveshare ESP32-S3 Touch LCD 5B dashboard
|
||||||
- Fused ACC switched 12V dashboard power
|
- Fused ACC switched 12V dashboard power
|
||||||
- Bosch Relay Sockets
|
|
||||||
- 30A/40A Bosch Relays
|
|
||||||
- Automotive Fuse Block
|
- Automotive Fuse Block
|
||||||
- Assorted ATC Fuses
|
- Assorted ATC Fuses
|
||||||
|
|
||||||
|
## Load Switching Pending Selection
|
||||||
|
|
||||||
|
The Cargo controller drives low-current control outputs only. Select and bench
|
||||||
|
test one fused load-switching implementation before purchasing a final install
|
||||||
|
BOM:
|
||||||
|
|
||||||
|
- Bosch relay sockets with 30A/40A relays
|
||||||
|
- WUPP-style fused relay/distribution module
|
||||||
|
- Suitable smart high-side switching
|
||||||
|
|
||||||
## Future / Optional Fallback
|
## Future / Optional Fallback
|
||||||
|
|
||||||
- Pi Zero for long-term logging and local integrations
|
- Pi Zero for long-term logging and local integrations
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parents[1]
|
||||||
|
APP_CONFIG = ROOT / "firmware" / "esp32" / "overland-controller" / "app_config.h"
|
||||||
|
CONFIG = ROOT / "firmware" / "esp32" / "overland-controller" / "config.h"
|
||||||
|
FIRMWARE = ROOT / "firmware" / "esp32" / "overland-controller" / "overland-controller.ino"
|
||||||
|
|
||||||
|
|
||||||
|
def test_primary_docs_match_active_hardware_profile():
|
||||||
|
app_config = APP_CONFIG.read_text()
|
||||||
|
config = CONFIG.read_text()
|
||||||
|
readme = (ROOT / "README.md").read_text()
|
||||||
|
hardware = (ROOT / "docs" / "HARDWARE.md").read_text()
|
||||||
|
architecture = (ROOT / "docs" / "ARCHITECTURE.md").read_text()
|
||||||
|
|
||||||
|
assert '#define MAX_RELAYS 6' in app_config
|
||||||
|
assert '#define HARDWARE_PROFILE "lilygo_trelay_s3_6ch"' in app_config
|
||||||
|
assert '#define ONEWIRE_PIN 15' in config
|
||||||
|
|
||||||
|
for document in (readme, hardware, architecture):
|
||||||
|
assert "LILYGO T-Relay-S3" in document
|
||||||
|
|
||||||
|
assert "1024x600" in hardware
|
||||||
|
assert "GPIO15" in hardware
|
||||||
|
assert "800x480" not in hardware
|
||||||
|
assert "GPIO 16: Relay" not in hardware
|
||||||
|
assert "GPIO 4: DS18B20" not in hardware
|
||||||
|
|
||||||
|
|
||||||
|
def test_api_docs_match_versioned_route_contract():
|
||||||
|
api = (ROOT / "docs" / "API.md").read_text()
|
||||||
|
parity = (ROOT / "docs" / "PARITY_MATRIX.md").read_text()
|
||||||
|
firmware = FIRMWARE.read_text()
|
||||||
|
|
||||||
|
assert 'features["root_compatibility_aliases"] = false;' in firmware
|
||||||
|
assert 'features["uart_json"] = DASHBOARD_UART_ENABLED == 1;' in firmware
|
||||||
|
assert '"relay_count": 6' in api
|
||||||
|
assert '"temperature_sensor_count": 4' in api
|
||||||
|
assert '"root_compatibility_aliases": false' in api
|
||||||
|
assert '"uart_json": false' in api
|
||||||
|
assert "Legacy GET relay routes" not in api
|
||||||
|
assert "Legacy root HTTP relay routes" not in parity
|
||||||
Reference in new issue
Block a user