Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EG4 LifePower bugs #648

Closed
najaB76 opened this issue May 17, 2023 · 3 comments
Closed

EG4 LifePower bugs #648

najaB76 opened this issue May 17, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@najaB76
Copy link

najaB76 commented May 17, 2023

Describe the bug

On trying out the beta driver I get an error saying that MAX_BATTERY_CURRENT is not defined.

2023-05-17 16:23:49.433061500     self.max_battery_current = utils.MAX_BATTERY_CURRENT
2023-05-17 16:23:49.433065500 AttributeError: module 'utils' has no attribute 'MAX_BATTERY_CURRENT

This is in dbus-serialbattery/bms/lifepower.py - should be MAX_BATTERY_CHARGE_CURRENT

Then I get the errors:

2023-05-17 16:27:38.818836500 Traceback (most recent call last):
2023-05-17 16:27:38.818845500   File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 371, in publish_battery
2023-05-17 16:27:38.818850500     self.battery.manage_charge_current()
2023-05-17 16:27:38.818853500   File "/opt/victronenergy/dbus-serialbattery/battery.py", line 392, in manage_charge_current
2023-05-17 16:27:38.818859500     ccl = round(min(charge_limits), 3)  # gets changed after finished testing
2023-05-17 16:27:38.818863500 TypeError: '<' not supported between instances of 'NoneType' and 'float'

and

2023-05-17 16:30:57.145394500 Traceback (most recent call last):
2023-05-17 16:30:57.145401500   File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 371, in publish_battery
2023-05-17 16:30:57.145406500     self.battery.manage_charge_current()
2023-05-17 16:30:57.145409500   File "/opt/victronenergy/dbus-serialbattery/battery.py", line 412, in manage_charge_current
2023-05-17 16:30:57.145414500     self.charge_limitation = charge_limits[min(charge_limits)]
2023-05-17 16:30:57.145418500 TypeError: '<' not supported between instances of 'NoneType' and 'float'

Which I have 'fixed' by changing the values to 60 for both. I presume that it's not pulling the correct value from the config file, but it's not immediately obvious where it should be getting them from (more of a PHP/JavaScript guy than Python),

How to reproduce

Install version 1.0.20230508beta on top of version 0.14.3 using install.sh

Expected behavior

Driver should load without throwing errors and respect the charge current limits as per the config file.

Driver version

1.0.20230508beta

Venus OS device type

Raspberry Pi

Venus OS version

v2.93

BMS type

Life/Tian Power

Cell count

8

Connection type

Serial USB adapter to RS485

Config file

[DEFAULT]

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

; --------- Cell Voltages ---------
; Description: Cell min/max voltages which are used to calculate the min/max battery voltage
; Example: 16 cells * 3.45V/cell = 55.2V max charge voltage. 16 cells * 2.90V = 46.4V min discharge voltage
MIN_CELL_VOLTAGE   = 2.900
; Max voltage can seen as absorption voltage
MAX_CELL_VOLTAGE   = 3.450
FLOAT_CELL_VOLTAGE = 3.375

; --------- Bluetooth BMS ---------
; Description: List the Bluetooth BMS here that you want to install
; Example with 1 BMS: Jkbms_Ble C8:47:8C:00:00:00
; Example with 3 BMS: Jkbms_Ble C8:47:8C:00:00:00, Jkbms_Ble C8:47:8C:00:00:11, Jkbms_Ble C8:47:8C:00:00:22
BLUETOOTH_BMS =

; --------- BMS disconnect behaviour ---------
; Description: Block charge and discharge when the communication to the BMS is lost. If you are removing the
;              BMS on purpose, then you have to restart the driver/system to reset the block.
; False: Charge and discharge is not blocked on BMS communication loss
; True: Charge and discharge is blocked on BMS communication loss, it's unblocked when connection is established
;       again or the driver/system is restarted
BLOCK_ON_DISCONNECT = False

; --------- Charge mode ---------
; Choose the mode for voltage / current limitations (True / False)
; False is a step mode: This is the default with limitations on hard boundary steps
; True is a linear mode:
;     For CCL and DCL the values between the steps are calculated for smoother values (by WaldemarFech)
;     For CVL max battery voltage is calculated dynamically in order that the max cell voltage is not exceeded
LINEAR_LIMITATION_ENABLE = True

; Specify in seconds how often the linear values should be recalculated
LINEAR_RECALCULATION_EVERY = 60
; Specify in percent when the linear values should be recalculated immediately
; Example: 5 for a immediate change, when the value changes by more than 5%
LINEAR_RECALCULATION_ON_PERC_CHANGE = 5


; --------- Charge Voltage limitation (affecting CVL) ---------
; Description: Limit max charging voltage (MAX_CELL_VOLTAGE * cell count), switch from max voltage to float
;              voltage (FLOAT_CELL_VOLTAGE * cell count) and back
;     False: Max charging voltage is always kept
;     True: Max charging voltage is reduced based on charge mode
;         Step mode: After max voltage is reached for MAX_VOLTAGE_TIME_SEC it switches to float voltage. After
;                    SoC is below SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT it switches back to max voltage.
;         Linear mode: After max voltage is reachend and cell voltage difference is smaller or equal to
;                      CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL it switches to float voltage after 300 (fixed)
;                      additional seconds. After cell voltage difference is greater or equal to
;                      CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT it switches back to max voltage.
; Example: The battery reached max voltage of 55.2V and hold it for 900 seconds, the the CVL is switched to
;          float voltage of 53.6V to don't stress the batteries. Allow max voltage of 55.2V again, if SoC is
;          once below 90%
;          OR
;          The battery reached max voltage of 55.2V and the max cell difference is 0.010V, then switch to float
;          voltage of 53.6V after 300 additional seconds to don't stress the batteries. Allow max voltage of
;          55.2V again if max cell difference is above 0.050V
; Charge voltage control management enable (True/False).
CVCM_ENABLE = True

