Louisvdw / dbus-serialbattery

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

#8 Internal calculation error -> battery.py line #490 #1117

Closed PeerD closed 2 weeks ago

PeerD commented 2 weeks ago

Describe the bug

I recieved the #8 Internal calculation error two time the last day (fresh setup) with the latest driver version.

First time this occured was yesterday. I connected 1 of my 3 battery banks and after a few minutes (out of the blue) the cerbo beeped and I got this error.

Then I connected all three batteries and it run throughout the night with no problem.

Today I installed aggregate batteries, configured it and used its command to restart serialbattery. Then I got this error again (on the same bank). It runs on a newer hardware version (20230601) of JK than the other two banks (20220701).

The battery now shows state error (not sure how to reset) but otherwise seems to work fine.

How to reproduce

First time: I installed serialbattery on a fresh cerbo gx. Connected 1 battery and after like 10 minutes this error came.

Second time: after installing and configuring aggregate battery and restarting serial battery with their script, banks 2 and 3 were found immediately. Bank 1 took like 30 seconds longer and then when found, threw this error after a few seconds.

Expected behavior

No errors or the ability to clear the error

Driver version

1.3.20240705

Venus OS device type

Cerbo GX

Venus OS version

v3.41

BMS type

JKBMS / Heltec BMS

Cell count

16

Battery count

3

Connection type

Serial USB adapter to TTL

Config file

[DEFAULT]

; If you want to add custom values/settings, then check the values/settings you want to change in "config.default.ini"
; and insert them below to persist future driver updates.

; --------- Battery Current limits ---------
MAX_BATTERY_CHARGE_CURRENT    = 50.0
MAX_BATTERY_DISCHARGE_CURRENT = 100.0

; --------- Cell Voltages ---------
; Description:
;     Cell min/max voltages which are used for:
;         - Calculating the min/max battery voltage
;         - Trigger the SoC reset when SoC calculation is enabled
; Example:
;     16 cells * 3.45 V/cell = 55.2 V max charge voltage.
;     16 cells * 2.90 V/cell = 46.4 V min discharge voltage
MIN_CELL_VOLTAGE   = 3.000
; Max voltage (can seen as absorption voltage)
MAX_CELL_VOLTAGE   = 3.550
; Float voltage (can be seen as resting voltage)
FLOAT_CELL_VOLTAGE = 3.300

; --------- Cell Voltage Current limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be in-/decreased depending on min and max cell voltages
; Example:
;     18 cells * 3.55 V/cell = 63.9 V max charge voltage
;     18 cells * 2.70 V/cell = 48.6 V min discharge voltage
;     But in reality not all cells reach the same voltage at the same time. The (dis)charge current
;     will be (in-/)decreased, if even ONE SINGLE BATTERY CELL reaches the limits

; Charge current control management referring to cell-voltage enable (True/False).
CCCM_CV_ENABLE = True
; Discharge current control management referring to cell-voltage enable (True/False).
DCCM_CV_ENABLE = True

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
CELL_VOLTAGES_WHILE_CHARGING      = 3.55, 3.50, 3.45, 3.40
MAX_CHARGE_CURRENT_CV_FRACTION    =    0, 0.05,  0.5,    1

CELL_VOLTAGES_WHILE_DISCHARGING   = 2.90, 3.00, 3.05, 3.10
MAX_DISCHARGE_CURRENT_CV_FRACTION =    0,  0.1,  0.5,    1

; --------- Additional settings ---------
; Specify one or more BMS types to load else leave empty to try to load all available
; Available BMS:
;     Daly, Ecs, EG4_Lifepower, EG4_LL, HeltecModbus, HLPdataBMS4S, Jkbms, Jkbms_pb, LltJbd, Renogy, Seplos
; Available BMS, but disabled by default (just enter one or more below and it will be enabled):
;     ANT, MNB, Sinowealth
BMS_TYPE = Jkbms

Relevant log output

