Update docs for auth, time, discovery, and history changes
This commit is contained in:
30
README.md
30
README.md
@@ -85,11 +85,13 @@ Sender builds sparse 30-slot windows and sends every `METER_SEND_INTERVAL_MS` (`
|
||||
|
||||
For decoded `BatchUp`:
|
||||
1. Reassemble and decode.
|
||||
2. Send `AckDown` immediately.
|
||||
3. Track duplicates per configured sender (`EXPECTED_SENDER_IDS`).
|
||||
4. If duplicate: update duplicate counters/time, skip data write/publish.
|
||||
5. If `n==0`: sync request path only.
|
||||
6. Else reconstruct each sample timestamp from `t_last + present_mask`, then:
|
||||
2. Validate sender identity (`EXPECTED_SENDER_IDS` and payload sender ID mapping).
|
||||
3. Reject unknown/mismatched senders before ACK and before SD/MQTT/web updates.
|
||||
4. Send `AckDown` promptly for accepted senders.
|
||||
5. Track duplicates per configured sender.
|
||||
6. If duplicate: update duplicate counters/time, skip data write/publish.
|
||||
7. If `n==0`: sync request path only.
|
||||
8. Else reconstruct each sample timestamp from `t_last + present_mask`, then:
|
||||
- append to SD CSV
|
||||
- publish MQTT state
|
||||
- update web status and last batch table
|
||||
@@ -113,25 +115,33 @@ State JSON (`src/json_codec.cpp`) includes:
|
||||
Home Assistant discovery:
|
||||
- enabled by `ENABLE_HA_DISCOVERY=true`
|
||||
- publishes to `homeassistant/sensor/<device_id>/<key>/config`
|
||||
- `unique_id` format is `<device_id>_<key>` (example: `dd3-F19C_energy`)
|
||||
- device metadata:
|
||||
- `identifiers: ["<device_id>"]`
|
||||
- `name: "<device_id>"`
|
||||
- `model: "DD3-LoRa-Bridge"`
|
||||
- `manufacturer: "AcidBurns"`
|
||||
|
||||
## Web UI, Wi-Fi, SD
|
||||
|
||||
- Wi-Fi/MQTT/NTP/web-auth config is stored in Preferences.
|
||||
- AP fallback SSID prefix: `DD3-Bridge-`.
|
||||
- Default web credentials: `admin/admin`.
|
||||
- AP auth requirement is controlled by `WEB_AUTH_REQUIRE_AP` (default `false`).
|
||||
- AP auth requirement is controlled by `WEB_AUTH_REQUIRE_AP` (default `true`).
|
||||
- STA auth requirement is controlled by `WEB_AUTH_REQUIRE_STA` (default `true`).
|
||||
|
||||
Web timestamp display:
|
||||
- human-facing timestamps show `epoch (HH:MM:SS TZ)` in local configured timezone.
|
||||
|
||||
SD CSV logging (`src/sd_logger.cpp`):
|
||||
- header: `ts_utc,ts_hms_utc,p_w,p1_w,p2_w,p3_w,e_kwh,bat_v,bat_pct,rssi,snr,err_m,err_d,err_tx,err_last`
|
||||
- `ts_hms_utc` is UTC `HH:MM:SS`
|
||||
- header: `ts_utc,ts_hms_local,p_w,p1_w,p2_w,p3_w,e_kwh,bat_v,bat_pct,rssi,snr,err_m,err_d,err_tx,err_last`
|
||||
- `ts_hms_local` is local `HH:MM:SS` derived from `TIMEZONE_TZ`
|
||||
|
||||
History parser (`src/web_server.cpp`):
|
||||
- expects the current CSV layout above
|
||||
- legacy CSV layouts are not parsed (no backward compatibility)
|
||||
- accepts both:
|
||||
- current layout (`ts_utc,ts_hms_local,p_w,...`)
|
||||
- legacy layout (`ts_utc,p_w,...`)
|
||||
- requires full numeric parse for `ts_utc` and `p_w` (rejects trailing junk)
|
||||
|
||||
OLED duplicate display:
|
||||
- receiver sender-pages show duplicate rate as `pct (absolute)` and last duplicate as `HH:MM`.
|
||||
|
||||
Reference in New Issue
Block a user