syssi / esphome-tianpower-bms

ESPHome component to monitor a Tianpower Battery Management System via BLE
Apache License 2.0
6 stars 0 forks source link

Max and Min cel voltages incorrect #12

Closed thezjo closed 8 months ago

thezjo commented 8 months ago

I found one more problem with the max and min cel voltages. In the case below, the bms min cell voltage = 3.256 and bms max cell voltage = 3.260 based on the 16 individual cell readings.

[19:37:38][I][tianpower_bms_ble:458]: Cell voltages frame (chunk 0) received
[19:37:38][D][tianpower_bms_ble:459]: 55.14.88.0C.BC.0C.BB.0C.BC.0C.BC.0C.B9.0C.B8.0C.BB.0C.BC.AA (20)
[19:37:38][D][sensor:094]: 'bms cell voltage 1': Sending state 3.26000 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 2': Sending state 3.25900 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 3': Sending state 3.26000 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 4': Sending state 3.26000 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 5': Sending state 3.25700 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 6': Sending state 3.25600 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 7': Sending state 3.25900 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 8': Sending state 3.26000 V with 3 decimals of accuracy
[19:37:38][D][tianpower_bms_ble:600]: Send command (handle 0x15): 55.04.89.AA
[19:37:38][I][tianpower_bms_ble:458]: Cell voltages frame (chunk 1) received
[19:37:38][D][tianpower_bms_ble:459]: 55.14.89.0C.BB.0C.BC.0C.BB.0C.BA.0C.BA.0C.BB.0C.BB.0C.BC.AA (20)
[19:37:38][D][sensor:094]: 'bms cell voltage 9': Sending state 3.25900 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 10': Sending state 3.26000 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 11': Sending state 3.25900 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 12': Sending state 3.25800 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 13': Sending state 3.25800 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 14': Sending state 3.25900 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 15': Sending state 3.25900 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms cell voltage 16': Sending state 3.26000 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms min cell voltage': Sending state 3.15400 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms max cell voltage': Sending state 3.29600 V with 3 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms max voltage cell': Sending state 16.00000 with 0 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms min voltage cell': Sending state 9.00000 with 0 decimals of accuracy
[19:37:38][D][sensor:094]: 'bms delta cell voltage': Sending state 0.14200 V with 3 decimals of accuracy
syssi commented 8 months ago

I've pushed a fix. Please compile & flash your device another time and give it a try.