2024-08-27 15:27:04.828102500 INFO:SerialBattery:
2024-08-27 15:27:04.828784500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 15:27:04.832941500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 15:27:04.833626500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 15:27:20.848712500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 15:27:20.848724500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:27:21.135714500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:27:21.643418500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-27 15:27:21.644114500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:27:21.917452500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:27:22.427063500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-27 15:27:22.428346500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:27:22.711894500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:27:23.217440500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-27 15:28:00.360092500 INFO:SerialBattery:
2024-08-27 15:28:00.360780500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 15:28:00.362739500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 15:28:00.363360500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 15:28:16.368580500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 15:28:16.369424500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:28:16.639785500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:28:17.147730500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-27 15:28:17.148426500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:28:17.425216500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:28:17.933878500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-27 15:28:17.934932500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:28:18.204001500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:28:18.712584500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-27 15:29:28.120228500 *** CCGX booted (0) ***
2024-08-27 15:30:09.499218500 INFO:SerialBattery:
2024-08-27 15:30:09.500094500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 15:30:09.505259500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 15:30:09.506223500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 15:30:25.523536500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 15:30:25.524460500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:30:25.823562500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:30:26.329821500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-27 15:30:26.330757500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:30:26.624091500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:30:27.131072500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-27 15:30:27.131080500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:30:27.414911500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:30:27.921813500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-27 15:31:36.058632500 INFO:SerialBattery:
2024-08-27 15:31:36.059725500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 15:31:36.061971500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 15:31:36.062903500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 15:31:52.078056500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 15:31:52.079972500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:31:52.358272500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:31:52.869822500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-27 15:31:52.869832500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:31:53.142573500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:31:53.651197500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-27 15:31:53.652130500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:31:53.930008500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:31:54.439498500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-27 15:32:33.190469500 INFO:SerialBattery:
2024-08-27 15:32:33.191171500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 15:32:33.193202500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 15:32:33.193818500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 15:32:49.210003500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 15:32:49.210703500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:32:49.524366500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:32:50.031506500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-27 15:32:50.031519500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:32:50.314618500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:32:50.820165500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-27 15:32:50.821249500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:32:51.094879500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 15:32:51.603415500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-27 15:33:28.581930500 INFO:SerialBattery:
2024-08-27 15:33:28.582619500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 15:33:28.584582500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 15:33:28.585199500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 15:33:44.600468500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 15:33:44.600478500 INFO:SerialBattery:Testing Jkbms
2024-08-27 15:33:44.660365500 INFO:SerialBattery:Connection established to Jkbms
2024-08-27 15:33:47.970800500 INFO:SerialBattery:DeviceInstance = 1
2024-08-27 15:33:47.972964500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_1.pid
2024-08-27 15:33:47.973722500 INFO:SerialBattery:Used DeviceInstances = []
2024-08-27 15:33:47.974658500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
2024-08-27 15:33:48.019477500 INFO:SerialBattery:publish config values = False
2024-08-27 15:33:48.021417500 INFO:SerialBattery:Battery JKBMS connected to dbus from /dev/ttyUSB1
2024-08-27 15:33:48.022114500 INFO:SerialBattery:========== Settings ==========
2024-08-27 15:33:48.022873500 INFO:SerialBattery:> Connection voltage: 52.7 V | Current: -0.0 A | SoC: 53%
2024-08-27 15:33:48.023559500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2024-08-27 15:33:48.024271500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-08-27 15:33:48.025187500 INFO:SerialBattery:> MIN CELL VOLTAGE: 3.000 V | MAX CELL VOLTAGE: 3.550 V| FLOAT CELL VOLTAGE: 3.300 V
2024-08-27 15:33:48.025969500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 200.0 A
2024-08-27 15:33:48.026731500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 150.0 A (read from BMS)
2024-08-27 15:33:48.027892500 INFO:SerialBattery:> CVCM:     True
2024-08-27 15:33:48.028693500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-08-27 15:33:48.029963500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-08-27 15:33:48.030782500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-08-27 15:33:48.031513500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: True
2024-08-27 15:33:48.032227500 INFO:SerialBattery:Serial Number/Unique Identifier: Bank3_Safira_B1
2024-08-27 15:33:48.288728500 INFO:SerialBattery:DeviceInstance = 1
2024-08-27 15:33:48.289517500 INFO:SerialBattery:Changed DeviceInstance = 1
2024-08-27 15:33:48.291553500 INFO:SerialBattery:Changed CustomName = SerialBattery(JKBMS)
2024-08-27 15:35:05.854753500 INFO:SerialBattery:Changed CustomName = Bank 1
2024-08-27 16:27:14.318432500 *** CCGX booted (0) ***
2024-08-27 16:28:47.102919500 INFO:SerialBattery:
2024-08-27 16:28:47.103578500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 16:28:47.107585500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 16:28:47.108234500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 16:29:03.122430500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 16:29:03.123279500 INFO:SerialBattery:Testing Jkbms
2024-08-27 16:29:03.253627500 INFO:SerialBattery:Connection established to Jkbms
2024-08-27 16:29:05.633583500 INFO:SerialBattery:Found existing battery with DeviceInstance = 1
2024-08-27 16:29:05.961641500 INFO:SerialBattery:DeviceInstance = 1
2024-08-27 16:29:05.963533500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_1.pid
2024-08-27 16:29:05.964261500 INFO:SerialBattery:Used DeviceInstances = ['1']
2024-08-27 16:29:05.965101500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
2024-08-27 16:29:05.995822500 INFO:SerialBattery:publish config values = False
2024-08-27 16:29:05.997896500 INFO:SerialBattery:Battery JKBMS connected to dbus from /dev/ttyUSB1
2024-08-27 16:29:05.998520500 INFO:SerialBattery:========== Settings ==========
2024-08-27 16:29:05.999228500 INFO:SerialBattery:> Connection voltage: 52.7 V | Current: -0.0 A | SoC: 53%
2024-08-27 16:29:05.999833500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2024-08-27 16:29:06.000407500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-08-27 16:29:06.001061500 INFO:SerialBattery:> MIN CELL VOLTAGE: 3.000 V | MAX CELL VOLTAGE: 3.550 V| FLOAT CELL VOLTAGE: 3.300 V
2024-08-27 16:29:06.001674500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 200.0 A
2024-08-27 16:29:06.002289500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 150.0 A (read from BMS)
2024-08-27 16:29:06.003058500 INFO:SerialBattery:> CVCM:     True
2024-08-27 16:29:06.003756500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-08-27 16:29:06.004368500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-08-27 16:29:06.004955500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-08-27 16:29:06.005546500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: True
2024-08-27 16:29:06.006619500 INFO:SerialBattery:Serial Number/Unique Identifier: Bank3_Safira_B1
2024-08-27 16:29:06.108063500 INFO:SerialBattery:Changed CustomName = Bank 1
2024-08-27 16:49:17.333228500 *** CCGX booted (0) ***
2024-08-27 16:49:44.549984500 INFO:SerialBattery:
2024-08-27 16:49:44.550752500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 16:49:44.585934500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 16:49:44.586829500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 16:50:00.600203500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 16:50:00.600215500 INFO:SerialBattery:Testing Jkbms
2024-08-27 16:50:00.884385500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 16:50:01.386619500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-27 16:50:01.387321500 INFO:SerialBattery:Testing Jkbms
2024-08-27 16:50:01.660243500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 16:50:02.163189500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-27 16:50:02.163384500 INFO:SerialBattery:Testing Jkbms
2024-08-27 16:50:02.456048500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-27 16:50:02.957505500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-27 16:50:04.790667500 INFO:SerialBattery:
2024-08-27 16:50:04.795224500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 16:50:04.802644500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 16:50:04.803700500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 16:50:20.819967500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 16:50:20.822048500 INFO:SerialBattery:Testing Jkbms
2024-08-27 16:50:20.948437500 INFO:SerialBattery:Connection established to Jkbms
2024-08-27 16:50:24.294103500 INFO:SerialBattery:Found existing battery with DeviceInstance = 1
2024-08-27 16:50:24.565062500 INFO:SerialBattery:DeviceInstance = 1
2024-08-27 16:50:24.566624500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_1.pid
2024-08-27 16:50:24.567431500 INFO:SerialBattery:Used DeviceInstances = ['1']
2024-08-27 16:50:24.568315500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
2024-08-27 16:50:24.618648500 INFO:SerialBattery:publish config values = False
2024-08-27 16:50:24.621560500 INFO:SerialBattery:Battery JKBMS connected to dbus from /dev/ttyUSB1
2024-08-27 16:50:24.621567500 INFO:SerialBattery:========== Settings ==========
2024-08-27 16:50:24.622332500 INFO:SerialBattery:> Connection voltage: 52.7 V | Current: -0.0 A | SoC: 53%
2024-08-27 16:50:24.623068500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2024-08-27 16:50:24.623805500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-08-27 16:50:24.624632500 INFO:SerialBattery:> MIN CELL VOLTAGE: 3.000 V | MAX CELL VOLTAGE: 3.550 V| FLOAT CELL VOLTAGE: 3.300 V
2024-08-27 16:50:24.625414500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 200.0 A
2024-08-27 16:50:24.626203500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 150.0 A (read from BMS)
2024-08-27 16:50:24.627131500 INFO:SerialBattery:> CVCM:     True
2024-08-27 16:50:24.627963500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-08-27 16:50:24.628848500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-08-27 16:50:24.629765500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-08-27 16:50:24.630842500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: True
2024-08-27 16:50:24.631627500 INFO:SerialBattery:Serial Number/Unique Identifier: Bank3_Safira_B1
2024-08-27 16:50:25.672853500 ERROR:SerialBattery:CRC checksum mismatch: Expected 0x5072, Got 0x4fcd
2024-08-27 16:50:25.674958500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #490
2024-08-27 16:50:25.677382500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-27 16:50:25.679650500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-27 16:50:25.858198500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1061
2024-08-27 16:50:36.684389500 ERROR:SerialBattery:CRC checksum mismatch: Expected 0x5076, Got 0x4fd1
2024-08-27 16:51:04.671731500 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:20/51034]
2024-08-27 17:17:05.082094500 *** CCGX booted (0) ***
2024-08-27 17:17:30.359175500 INFO:SerialBattery:
2024-08-27 17:17:30.359927500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-27 17:17:30.383403500 INFO:SerialBattery:Venus OS v3.41
2024-08-27 17:17:30.387380500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-27 17:17:46.401100500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-27 17:17:46.401965500 INFO:SerialBattery:Testing Jkbms
2024-08-27 17:17:46.464578500 INFO:SerialBattery:Connection established to Jkbms
2024-08-27 17:17:50.558232500 INFO:SerialBattery:Found existing battery with DeviceInstance = 1
2024-08-27 17:17:50.955898500 INFO:SerialBattery:DeviceInstance = 1
2024-08-27 17:17:50.958500500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_1.pid
2024-08-27 17:17:50.959727500 INFO:SerialBattery:Used DeviceInstances = ['1']
2024-08-27 17:17:50.961164500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
2024-08-27 17:17:51.085491500 INFO:SerialBattery:publish config values = False
2024-08-27 17:17:51.088676500 INFO:SerialBattery:Battery JKBMS connected to dbus from /dev/ttyUSB1
2024-08-27 17:17:51.089836500 INFO:SerialBattery:========== Settings ==========
2024-08-27 17:17:51.091121500 INFO:SerialBattery:> Connection voltage: 52.7 V | Current: -0.0 A | SoC: 53%
2024-08-27 17:17:51.092297500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2024-08-27 17:17:51.093474500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-08-27 17:17:51.094923500 INFO:SerialBattery:> MIN CELL VOLTAGE: 3.000 V | MAX CELL VOLTAGE: 3.550 V| FLOAT CELL VOLTAGE: 3.300 V
2024-08-27 17:17:51.096267500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 200.0 A
2024-08-27 17:17:51.097558500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 150.0 A (read from BMS)
2024-08-27 17:17:51.098744500 INFO:SerialBattery:> CVCM:     True
2024-08-27 17:17:51.115219500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-08-27 17:17:51.116126500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-08-27 17:17:51.117056500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-08-27 17:17:51.117933500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: True
2024-08-27 17:17:51.118830500 INFO:SerialBattery:Serial Number/Unique Identifier: Bank3_Safira_B1
2024-08-28 03:02:12.635541500 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:229/33025]
2024-08-28 03:57:35.472181500 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:229/33025]
2024-08-28 07:15:16.327165500 INFO:SerialBattery:
2024-08-28 07:15:16.328418500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-28 07:15:16.331333500 INFO:SerialBattery:Venus OS v3.41
2024-08-28 07:15:16.332423500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-28 07:15:32.344697500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-28 07:15:32.345486500 INFO:SerialBattery:Testing Jkbms
2024-08-28 07:15:32.667367500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-28 07:15:33.172391500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-28 07:15:33.172402500 INFO:SerialBattery:Testing Jkbms
2024-08-28 07:15:33.461052500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-28 07:15:33.964032500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-28 07:15:33.964042500 INFO:SerialBattery:Testing Jkbms
2024-08-28 07:15:34.258509500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2024-08-28 07:15:34.762728500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
2024-08-28 07:15:38.551190500 INFO:SerialBattery:
2024-08-28 07:15:38.552348500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-28 07:15:38.555458500 INFO:SerialBattery:Venus OS v3.41
2024-08-28 07:15:38.556467500 INFO:SerialBattery:dbus-serialbattery v1.3.20240705
2024-08-28 07:15:54.573918500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-28 07:15:54.573929500 INFO:SerialBattery:Testing Jkbms
2024-08-28 07:15:54.644739500 INFO:SerialBattery:Connection established to Jkbms
2024-08-28 07:15:58.737414500 INFO:SerialBattery:Found existing battery with DeviceInstance = 1
2024-08-28 07:15:59.064741500 INFO:SerialBattery:DeviceInstance = 1
2024-08-28 07:15:59.067097500 INFO:SerialBattery:PID file created successfully: /var/tmp/dbus-serialbattery_1.pid
2024-08-28 07:15:59.068708500 INFO:SerialBattery:Used DeviceInstances = ['2', '1', '3']
2024-08-28 07:15:59.069863500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
2024-08-28 07:15:59.116631500 INFO:SerialBattery:publish config values = False
2024-08-28 07:15:59.119229500 INFO:SerialBattery:Battery JKBMS connected to dbus from /dev/ttyUSB1
2024-08-28 07:15:59.120458500 INFO:SerialBattery:========== Settings ==========
2024-08-28 07:15:59.121549500 INFO:SerialBattery:> Connection voltage: 52.7 V | Current: -0.0 A | SoC: 53%
2024-08-28 07:15:59.122523500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2024-08-28 07:15:59.123473500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2024-08-28 07:15:59.124791500 INFO:SerialBattery:> MIN CELL VOLTAGE: 3.000 V | MAX CELL VOLTAGE: 3.550 V| FLOAT CELL VOLTAGE: 3.300 V
2024-08-28 07:15:59.125834500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 50.0 A | MAX BATTERY DISCHARGE CURRENT: 100.0 A
2024-08-28 07:15:59.126944500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 100.0 A | MAX BATTERY DISCHARGE CURRENT: 150.0 A (read from BMS)
2024-08-28 07:15:59.127927500 INFO:SerialBattery:> CVCM:     True
2024-08-28 07:15:59.128966500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2024-08-28 07:15:59.129978500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2024-08-28 07:15:59.131060500 INFO:SerialBattery:> CCCM SOC: False | DCCM SOC: False
2024-08-28 07:15:59.132259500 INFO:SerialBattery:> CHARGE FET: True | DISCHARGE FET: True | BALANCE FET: True
2024-08-28 07:15:59.133286500 INFO:SerialBattery:Serial Number/Unique Identifier: Bank3_Safira_B1
2024-08-28 07:16:00.170870500 ERROR:SerialBattery:CRC checksum mismatch: Expected 0x50d1, Got 0x502c
2024-08-28 07:16:00.174800500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #490
2024-08-28 07:16:00.185295500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 07:16:00.187553500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 07:16:00.434335500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1061
2024-08-28 07:16:01.167832500 ERROR:SerialBattery:CRC checksum mismatch: Expected 0x50d4, Got 0x502f
2024-08-28 07:16:01.170106500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #490
2024-08-28 07:16:01.175677500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 07:16:01.185755500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 07:16:01.191485500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1061
2024-08-28 07:16:13.229357500 ERROR:SerialBattery:CRC checksum mismatch: Expected 0x50d1, Got 0x502c
2024-08-28 07:16:44.257267500 ERROR:SerialBattery:>>> ERROR: No reply - returning [len:11/57576]

