keshavdv / victron-ble

A Python API to parse Victron Instant Readout BLE advertisements
The Unlicense
102 stars 34 forks source link

[SolarCharger] Wrong data type for battery_voltage and battery_charger_current. #18

Closed DaveDavenport closed 1 year ago

DaveDavenport commented 1 year ago

Describe the bug

I am getting weird very high Currents back when the battery charging number becomes negative.

To Reproduce

Connect to a smartsolar, make sure load is higher then solar input.

Expected behavior

A negative battery charging current

Screenshots

Integrating it in a mqtt bridge. no screenshot.

Desktop (please complete the following information):

In solar_charger.py change Int16ul to Int16sl for battery_voltage and battery_charging_current to fix it.

DaveDavenport commented 1 year ago

Confirmed using documentation provided in #17

DaveDavenport commented 1 year ago

Thanks!