Louisvdw / dbus-serialbattery

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

Minimum cell voltage path on D-Bus has invalid value (False) #50

Closed mpvader closed 2 years ago

mpvader commented 2 years ago

Describe the bug Minimum cell voltage on D-Bus has value False; instead of a numeric value. Seen on the system of de Longis which ahs a Daly 4S BMS, running the sinoweath protocol (?).

This causes issues in Venus OS and also in the VRM data ingestion system.

Please don't only fix that path, but make sure that also other paths cannot do this.

Its seen only sometimes, so maybe this is during startup, or some other exceptional situation.

The data as sent to VRM is:

    ["mcV"]=>
    array(1) {
      [1]=>
      string(5) "False"
    }

And the error in our VRM ingestion system is is:

InfluxException: HTTP code: 500. {"error":"write failed: partial write: field type conflict: input field \"value\" on measurement \"173\" is type boolean, already exists as type float dropped=1"}

To Reproduce I don't know

Expected behavior Either publish a valid numeric value, typically a float. Or a dbus-invalid value, (let me know if you don't know what that is), or don't publish the path at all.

Screenshots

VenusOS (please complete the following information):

Battery/BMS (please complete the following information):

Additional context I'll ask the user of the system to add more information to this issue if necessary. I'm from Victron, and just posting this to reduce the amount or errors and warnings seen in our monitoring system.

mpvader commented 2 years ago

Ps. looking at the data, perhaps whats being sent here is supposed to be a what we call "D-Bus invalid". But just a slightly wrong one.

See here the Python definition of dbus-invalid: https://github.com/victronenergy/velib_python/blob/master/ve_utils.py#L12.

Which is an empty array. Not an array with a boolean or string in it.

unifiedcommsguy commented 2 years ago

Thankyou @mpvader for reporting this for me.

@Louisvdw I am able to assist with the permission of Victron once the code has been validated.

Louisvdw commented 2 years ago

Thanks for reporting. I will see if I can find where the issue might be or let you know if I need more information.

Louisvdw commented 2 years ago

@unifiedcommsguy can you please test using the new build https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v0.9beta2 https://github.com/Louisvdw/dbus-serialbattery/wiki/How-to-install