12 Commits

Author SHA1 Message Date
47c75110c9 Stream slave accel via ESP-NOW with master snapshot cache.
Slaves push BMA456 samples at 16ms when enabled; the master caches per
client and exposes ACCEL_SNAPSHOT and ACCEL_STREAM over UART. goTool adds
dashboard stream controls, HTTP accel-stream routes, and an external
WebSocket API with per-connection receive/interval and slave stream commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 19:11:36 +02:00
a9e08107b4 Add RESTART command for master and slaves via ESP-NOW.
UART RESTART (client_id 0 = local reboot, >0 = unicast); dashboard and CLI hooks; delayed esp_restart after response.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 22:33:22 +02:00
5c3cf65bca Persist accelerometer deadzone in NVS across reboots.
Each node saves its local deadzone on UART or ESP-NOW set; pod_settings loads and applies it after BMA456 init.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 22:29:00 +02:00
efd6260201 Add find-me LED locate on master and slaves via ESP-NOW.
UART FIND_ME (client_id 0 = local ring, >0 = unicast), ESPNOW_FIND_ME payload, CLI/dashboard buttons per slave.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 22:04:07 +02:00
9b7bda8551 Distribute master OTA images to slaves over ESP-NOW.
After UART OTA the master reads the staged partition in 4 KiB blocks (200 B ESP-NOW chunks), waits for per-slave block ACKs, and fixes the final partial block. Slaves reuse ota_uart; send pacing and logging improve reliability.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-19 01:00:56 +02:00
241e82b35b Fix ESP-NOW unicast by using sender MAC in client registry.
Register slaves from recv src_addr instead of protobuf mac bytes, add
ESPNOW_UNICAST_TEST for path verification, restore unicast deadzone, and
expose unicast-test in goTool.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 23:15:03 +02:00
ee38ce551a Add accelerometer deadzone via UART and ESP-NOW.
Filter BMA456 logs by configurable LSB threshold; master can set deadzone
for local sensor or slaves using ACCEL_DEADZONE (UART) and ESP-NOW broadcast
until unicast delivery is restored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 23:06:25 +02:00
755bdd92d7 Refactor ESP-NOW air protocol to nanopb protobuf.
Add esp_now_messages.proto with EspNowMessage types, encode/decode helpers,
and Makefile targets to regenerate firmware and UART schemas together.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:44:57 +02:00
6cdca4f3ad Add ESP-NOW heartbeat, client timeout, and slave reconnect.
Slaves send HEARTBEAT every 1s; the master marks clients inactive after
3s without traffic and reactivates on reconnect. CLIENT_INFO reports
last_ping as milliseconds since the last packet, not uptime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:39:10 +02:00
92e146e2ed Add client registry and CLIENT_INFO UART command on master.
Track ESP-NOW slaves in a shared registry and respond to CLIENT_INFO
with protobuf ClientInfoResponse; ESP-NOW path upserts registry entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:26:42 +02:00
81e479ecd1 Ignore repeat master discover after slave has joined network.
Slave responds and logs only on first discover from a given master MAC;
subsequent broadcasts on the same network are silently ignored.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:21:08 +02:00
54f2a7de5b Add ESP-NOW master/slave discovery on DIP network channel.
Initialize WiFi and ESP-NOW from shared app config; master broadcasts
discover packets and collects slave info, slaves respond on matching
network while UART commands stay master-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-18 22:16:19 +02:00