; -- CVL reset based on cell voltage diff (linear mode)
; Specify cell voltage diff where CVL limit is kept until diff is equal or lower
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL = 0.010
; Specify cell voltage diff where CVL limit is reset to max voltage, if value get above
; the cells are considered as imbalanced, if the cell diff exceeds 5% of the nominal cell voltage
; e.g. 3.2 V * 5 / 100 = 0.160 V
CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT = 0.080

; -- CVL reset based on SoC option (step mode)
; Specify how long the max voltage should be kept, if reached then switch to float voltage
MAX_VOLTAGE_TIME_SEC = 900
; Specify SoC where CVL limit is reset to max voltage, if value gets below
SOC_LEVEL_TO_RESET_VOLTAGE_LIMIT = 90


; --------- 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.55V/cell = 63.9V max charge voltage
;          18 cells * 2.70V/cell = 48.6V 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.30
MAX_CHARGE_CURRENT_CV_FRACTION =    0, 0.05,  0.5,    1

CELL_VOLTAGES_WHILE_DISCHARGING   = 2.70, 2.80, 2.90, 3.10
MAX_DISCHARGE_CURRENT_CV_FRACTION =    0,  0.1,  0.5,    1


; --------- Temperature limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be in-/decreased depending on temperature
; Example: The temperature limit will be monitored to control the currents. If there are two temperature senors,
;          then the worst case will be calculated and the more secure lower current will be set.
; Charge current control management referring to temperature enable (True/False).
CCCM_T_ENABLE = True
; Charge current control management referring to temperature enable (True/False).
DCCM_T_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
TEMPERATURE_LIMITS_WHILE_CHARGING = 0,   2,   5,  10,  15, 20, 35,  40, 55
MAX_CHARGE_CURRENT_T_FRACTION     = 0, 0.1, 0.2, 0.4, 0.8,  1,  1, 0.4,  0

TEMPERATURE_LIMITS_WHILE_DISCHARGING = -20,   0,   5,  10, 15, 45, 55
MAX_DISCHARGE_CURRENT_T_FRACTION     =   0, 0.2, 0.3, 0.4,  1,  1,  0


; --------- SOC limitation (affecting CCL/DCL) ---------
; Description: Maximal charge / discharge current will be increased / decreased depending on State of Charge,
;              see CC_SOC_LIMIT1 etc.
; Example: The SoC limit will be monitored to control the currents.
; Charge current control management enable (True/False).
CCCM_SOC_ENABLE = True
; Discharge current control management enable (True/False).
DCCM_SOC_ENABLE = True

; Charge current soc limits
CC_SOC_LIMIT1 = 98
CC_SOC_LIMIT2 = 95
CC_SOC_LIMIT3 = 91

; Charge current limits
CC_CURRENT_LIMIT1_FRACTION = 0.1
CC_CURRENT_LIMIT2_FRACTION = 0.3
CC_CURRENT_LIMIT3_FRACTION = 0.5

; Discharge current soc limits
DC_SOC_LIMIT1 = 10
DC_SOC_LIMIT2 = 20
DC_SOC_LIMIT3 = 30

; Discharge current limits
DC_CURRENT_LIMIT1_FRACTION = 0.1
DC_CURRENT_LIMIT2_FRACTION = 0.3
DC_CURRENT_LIMIT3_FRACTION = 0.5


; --------- Time-To-Go ---------
; Description: Calculates the time to go shown in the GUI
;              Recalculation is done based on TIME_TO_SOC_RECALCULATE_EVERY
TIME_TO_GO_ENABLE = True

; --------- Time-To-Soc ---------
; Description: Calculates the time to a specific SoC
; Example: TIME_TO_SOC_POINTS = 50, 25, 15, 0
;          6h 24m remaining until 50% SoC
;          17h 36m remaining until 25% SoC
;          22h 5m remaining until 15% SoC
;          28h 48m remaining until 0% SoC
; Set of SoC percentages to report on dbus and MQTT. The more you specify the more it will impact system performance.
; [Valid values 0-100, comma separated list. More that 20 intervals are not recommended]
; Example: TIME_TO_SOC_POINTS = 100, 95, 90, 85, 75, 50, 25, 20, 10, 0
; Leave empty to disable
TIME_TO_SOC_POINTS =
; Specify TimeToSoc value type [Valid values 1, 2, 3]
; 1 Seconds
; 2 Time string <days>d <hours>h <minutes>m <seconds>s
; 3 Both seconds and time string "<seconds> [<days>d <hours>h <minutes>m <seconds>s]"
TIME_TO_SOC_VALUE_TYPE = 1
; Specify in seconds how often the TimeToSoc should be recalculated
; Minimum are 5 seconds to prevent CPU overload
TIME_TO_SOC_RECALCULATE_EVERY = 60
; Include TimeToSoC points when moving away from the SoC point [Valid values True, False]
; These will be as negative time. Disabling this improves performance slightly
TIME_TO_SOC_INC_FROM = False


