Remove auto-reboot and make timezone configurable

This commit is contained in:
2026-02-13 10:46:58 +01:00
parent 7540af7d71
commit 64afa8621e
4 changed files with 22 additions and 25 deletions

View File

@@ -9,7 +9,9 @@ Firmware for LilyGO T3 v1.6.1 (`ESP32 + SX1276 + SSD1306`) that runs as either:
- Single codebase, role selected at boot via `detect_role()` (`include/config.h`, `src/config.cpp`).
- LoRa link uses explicit CRC16 frame protection in firmware (`src/lora_transport.cpp`).
- Sender batches up to `30` samples and retries on missing ACK (`BATCH_MAX_RETRIES=2`, retry policy `Keep`).
- Sender meter parsing is decoupled from LoRa ACK waits using a dedicated FreeRTOS reader task + queue (`src/main.cpp`).
- Receiver uses STA mode when config is valid, otherwise AP fallback with web config.
- No debug auto-reboot timer is active in normal firmware loops.
## LoRa Frame Protocol (Current)
@@ -54,12 +56,18 @@ Only after valid ACK time is received:
This blocks pre-threshold timestamps from MQTT/SD paths.
Timezone handling:
- Local time rendering uses `TIMEZONE_TZ` from `include/config.h`.
- Default value is `CET-1CEST,M3.5.0/2,M10.5.0/3` and can be changed at compile time.
## Sender Meter Path
Implemented in `src/meter_driver.cpp` + sender loop in `src/main.cpp`:
- UART: `Serial2`, RX pin `GPIO34` (`PIN_METER_RX`), `9600 7E1`
- Frame detection: starts at `'/'`, ends at `'!'`, timeout protection included
- ESP32 RX buffer is enlarged to `8192` bytes to survive long LoRa blocking sections.
- Frame detection: starts at `'/'`, ends at `'!'`, timeout protection included (`METER_FRAME_TIMEOUT_MS=20000`).
- Parsing runs in a dedicated sender task and is handed to the main sender loop via queue.
- Parsed OBIS values:
- `1-0:1.8.0` (total energy)
- `1-0:16.7.0` (total power)