Add River 2 Bluetooth telemetry and diagnostics

Decode River 2 charge, temperature, power flow, and time estimates. Preserve precise charge readings across packet reordering and omit unavailable time estimates.

Require valid PD, EMS, and BMS core heartbeats for diagnostic completion. Report optional packets separately and support raw watch output with reliable disconnect cleanup. Use synthetic regression tests and keep captures, credentials, and external keydata private.

Device details come from command-line arguments or discovery. This commit retains Poetry; the separate packaging commit migrates to uv.
This commit is contained in:
tim
2026-10-08 14:02:45 +02:00
parent 90388d2800
commit 886991caf3
16 changed files with 4093 additions and 11 deletions
+9
View File
@@ -5,6 +5,10 @@ description = "bmspy is a tool to get information from a xiaoxiang-type BMS syst
authors = ["Timothy Allen <tim@treehouse.org.za>"]
license = "CC BY-NC-SA 4.0"
readme = "README.md"
include = [
{path = "docs/ecoflow-river2-fields.md", format = "sdist"},
{path = "tools/ecoflow-bt.py", format = "sdist"},
]
[tool.poetry.dependencies]
python = ">=3.12,<4.0"
@@ -12,10 +16,14 @@ pyserial = ">=3.5"
influxdb3-python = {version = ">=0.19.0", optional = true, extras = ["influxdb"]}
typing-extensions = {version = ">=4.13", optional = true, extras = ["influxdb"]}
prometheus-client = {version = ">=0.11.0", optional = true, extras = ["prometheus"]}
bleak = {version = ">=0.21.0", optional = true, extras = ["ecoflow-bt"]}
ecdsa = {version = ">=0.19.0", optional = true, extras = ["ecoflow-bt"]}
pycryptodome = {version = ">=3.20.0", optional = true, extras = ["ecoflow-bt"]}
[tool.poetry.extras]
influxdb = ["influxdb3-python", "typing-extensions"]
prometheus = ["prometheus-client"]
ecoflow-bt = ["bleak", "ecdsa", "pycryptodome"]
[tool.poetry.group.dev.dependencies]
pytest = ">=8.0"
@@ -38,3 +46,4 @@ bmspy-influxdb = "bmspy.influxdb:main"
bmspy-prometheus = "bmspy.prometheus:main"
bmspy-ups = "bmspy.ups:main"
bmspy-usbd = "bmspy.usbhid:main"
bmspy-ecoflow-login = "bmspy.ecoflow_login:main"