; --------- Additional settings ---------
; Specify only one BMS type to load else leave empty to try to load all availabe
; LltJbd, Ant, Daly, Daly, Jkbms, Lifepower, Renogy, Renogy, Ecs
BMS_TYPE =

; Publish the config settings to the dbus path "/Info/Config/"
PUBLISH_CONFIG_VALUES = 1

; Select the format of cell data presented on dbus [Valid values 0,1,2,3]
; 0 Do not publish all the cells (only the min/max cell data as used by the default GX)
; 1 Format: /Voltages/Cell (also available for display on Remote Console)
; 2 Format: /Cell/#/Volts
; 3 Both formats 1 and 2
BATTERY_CELL_DATA_FORMAT = 1

; Simulate Midpoint graph (True/False).
MIDPOINT_ENABLE = False


; Battery temperature
; Specifiy how the battery temperature is assembled
; 0 Get mean of temperature sensor 1 and temperature sensor 2
; 1 Get only temperature from temperature sensor 1
; 2 Get only temperature from temperature sensor 2
TEMP_BATTERY = 0

; Temperature sensor 1 name
TEMP_1_NAME = Temp 1

; Temperature sensor 2 name
TEMP_2_NAME = Temp 2


; --------- BMS specific settings ---------

; -- LltJbd settings
; SoC low levels
; NOTE: SOC_LOW_WARNING is also used to calculate the Time-To-Go even if you are not using a LltJbd BMS
SOC_LOW_WARNING = 20
SOC_LOW_ALARM   = 10

; -- Daly settings
; Battery capacity (amps) if the BMS does not support reading it
BATTERY_CAPACITY = 50
; Invert Battery Current. Default non-inverted. Set to -1 to invert
INVERT_CURRENT_MEASUREMENT = 1

; -- ESC GreenMeter and Lipro device settings
GREENMETER_ADDRESS  = 1
LIPRO_START_ADDRESS = 2
LIPRO_END_ADDRESS   = 4
LIPRO_CELL_COUNT = 15

Relevant log output

