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:
+3
-6
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user