Wait for the required EcoFlow reports in each collection

A Bluetooth collection listened for a fixed 10 seconds and returned the data that arrived. If a required report was late, the snapshot missed shared measurements without notice.

Each decoder now tracks the reports behind the shared measurements. A collection listens for 10 seconds, then until those reports arrive, for at most 30 seconds in total. The new ef_missing_measurements field names the reports that did not arrive. The server log shows one line each time that list changes.

The diagnostic tool now uses the River 2 heartbeat list from the decoder.
This commit is contained in:
tim
2026-10-10 09:03:35 +02:00
parent b569bcf27b
commit 161ae7ee65
9 changed files with 249 additions and 11 deletions
+3 -6
View File
@@ -28,7 +28,9 @@ try:
from bmspy.ecoflow_proto import (
format_payload, format_protobuf, describe_protobuf_field, parse_protobuf_fields,
)
from bmspy.ecoflow_river2 import decode_river2_payload
from bmspy.ecoflow_river2 import (
REQUIRED_HEARTBEATS as RIVER2_REQUIRED_HEARTBEATS, decode_river2_payload,
)
except ImportError as exc:
sys.exit(f"Missing dependency: {exc}\n"
"Run: uv sync --extra ecoflow-bt")
@@ -52,11 +54,6 @@ RIVER3_REQUIRED_GROUPS = {
),
}
RIVER2_REQUIRED_HEARTBEATS = {
"ef_pkt_02_20_02": "PD",
"ef_pkt_03_20_02": "EMS",
"ef_pkt_03_20_32": "BMS",
}
RIVER2_OPTIONAL_HEARTBEATS = {
"ef_pkt_04_20_02": "INV",
"ef_pkt_05_20_02": "MPPT",