2023-05-17 16:31:27.719058500 INFO:SerialBattery:DeviceInstance = 2
2023-05-17 16:31:27.719517500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB0
2023-05-17 16:31:27.750533500 INFO:SerialBattery:Hardware Version:B
2023-05-17 16:31:27.810799500 INFO:SerialBattery:Firmware Version:3QT-YS00-16SV100A-V3.5
2023-05-17 16:31:27.833052500 INFO:SerialBattery:publish config values = 1
2023-05-17 16:31:30.036001500 Traceback (most recent call last):
2023-05-17 16:31:30.036008500   File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 371, in publish_battery
2023-05-17 16:31:30.036013500     self.battery.manage_charge_current()
2023-05-17 16:31:30.036016500   File "/opt/victronenergy/dbus-serialbattery/battery.py", line 412, in manage_charge_current
2023-05-17 16:31:30.036021500     self.charge_limitation = 60 charge_limits[min(charge_limits)]
2023-05-17 16:31:30.036025500 TypeError: '<' not supported between instances of 'NoneType' and 'float'
2023-05-17 16:31:51.453576500 Traceback (most recent call last):
2023-05-17 16:31:51.453582500   File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 22, in <module>
2023-05-17 16:31:51.453587500     from battery import Battery
2023-05-17 16:31:51.453590500   File "/opt/victronenergy/dbus-serialbattery/battery.py", line 412
2023-05-17 16:31:51.453594500     self.charge_limitation = 60 charge_limits[min(charge_limits)]
2023-05-17 16:31:51.453598500                                 ^
2023-05-17 16:31:51.453600500 SyntaxError: invalid syntax
2023-05-17 16:32:14.496194500 INFO:SerialBattery:
2023-05-17 16:32:14.496634500 INFO:SerialBattery:Starting dbus-serialbattery
2023-05-17 16:32:14.497558500 INFO:SerialBattery:dbus-serialbattery v1.0.20230508beta
2023-05-17 16:32:14.497993500 INFO:SerialBattery:Testing Daly
2023-05-17 16:32:15.026280500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:15.026745500 INFO:SerialBattery:No reply to cmd 94
2023-05-17 16:32:15.027161500 WARNING:SerialBattery:No data received in read_status_data()
2023-05-17 16:32:15.552625500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:15.553070500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:16.074539500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:16.075015500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:16.596382500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:16.601940500 WARNING:SerialBattery:No data received in read_battery_code()
2023-05-17 16:32:16.601949500 INFO:SerialBattery:Testing Daly
2023-05-17 16:32:17.123462500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:17.123942500 INFO:SerialBattery:No reply to cmd 94
2023-05-17 16:32:17.124350500 WARNING:SerialBattery:No data received in read_status_data()
2023-05-17 16:32:17.647734500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:17.648314500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:18.172777500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:18.173254500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:18.694336500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:18.694957500 WARNING:SerialBattery:No data received in read_battery_code()
2023-05-17 16:32:18.695890500 INFO:SerialBattery:Testing Ecs
2023-05-17 16:32:18.755916500 INFO:SerialBattery:Testing HLPdataBMS4S
2023-05-17 16:32:23.266918500 INFO:SerialBattery:Testing Jkbms
2023-05-17 16:32:23.532654500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:23.533524500 INFO:SerialBattery:Testing Lifepower
2023-05-17 16:32:23.695494500 INFO:SerialBattery:Connection established to Lifepower
2023-05-17 16:32:23.696130500 INFO:SerialBattery:Battery EG4 Lifepower connected to dbus from /dev/ttyUSB0
2023-05-17 16:32:23.696634500 INFO:SerialBattery:========== Settings ==========
2023-05-17 16:32:23.697189500 INFO:SerialBattery:> Connection voltage: 27.63V | Current: 0.0A | SoC: 100.0%
2023-05-17 16:32:23.697701500 INFO:SerialBattery:> Cell count: 8 | Cells populated: 8
2023-05-17 16:32:23.698227500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-05-17 16:32:23.698758500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 50.0A | MAX BATTERY DISCHARGE CURRENT: 60.0A
2023-05-17 16:32:23.699380500 INFO:SerialBattery:> CVCM:     True
2023-05-17 16:32:23.699915500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-05-17 16:32:23.700443500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2023-05-17 16:32:23.700965500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2023-05-17 16:32:23.701493500 INFO:SerialBattery:> CCCM SOC: True  | DCCM SOC: True
2023-05-17 16:32:23.745824500 INFO:SerialBattery:DeviceInstance = 2
2023-05-17 16:32:23.746674500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB0
2023-05-17 16:32:23.778065500 INFO:SerialBattery:Hardware Version:B
2023-05-17 16:32:23.827806500 INFO:SerialBattery:Firmware Version:3QT-YS00-16SV100A-V3.5
2023-05-17 16:32:23.846835500 INFO:SerialBattery:publish config values = 1
2023-05-17 16:32:54.162159500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:54.162877500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:35:44.351298500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:35:44.352157500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:38:34.546522500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:38:34.547409500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:41:24.749853500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:41:24.750739500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:44:14.950743500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:44:14.951650500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
root@raspberrypi2:~# tail -n 400 /var/log/dbus-serialbattery.ttyUSB0/current | tai64nlocal
2023-05-17 16:31:27.719058500 INFO:SerialBattery:DeviceInstance = 2
2023-05-17 16:31:27.719517500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB0
2023-05-17 16:31:27.750533500 INFO:SerialBattery:Hardware Version:B
2023-05-17 16:31:27.810799500 INFO:SerialBattery:Firmware Version:3QT-YS00-16SV100A-V3.5
2023-05-17 16:31:27.833052500 INFO:SerialBattery:publish config values = 1
2023-05-17 16:31:30.036001500 Traceback (most recent call last):
2023-05-17 16:31:30.036008500   File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 371, in publish_battery
2023-05-17 16:31:30.036013500     self.battery.manage_charge_current()
2023-05-17 16:31:30.036016500   File "/opt/victronenergy/dbus-serialbattery/battery.py", line 412, in manage_charge_current
2023-05-17 16:31:30.036021500     self.charge_limitation = 60 charge_limits[min(charge_limits)]
2023-05-17 16:31:30.036025500 TypeError: '<' not supported between instances of 'NoneType' and 'float'
2023-05-17 16:31:51.453576500 Traceback (most recent call last):
2023-05-17 16:31:51.453582500   File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 22, in <module>
2023-05-17 16:31:51.453587500     from battery import Battery
2023-05-17 16:31:51.453590500   File "/opt/victronenergy/dbus-serialbattery/battery.py", line 412
2023-05-17 16:31:51.453594500     self.charge_limitation = 60 charge_limits[min(charge_limits)]
2023-05-17 16:31:51.453598500                                 ^
2023-05-17 16:31:51.453600500 SyntaxError: invalid syntax
2023-05-17 16:32:14.496194500 INFO:SerialBattery:
2023-05-17 16:32:14.496634500 INFO:SerialBattery:Starting dbus-serialbattery
2023-05-17 16:32:14.497558500 INFO:SerialBattery:dbus-serialbattery v1.0.20230508beta
2023-05-17 16:32:14.497993500 INFO:SerialBattery:Testing Daly
2023-05-17 16:32:15.026280500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:15.026745500 INFO:SerialBattery:No reply to cmd 94
2023-05-17 16:32:15.027161500 WARNING:SerialBattery:No data received in read_status_data()
2023-05-17 16:32:15.552625500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:15.553070500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:16.074539500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:16.075015500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:16.596382500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:16.601940500 WARNING:SerialBattery:No data received in read_battery_code()
2023-05-17 16:32:16.601949500 INFO:SerialBattery:Testing Daly
2023-05-17 16:32:17.123462500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:17.123942500 INFO:SerialBattery:No reply to cmd 94
2023-05-17 16:32:17.124350500 WARNING:SerialBattery:No data received in read_status_data()
2023-05-17 16:32:17.647734500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:17.648314500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:18.172777500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:18.173254500 INFO:SerialBattery:No reply to cmd 90
2023-05-17 16:32:18.694336500 WARNING:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:18.694957500 WARNING:SerialBattery:No data received in read_battery_code()
2023-05-17 16:32:18.695890500 INFO:SerialBattery:Testing Ecs
2023-05-17 16:32:18.755916500 INFO:SerialBattery:Testing HLPdataBMS4S
2023-05-17 16:32:23.266918500 INFO:SerialBattery:Testing Jkbms
2023-05-17 16:32:23.532654500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:23.533524500 INFO:SerialBattery:Testing Lifepower
2023-05-17 16:32:23.695494500 INFO:SerialBattery:Connection established to Lifepower
2023-05-17 16:32:23.696130500 INFO:SerialBattery:Battery EG4 Lifepower connected to dbus from /dev/ttyUSB0
2023-05-17 16:32:23.696634500 INFO:SerialBattery:========== Settings ==========
2023-05-17 16:32:23.697189500 INFO:SerialBattery:> Connection voltage: 27.63V | Current: 0.0A | SoC: 100.0%
2023-05-17 16:32:23.697701500 INFO:SerialBattery:> Cell count: 8 | Cells populated: 8
2023-05-17 16:32:23.698227500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-05-17 16:32:23.698758500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 50.0A | MAX BATTERY DISCHARGE CURRENT: 60.0A
2023-05-17 16:32:23.699380500 INFO:SerialBattery:> CVCM:     True
2023-05-17 16:32:23.699915500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-05-17 16:32:23.700443500 INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
2023-05-17 16:32:23.700965500 INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
2023-05-17 16:32:23.701493500 INFO:SerialBattery:> CCCM SOC: True  | DCCM SOC: True
2023-05-17 16:32:23.745824500 INFO:SerialBattery:DeviceInstance = 2
2023-05-17 16:32:23.746674500 INFO:SerialBattery:com.victronenergy.battery.ttyUSB0
2023-05-17 16:32:23.778065500 INFO:SerialBattery:Hardware Version:B
2023-05-17 16:32:23.827806500 INFO:SerialBattery:Firmware Version:3QT-YS00-16SV100A-V3.5
2023-05-17 16:32:23.846835500 INFO:SerialBattery:publish config values = 1
2023-05-17 16:32:54.162159500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:32:54.162877500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:35:44.351298500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:35:44.352157500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:38:34.546522500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:38:34.547409500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:41:24.749853500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:41:24.750739500 ERROR:SerialBattery:>>> ERROR: Incorrect Data
2023-05-17 16:44:14.950743500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-17 16:44:14.951650500 ERROR:SerialBattery:>>> ERROR: Incorrect Data

