You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
victron_mqtt: battery power sign is most likely inverted #255
victron_mqtt on main emits the battery power as W = -bat_w, with the comment "Victron: positive power = discharging".
Victron's Venus D-Bus documentation says the opposite for the battery service: /Dc/0/Power and /Dc/0/Current are "positive when charged, negative when discharged". /Dc/Battery/Power on the system service is the same measurement. This repository's own victron.lua reads the same D-Bus value through Modbus register 842 and does not negate it. Our sign convention is battery charge positive (docs/WRITING-A-DRIVER.md, "Sign convention").
So victron_mqtt most likely shows charging as discharging. Nobody has measured it on a real GX yet.
To settle it: on a GX, read Dc/Battery/Power from MQTT while the battery charges (SoC rising) and while it discharges, and compare the sign. Then fix the driver and add a harness test.
The driver is read_only, so this affects telemetry, planning input and the site balance, not commands.
Found in the review of #254, which leaves the sign alone on purpose.
Activity
fix(victron_mqtt): keep Victron's battery power sign, charge positive…
fix(victron_mqtt): keep Victron's battery power sign, charge positive…