Louisvdw / dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
MIT License
525 stars 164 forks source link

/Alarms/HighCellVoltage" is never updated since function dbushelper::publish_dbus() never published this entry. #240

Closed demoze closed 1 year ago

demoze commented 1 year ago

Describe the bug

I don't know if this is a bug, it seems "/Alarms/HighCellVoltage" is never updated since function dbushelper::publish_dbus() never published this entry.

!! OK forget about it, after more research there is no provision in the code for now to handle, this entry ;-)

To Reproduce `well there is no code to publish this entry "/Alarms/HighCellVoltage" unless I missed something.

Expected behavior Expect to see "/Alarms/HighCellVoltage" with a not null value published.

Screenshots

VenusOS (please complete the following information): I'am running the code on a standard linux distribution => dbus-serialbattery v0.13 by mocking all the dbus infrastructure, and mocking a jkbms. But you should see the same thing on dbus if you monitor /Alarms/HighCellVoltage it stay to null, since it is never published.

$ python3 dbus-serialbattery.py

[2022-10-06 02:51:47,769] p3540 INFO {dbus-serialbattery.py:50} - Starting dbus-serialbattery [2022-10-06 02:51:47,770] p3540 INFO {dbus-serialbattery.py:104} - dbus-serialbattery v0.13 [2022-10-06 02:51:47,770] p3540 INFO {dbus-serialbattery.py:101} - No Port needed [2022-10-06 02:51:47,770] p3540 INFO {dbus-serialbattery.py:85} - Testing LltJbd [2022-10-06 02:51:48,034] p3540 ERROR {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/utils.py:130} - >>> ERROR: No reply - returning [2022-10-06 02:51:48,034] p3540 INFO {dbus-serialbattery.py:85} - Testing Ant [2022-10-06 02:51:48,297] p3540 ERROR {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/utils.py:130} - >>> ERROR: No reply - returning [2022-10-06 02:51:48,298] p3540 ERROR {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/ant.py:108} - >>> ERROR: Incorrect Data [2022-10-06 02:51:48,298] p3540 INFO {dbus-serialbattery.py:85} - Testing Daly [2022-10-06 02:51:48,562] p3540 ERROR {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/utils.py:130} - >>> ERROR: No reply - returning [2022-10-06 02:51:48,562] p3540 INFO {dbus-serialbattery.py:85} - Testing Daly [2022-10-06 02:51:48,826] p3540 ERROR {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/utils.py:130} - >>> ERROR: No reply - returning [2022-10-06 02:51:48,826] p3540 INFO {dbus-serialbattery.py:85} - Testing Jkbms [2022-10-06 02:51:49,090] p3540 ERROR {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/utils.py:130} - >>> ERROR: No reply - returning [2022-10-06 02:51:49,091] p3540 INFO {dbus-serialbattery.py:85} - Testing Jkdumb [2022-10-06 02:51:49,091] p3540 INFO {dbus-serialbattery.py:87} - Connection established to Jkdumb [2022-10-06 02:51:49,092] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/battery.py:339} - Battery connected to dbus from /dev/tty53 [2022-10-06 02:51:49,092] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/battery.py:340} - === Settings === [2022-10-06 02:51:49,092] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/battery.py:342} - > Connection voltage 55.55V | current -44.44A | SOC 77% [2022-10-06 02:51:49,092] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/battery.py:343} - > Cell count 16 | cells populated 0 [2022-10-06 02:51:49,093] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/battery.py:344} - > CCL Charge NoneA | DCL Discharge NoneA [2022-10-06 02:51:49,093] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/vendor/dbus-serialbattery/etc/dbus-serialbattery/battery.py:345} - > MIN_CELL_VOLTAGE 2.9V | MAX_CELL_VOLTAGE 3.45V [2022-10-06 02:51:49,093] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/dbushelper.py:50} - DeviceInstance = 1 [2022-10-06 02:51:49,094] p3540 INFO {/home/sabidal/BMS/vbms-pi/vbms-pi/dbushelper.py:65} - com.victronenergy.battery.tty53 { "/Mgmt/Timestamp": 22825666773000, "/Mgmt/Sequence": 0, "/Mgmt/ProcessName": "/home/sabidal/BMS/vbms-pi/vbms-pi/dbushelper.py", "/Mgmt/ProcessVersion": "Python 3.8.10", "/Mgmt/Connection": "Serial /dev/tty53", "/DeviceInstance": 1, "/ProductId": 0, "/ProductName": "SerialBattery(Jkdumb) v0.13", "/FirmwareVersion": "202209250123456", "/HardwareVersion": "JKDUMB 16 cells", "/Connected": 1, "/Info/BatteryLowVoltage": 46.4, "/Info/MaxChargeVoltage": 55.2, "/Info/MaxChargeCurrent": 50.0, "/Info/MaxDischargeCurrent": 60.0, "/System/NrOfCellsPerBattery": 16, "/System/NrOfModulesOnline": 1, "/System/NrOfModulesOffline": 0, "/System/NrOfModulesBlockingCharge": 0, "/System/NrOfModulesBlockingDischarge": 0, "/Capacity": 215.6, "/InstalledCapacity": 280, "/ConsumedAmphours": 64.4, "/Soc": 77, "/Dc/0/Voltage": 55.55, "/Dc/0/Current": -44.44, "/Dc/0/Power": -2468.64, "/Dc/0/Temperature": 60.5, "/Dc/0/MidVoltage": null, "/Dc/0/MidVoltageDeviation": null, "/System/MinCellTemperature": 55, "/System/MaxCellTemperature": 66, "/System/MaxCellVoltage": 3.405, "/System/MaxVoltageCellId": "C1", "/System/MinCellVoltage": 3.405, "/System/MinVoltageCellId": "C1", "/History/ChargeCycles": 13, "/History/TotalAhDrawn": null, "/Balancing": 0, "/Io/AllowToCharge": 1, "/Io/AllowToDischarge": 1, "/Alarms/LowVoltage": 0, "/Alarms/HighVoltage": 0, "/Alarms/LowCellVoltage": 0, "/Alarms/HighCellVoltage": null, "/Alarms/LowSoc": 0, "/Alarms/HighChargeCurrent": 0, "/Alarms/HighDischargeCurrent": 0, "/Alarms/CellImbalance": 0, "/Alarms/InternalFailure": null, "/Alarms/HighChargeTemperature": 0, "/Alarms/LowChargeTemperature": 0, "/Alarms/HighTemperature": 0, "/Alarms/LowTemperature": 0, "/Voltages/Cell1": 3.405, "/Balances/Cell1": 0, "/Voltages/Cell2": 3.405, "/Balances/Cell2": 0, "/Voltages/Cell3": 3.405, "/Balances/Cell3": 0, "/Voltages/Cell4": 3.405, "/Balances/Cell4": 0, "/Voltages/Cell5": 3.405, "/Balances/Cell5": 0, "/Voltages/Cell6": 3.405, "/Balances/Cell6": 0, "/Voltages/Cell7": 3.405, "/Balances/Cell7": 0, "/Voltages/Cell8": 3.405, "/Balances/Cell8": 0, "/Voltages/Cell9": 3.405, "/Balances/Cell9": 0, "/Voltages/Cell10": 3.405, "/Balances/Cell10": 0, "/Voltages/Cell11": 3.405, "/Balances/Cell11": 0, "/Voltages/Cell12": 3.405, "/Balances/Cell12": 0, "/Voltages/Cell13": 3.405, "/Balances/Cell13": 0, "/Voltages/Cell14": 3.405, "/Balances/Cell14": 0, "/Voltages/Cell15": 3.405, "/Balances/Cell15": 0, "/Voltages/Cell16": 3.405, "/Balances/Cell16": 0, "/Voltages/Sum": 54.48000000000001, "/Voltages/Diff": 0.0 }`

Battery/BMS (please complete the following information): this is independent of any bms

Additional context None.

demoze commented 1 year ago

Not a bug