Any other information that may be helpful

No response

@najaB76 najaB76 added the bug Something isn't working label May 17, 2023
@mr-manuel mr-manuel self-assigned this May 17, 2023
@mr-manuel
Copy link
Collaborator

Thanks for the report, I will look at it

mr-manuel added a commit to mr-manuel/venus-os_dbus-serialbattery that referenced this issue May 18, 2023
mr-manuel added a commit that referenced this issue May 18, 2023
* Added: Show specific TimeToSoC points in GUI
Only if 0%, 10%, 20%, 80%, 90% and/or 100% are selected

* Added: Show specific TimeToSoC points in GUI
Only if 0%, 10%, 20%, 80%, 90% and/or 100% are selected

* fix black lint error

* fix black lint error

* Improved JBD BMS soc calculation
#439

* Fix for #397
#484

* small fixes

* sort bms imports

* Add support for HLPdata BMS4S
#505

* Add support for Seplos BMS
#530

* change flake8 settings

* fix black lint errors

* removed wildcard imports

* fixed black lint errors

* change flake8 settings

* remove wildcard import and fix black lint errors

* removed wildcard import

* fixed black lint check

* removed wildcard import, fixed black lint errors

* config changes

* removed wildcard import, fixed black lint errors

* remove old log message in handle_changed_setting()

* remove old log message in handle_changed_setting()

* simplified condition for Time-To-Go/Soc

* simplified condition for Time-To-Go/Soc

* fix renogy import

* fix renogy import

* added BMS info and cleanup
* MNB
* Revov
* Sinowealth

* added BMS info and cleanup
* MNB
* Revov
* Sinowealth

* moved BMS to subfolder

* moved BMS to subfolder

* moved BMS to subfolder

* corrected installble to run correct script

* Added self.unique_identifier to the battery class
Used to identify a BMS when multiple BMS are connected
planned for future use

* Added self.unique_identifier to the battery class
Used to identify a BMS when multiple BMS are connected
planned for future use

* changed ble service name
from `dbus-blebattery-$1` to `dbus-blebattery.$1` like the non ble service

* fix small errors

* read installed capacity at startup

* disable ANT BMS by default
#479

* fix cell voltage header parser

* rework daly receive routine

* improve read cell voltages - only work on sufficient data, drop only the bad package on checksum error, not the complete transmission

* allow read_soc to also retry serial transmission

* add daly cell balance state info. cells are red only if unbalanced now

* bump version

* typo

* moved read_serialport_data() to daly.py

* revert read_serialport_data() to the state before my changes

* fix connection log startup message.
now voltage/current/soc are displayed correctly

* black reformatting

* added linear voltage recalculation interval
In the config file can now be defined how often CVL, CCL and DCL is recalculated

* revert Daly adaption

* replaced penalty voltage calculation
with automatically calculated penalty voltages to simplify config
max voltage is kept until batteries are balanced

* flake config change

* flake config change

* added linear voltage recalculation interval
In the config file can now be defined how often CVL, CCL and DCL is recalculated