Any other information that may be helpful

I saw issue #1110 but there it was requested to open a new issue as this is not a daly bms when another person mentioned they got the same issue on jk.

mr-manuel commented 2 weeks ago

It seems, that you don't have a stable wired connection. Is the serial cable shielded?

Anyway, unfortunately you did not read carefully the instructions when opening an issue, but at least you provided the correct logs :-)

Here again:

🚨 IMPORTANT 🚨

PeerD commented 2 weeks ago

Oh, I'm terriby sorry. I missed that one. I have installed it now and the error is gone :)

But now I have ever device twice. The name of the battery is still the custom one I gave but it shows them twice now:

Screenshot 2024-08-28 at 10 18 00
mr-manuel commented 2 weeks ago

If you reboot or go to the bottom of the list, you can remove the Not Connected devices. This is because with the latest driver the dbus service name of the driver changed. Nothing to worry about.

PeerD commented 2 weeks ago

I, it seems I was too quick. Now suddenly all three battery banks threw this error at the same time:


2024-08-28 08:23:07.724850500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:07.724858500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:08.720964500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:08.721961500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:08.723311500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:08.727952500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:09.721759500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:09.722746500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:09.724244500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:09.728665500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:10.719404500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:10.720398500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:10.721723500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:10.726459500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:11.808814500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:11.810046500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:11.811561500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:11.820397500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:12.789732500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:12.790679500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:12.792100500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:12.797615500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:13.723212500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:13.724355500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:13.725713500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:13.730345500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:14.728201500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:14.729175500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:14.730478500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:14.736075500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:15.728650500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:15.729592500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:15.732164500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:15.737016500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142
2024-08-28 08:23:16.726843500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/battery.py line #628
2024-08-28 08:23:16.727936500 WARNING:SerialBattery:calcMaxChargeCurrentReferringToCellVoltage(): get_max_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:16.729397500 WARNING:SerialBattery:calcMaxDischargeCurrentReferringToCellVoltage(): get_min_cell_voltage() is None, using default current instead. If you don't see this warning very often, you can ignore it.
2024-08-28 08:23:16.764228500 ERROR:SerialBattery:Non blocking exception occurred: TypeError("unsupported operand type(s) for -: 'NoneType' and 'NoneType'") of type <class 'TypeError'> in /opt/victronenergy/dbus-serialbattery/dbushelper.py line #1142```
PeerD commented 2 weeks ago

Aggregate Batteries was not able to run (it seems it was supplied NoneType Values).

ERROR:root:Wed Aug 28 08:29:11 2024: Error: '>' not supported between instances of 'NoneType' and 'NoneType'.
ERROR:root:Occured during step Find max. and min. cell voltage of all batteries, Battery Bank 1.

I did a restart for good measure and now it seems to run and aggregate batteries is also running again normally.

The strange thing is that all three banks threw the error this time at the same time. If it would be a bad serial connection on bank 1, this should not affect bank 2 or 3 that have not thrown any errors until now?

mr-manuel commented 2 weeks ago

It should not be connected, except you are using a USB hub.

PeerD commented 2 weeks ago

Yes, I am using a hub as the cerbo only has two usb ports. Is it possible to connect multiple JK via a single serial adapter? I thought each bms needed its own adapter.

Anyways, now it seems to run fine.

Thank you very much for your support and this great project!

mr-manuel commented 2 weeks ago

In your case you need one UART/TTL port per BMS. The DuPPa.net Isolated 4 port USB to TTL UART FTDI is very stable.