Document hourly and first-sync sender fault counter resets

This commit is contained in:
2026-02-17 01:28:20 +01:00
parent 3aff6ea666
commit 1bdae03cc4
2 changed files with 15 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ Firmware for LilyGO T3 v1.6.1 (`ESP32 + SX1276 + SSD1306`) that runs in two role
- Sender retries reuse cached encoded payload bytes (no re-encode on retry path).
- Sender ACK receive windows adapt from observed ACK RTT + miss streak.
- Sender only starts normal metering/transmit flow after valid time bootstrap from receiver ACK.
- Sender fault counters are reset at first valid time sync and again at each UTC hour boundary.
- Receiver runs STA mode if stored config is valid and connects, otherwise AP fallback.
## LoRa Protocol
@@ -58,8 +59,12 @@ Sender boot starts in sync-only mode:
After valid ACK time:
- `time_set_utc()` is called
- `g_time_acquired=true`
- sender fault counters are reset once (`err_m`, `err_d`, `err_tx`, last-error state)
- normal 1 Hz sampling + periodic batch transmission starts
After initial sync:
- sender fault counters are reset again once per UTC hour when the hour index changes (`HH:00 UTC` boundary)
Timezone:
- `TIMEZONE_TZ` from `include/config.h` is applied in `time_manager`.
- Web/OLED local-time rendering uses this timezone.
@@ -125,6 +130,10 @@ State JSON (`src/json_codec.cpp`) includes:
- `err_last`, `rx_reject`, `rx_reject_text`
- non-zero fault counters when available
Sender fault counter lifecycle:
- counters are cumulative only within the current UTC-hour window after first sync
- counters reset on first valid sender time sync and at each subsequent UTC hour boundary
Home Assistant discovery:
- enabled by `ENABLE_HA_DISCOVERY=true`
- publishes to `homeassistant/sensor/<device_id>/<key>/config`