* replaced penalty voltage calculation
with automatically calculated penalty voltages to simplify config
max voltage is kept until batteries are balanced

* fix black lint errors

* updated changelog

* disabled ANT BMS by default
#479

* updated config.default.ini

* fix typo

* update nightly install script

* Removed line

* fixed error in HLPdataBMS4S

* fixed wrong variable assignment
`str` instead of `int`

* fixed wrong variable assignment
`str` instead of `int`

* updated battery template

* updated battery template

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated battery template

* Progress with config limits reason

* updated CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT default value

* added SoC round for LLT/JBD

* fixed log typo

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* reworked installation procedure
Bluetooth BMS is now also fetched from config.ini

* updated release workflow

* updated readme

* Merge branch 'master' into jkbms_ble

* deploy to github pages only
on changes in master or docusaurus branch

* cleanup

* Merge branch 'master' of into jkbms_ble

* GitHub pages config change

* GitHub pages config change

* cleanup

* Renamed scripts for better reading #532

* update docusaurus dependencies

* Renamed scripts for better reading #532

* update docusaurus dependencies

* change sh with bash

* limitation reason cleanup

* limitation reason cleanup

* changed default config settings
FLOAT_CELL_VOLTAGE from 3.350V to 3.375V
LINEAR_LIMITATION_ENABLE from False to True

* changed default config settings
FLOAT_CELL_VOLTAGE from 3.350V to 3.375V
LINEAR_LIMITATION_ENABLE from False to True

* removed testing line

* Cleanup duplicated files

Files were moved and not deleted

* Cleanup

* MOSFET temperature was displayed twice after merge

* small typo fixes

* updated changelog

* updated changelog

* Small fixes

* fix disconnection behaviour: on disconnect, show '---' after 10s and 'not connected' after 60s

* fix flake errors

* small fix

* fix disconnection behaviour & small fixes
* on disconnect, show '---' after 10s and 'not connected' after 60s by @transistorgit
* small fixes in shell script
* added restart driver script

* fixed file permission

* Added: apply max voltage if CVCM_ENABLE is False
before float voltage was applied

* fixed type error

* Added: BMS disconnect behaviour
* Choose to block charge/discharge on disconnect
* Trigger Venus OS alarm

* Changed: Remove wildcard import from dbushelper.py

* small fixes

* Added: apply max voltage if CVCM_ENABLE is False
before float voltage was applied

* Added: BMS disconnect behaviour
* Choose to block charge/discharge on disconnect
* Trigger Venus OS alarm

* Changed: Remove wildcard import from dbushelper.py

* flake8 changes

* copied lltjbd_ble from idstein:jdb_ble

* Added and adapted LltJbd_Ble
ATTENTION: Currently it's untested

* small changes

* read production date and append to hardware version

* Set SOC nightly. Button is working, next is send command to bms

* Added: Show additional data in device page
* show self.unique_identifier as serial number
* show self.production as device name

* Added: JKBMS unique identifier & fixed data length

* Added: JKBMS BLE unique identifier

* Added: Jkbms_Ble connection_name()

* Added: Daly unique identifier

* Added: JKBMS BLE serial number, user defined field

* Added: Show additional data in device page
* show self.unique_identifier as serial number
* show self.production as device name

* Added: JKBMS unique identifier & fixed data length

* move config.ini before update

* read production date by @tranistorgit
this adds the battery production date

* read out daly battery code and use as unique id

* moved production date and added custom field

* clean battery code
strip whitespace and replace one or multiple spaces with one underline
if no battery code generate unique field

* Daly read_capacity change
Read capacity from config file, if no value provided by BMS

* Daly try to fix no reply

* Improvements by @transistorgit

* changed value

* set SOC (and date time) on button press.

* fix battery code parser

* format fix

* format fix

* fix extra long serial timeouts
by calculating max time instead of loop counts

* Changed: Merged all install files into one

* updated install docs for nightly build

* Small fixes

* changed config backup

* updated config file

* updated changelog

* debug daly

* changed release workflow

* changed release workflow

* changed release workflow

* changed release workflow

* Updated from master

* fix blank screen, debug daly

* make Reset SoC a spin box

* fix possible read_capacity problem

* Daly read_balance_state() add missing return

* Daly advanced troubleshooting

* Changed: Improved Daily stability by a lot

* fixes for disable and uninstall
service was not removed and if removed, it was recreated by the serial starter

* optimized USB install method

* updated changelog

* added missing qml to restore-gui.sh

* optimized USB install method

* Daly improvements
* Set SoC on button press by @transistorgit
* Improved driver stability by @transistorgit & @mr-manuel

* moved production date and added custom field

* changed jkbms_ble to dev

* changed order

* final daly 'broken packages handling'

* Last changes for daly read problem
by @transistorgit

* change version in utils based on GitHub tag

* test automatic release version change

* Added: Configure voltage drop

* test automatic release version change

* fix Daly alarms

* fixes small errors in bash files

* fix missing driver name in restart-driver.sh

* linear mode, allow max voltage on soc thesshold

* Daly added one retry if failed

* fixed LLT/JBD cell balancing display

* rename tar after USB install
fixes #638

* add force buttons

* force buttons working

* fixed removing entries

* implement force charge/discharge

* little bit cleaner soc preset

* use existing serial read/write function

* add stop balancong switch

* use existing serial read/write function

* Changed: Get bg colors from MbStyle for dark mode

