mr-manuel / venus-os_dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
https://mr-manuel.github.io/venus-os_dbus-serialbattery_docs/
MIT License
48 stars 18 forks source link

EG4 LiFePower - Battery not recognized after update #72

Closed Zeezichtje closed 2 months ago

Zeezichtje commented 2 months ago

Describe the bug

I am running 6 EG4 batteries in my server rack. One battery (48v) is connected to CERBO CX. Everything worked fine till I migrated from 1.0.20240102beta to latest release "v1.3.20240705".

Version v1.3.20240705 results in: No battery connection at /dev/ttyUSB0

Upgrading to version v1.3.20240615beta results in my battery found. All values seems to be correct. I wanted to try the Master Branch since I am having multiple batteries. Version v1.4.20240824dev results in: No battery connection at /dev/ttyUSB0

How to reproduce

Install v1.4.20240824dev via the installer and reboot CERBO CX.

Expected behavior

The battery should immediately be recognized since it was working before.

Driver version of the currently installed driver

v1.4.20240824dev

Driver version of the last known working driver

v1.3.20240615beta

Venus OS device type

Cerbo GX

Venus OS version

v3.41

BMS type

EG4 LiFePower (Revov, Tian Power)

Cell count

16

Battery count

1

Connection type

Serial USB adapter to RS485

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.
; Example (remove the semicolon ";" to uncomment and activate the value/setting):
;MAX_BATTERY_CHARGE_CURRENT = 300.0
;MAX_BATTERY_DISCHARGE_CURRENT = 250.0

BMS_TYPE = Lifepower

;MAX_CHARGE_CURRENT_T_FRACTION     = 0, 0.1, 0.2, 0.4, 0.8,  1,  1, 0.6,  0

Relevant log output

lsusb
Bus 004 Device 002: ID 1a86:e2e3 QinHeng Electronics USB2IIC_CTP_CONTROL
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 0bda:b720 Realtek Semiconductor Corp.
Bus 005 Device 002: ID 0424:2422 Standard Microsystems Corp.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

tail -F -n 100 /data/log/serial-starter/current | grep dbus-serialbattery | tai64nlocal 
-> results in no data

tail -F -n 100 /data/log/dbus-serialbattery.ttyUSB0/current | tai64nlocal
2024-08-26 01:58:44.330521500 INFO:SerialBattery:Starting dbus-serialbattery
2024-08-26 01:58:44.332583500 INFO:SerialBattery:Venus OS v3.41
2024-08-26 01:58:44.333226500 INFO:SerialBattery:dbus-serialbattery v1.4.20240824dev
2024-08-26 01:59:00.344346500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2024-08-26 01:59:00.846366500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2024-08-26 01:59:01.347780500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2024-08-26 01:59:01.849487500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0

Any other information that may be helpful

No response

mr-manuel commented 2 months ago

Reading the changelog before updating is always a good idea. There you will find the solution to your problem.

https://github.com/mr-manuel/venus-os_dbus-serialbattery/blob/17458f527d38a835e1d715ba686d71994013c387/CHANGELOG.md?plain=1#L13-L15