* prevent short circuit evaluation

* fix merge errors

* added changelog info

* Fix #648

---------

Co-authored-by: Bernd Stahlbock <[email protected]>
@mr-manuel
Copy link
Collaborator

All errors was caused by this wrong two variables.

self.max_battery_current = utils.MAX_BATTERY_CURRENT

Could you please try this release and confirn that the issue was solved or not? https://github.com/mr-manuel/venus-os_dbus-serialbattery/releases/tag/v1.0.20230519beta

@najaB76
Copy link
Author

najaB76 commented May 18, 2023

Installed that version and no issues so far.

Thanks for the quick fix.

Louisvdw pushed a commit that referenced this issue May 31, 2023
* Changes 2023.05.18 (#649)

* Added: Show specific TimeToSoC points in GUI
Only if 0%, 10%, 20%, 80%, 90% and/or 100% are selected

* Added: Show specific TimeToSoC points in GUI
Only if 0%, 10%, 20%, 80%, 90% and/or 100% are selected

* fix black lint error

* fix black lint error

* Improved JBD BMS soc calculation
#439

* Fix for #397
#484

* small fixes

* sort bms imports

* Add support for HLPdata BMS4S
#505

* Add support for Seplos BMS
#530

* change flake8 settings

* fix black lint errors

* removed wildcard imports

* fixed black lint errors

* change flake8 settings

* remove wildcard import and fix black lint errors

* removed wildcard import

* fixed black lint check

* removed wildcard import, fixed black lint errors

* config changes

* removed wildcard import, fixed black lint errors

* remove old log message in handle_changed_setting()

* remove old log message in handle_changed_setting()

* simplified condition for Time-To-Go/Soc

* simplified condition for Time-To-Go/Soc

* fix renogy import

* fix renogy import

* added BMS info and cleanup
* MNB
* Revov
* Sinowealth

* added BMS info and cleanup
* MNB
* Revov
* Sinowealth

* moved BMS to subfolder

* moved BMS to subfolder

* moved BMS to subfolder

* corrected installble to run correct script

* Added self.unique_identifier to the battery class
Used to identify a BMS when multiple BMS are connected
planned for future use

* Added self.unique_identifier to the battery class
Used to identify a BMS when multiple BMS are connected
planned for future use

* changed ble service name
from `dbus-blebattery-$1` to `dbus-blebattery.$1` like the non ble service

* fix small errors

* read installed capacity at startup

* disable ANT BMS by default
#479

* fix cell voltage header parser

* rework daly receive routine

* improve read cell voltages - only work on sufficient data, drop only the bad package on checksum error, not the complete transmission

* allow read_soc to also retry serial transmission

* add daly cell balance state info. cells are red only if unbalanced now

* bump version

* typo

* moved read_serialport_data() to daly.py

* revert read_serialport_data() to the state before my changes

* fix connection log startup message.
now voltage/current/soc are displayed correctly

* black reformatting

* added linear voltage recalculation interval
In the config file can now be defined how often CVL, CCL and DCL is recalculated

* revert Daly adaption

* replaced penalty voltage calculation
with automatically calculated penalty voltages to simplify config
max voltage is kept until batteries are balanced

* flake config change

* flake config change

* added linear voltage recalculation interval
In the config file can now be defined how often CVL, CCL and DCL is recalculated

* replaced penalty voltage calculation
with automatically calculated penalty voltages to simplify config
max voltage is kept until batteries are balanced

* fix black lint errors

* updated changelog

* disabled ANT BMS by default
#479

* updated config.default.ini

* fix typo

* update nightly install script

* Removed line

* fixed error in HLPdataBMS4S

* fixed wrong variable assignment
`str` instead of `int`

* fixed wrong variable assignment
`str` instead of `int`

* updated battery template

* updated battery template

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* updated battery template

* Progress with config limits reason

* updated CELL_VOLTAGE_DIFF_TO_RESET_VOLTAGE_LIMIT default value

* added SoC round for LLT/JBD

* fixed log typo

* updated nightly script

* Fix for #450
#450

* Read charge/discharge limit JKBMS
#4

* reworked installation procedure
Bluetooth BMS is now also fetched from config.ini

* updated release workflow

* updated readme

* Merge branch 'master' into jkbms_ble

* deploy to github pages only
on changes in master or docusaurus branch

* cleanup

* Merge branch 'master' of into jkbms_ble

* GitHub pages config change

* GitHub pages config change

* cleanup

* Renamed scripts for better reading #532

* update docusaurus dependencies

* Renamed scripts for better reading #532

* update docusaurus dependencies

* change sh with bash

* limitation reason cleanup

* limitation reason cleanup

* changed default config settings
FLOAT_CELL_VOLTAGE from 3.350V to 3.375V
LINEAR_LIMITATION_ENABLE from False to True

* changed default config settings
FLOAT_CELL_VOLTAGE from 3.350V to 3.375V
LINEAR_LIMITATION_ENABLE from False to True

* removed testing line

* Cleanup duplicated files

Files were moved and not deleted

* Cleanup

* MOSFET temperature was displayed twice after merge

* small typo fixes

* updated changelog

* updated changelog

* Small fixes

* fix disconnection behaviour: on disconnect, show '---' after 10s and 'not connected' after 60s

* fix flake errors

* small fix

* fix disconnection behaviour & small fixes
* on disconnect, show '---' after 10s and 'not connected' after 60s by @transistorgit
* small fixes in shell script
* added restart driver script

* fixed file permission

* Added: apply max voltage if CVCM_ENABLE is False
before float voltage was applied

* fixed type error

* Added: BMS disconnect behaviour
* Choose to block charge/discharge on disconnect
* Trigger Venus OS alarm

* Changed: Remove wildcard import from dbushelper.py

* small fixes

* Added: apply max voltage if CVCM_ENABLE is False
before float voltage was applied

* Added: BMS disconnect behaviour
* Choose to block charge/discharge on disconnect
* Trigger Venus OS alarm

* Changed: Remove wildcard import from dbushelper.py

* flake8 changes

* copied lltjbd_ble from idstein:jdb_ble

* Added and adapted LltJbd_Ble
ATTENTION: Currently it's untested

* small changes

* read production date and append to hardware version

* Set SOC nightly. Button is working, next is send command to bms

* Added: Show additional data in device page
* show self.unique_identifier as serial number
* show self.production as device name

* Added: JKBMS unique identifier & fixed data length

* Added: JKBMS BLE unique identifier

* Added: Jkbms_Ble connection_name()

* Added: Daly unique identifier

* Added: JKBMS BLE serial number, user defined field

* Added: Show additional data in device page
* show self.unique_identifier as serial number
* show self.production as device name

* Added: JKBMS unique identifier & fixed data length

* move config.ini before update

* read production date by @tranistorgit
this adds the battery production date

* read out daly battery code and use as unique id

* moved production date and added custom field

* clean battery code
strip whitespace and replace one or multiple spaces with one underline
if no battery code generate unique field

* Daly read_capacity change
Read capacity from config file, if no value provided by BMS

* Daly try to fix no reply

* Improvements by @transistorgit

* changed value

* set SOC (and date time) on button press.

* fix battery code parser

* format fix

* format fix

* fix extra long serial timeouts
by calculating max time instead of loop counts

* Changed: Merged all install files into one

* updated install docs for nightly build

* Small fixes

* changed config backup

* updated config file

* updated changelog

* debug daly

* changed release workflow

* changed release workflow

* changed release workflow

* changed release workflow

* Updated from master

* fix blank screen, debug daly

* make Reset SoC a spin box

* fix possible read_capacity problem

* Daly read_balance_state() add missing return

* Daly advanced troubleshooting

* Changed: Improved Daily stability by a lot

* fixes for disable and uninstall
service was not removed and if removed, it was recreated by the serial starter

* optimized USB install method

* updated changelog

* added missing qml to restore-gui.sh

* optimized USB install method

* Daly improvements
* Set SoC on button press by @transistorgit
* Improved driver stability by @transistorgit & @mr-manuel

* moved production date and added custom field

* changed jkbms_ble to dev

* changed order

* final daly 'broken packages handling'

* Last changes for daly read problem
by @transistorgit

* change version in utils based on GitHub tag

* test automatic release version change

* Added: Configure voltage drop

* test automatic release version change

* fix Daly alarms

* fixes small errors in bash files

* fix missing driver name in restart-driver.sh

* linear mode, allow max voltage on soc thesshold

* Daly added one retry if failed

* fixed LLT/JBD cell balancing display

* rename tar after USB install
fixes #638

* add force buttons

* force buttons working

* fixed removing entries

* implement force charge/discharge

* little bit cleaner soc preset

* use existing serial read/write function

* add stop balancong switch

* use existing serial read/write function

* Changed: Get bg colors from MbStyle for dark mode

* prevent short circuit evaluation

* fix merge errors

* added changelog info

* Fix #648

---------

Co-authored-by: Bernd Stahlbock <[email protected]>

* Limit control voltage to max cell voltage

* Rework serial parser (#12)

much cleaner code, as it is optimised for the daly protocol

* updated changelog

* fix black lint error

* fixed black lint error

* added infos to battery template

* JDB BLE support (#499)

* Implementing JBD BLE support. It is built upon Bleak
* Additionally, it provides some handling of for up to 4 temperature probes labels T1 (NTC2), T2 (NTC3), T3 (NTC4) and T4 (NTC5). NTC1 is the BMS module temperature itself
* The device page has been extend to provide more details about the actual used hardware (= product name), firmware version and BLE address

* updated changelog

* Add Supoprt for HeltecSmartBMS (YYBMS) using modbus via RS485 connection (#658)

* Changes 2023.05.24 (#667)

* Check Venus OS version before installing

* fix Jkbms_Ble error

* updated changelog

* updated readme and added donation link

* bugfix: Heltec BMS test_connection breaks on other modbus compliant BMS systems

* bugfix: LLTJBD BMS ignore non ASCII letters for hardware version

* updated readme

* Suppress daly read errors (#13)

* updated descriptions

* Changed logging level and give better feedback
* Changed logging level to debug for unneeded messages
* Give the user feedback, if a BMS is found or not. Useful, if only one BMS is tested.

* small fixes

---------

Co-authored-by: Bernd Stahlbock <[email protected]>
Co-authored-by: Oleg Gurevich <[email protected]>
Co-authored-by: Bernd <[email protected]>
Co-authored-by: Paul Strawder <[email protected]>
Co-authored-by: Raphael Mack <[email protected]>
Co-authored-by: Strawder, Paul <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants