Louisvdw / dbus-serialbattery

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

Jkbms_Ble: Bluetooth died #728

Closed itsdaveit closed 1 year ago

itsdaveit commented 1 year ago

Describe the problem

Hi, i have 2 JKBMS connected via Bluetooth, the initial setup worked well. After a few hours i frequently lose connection to the BMS. The devices are just a meter apart.

Driver version

v1.0.20230531

Venus OS device type

Cerbo GX

Venus OS version

V3.00

BMS type

JKBMS / Heltec BMS

Cell count

16

Connection type

Bluetooth

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 = 150
MAX_BATTERY_DISCHARGE_CURRENT = 150
BLUETOOTH_BMS = Jkbms_Ble C8:47:8C:E5:C5:66, Jkbms_Ble C8:47:8C:E6:E8:32

Relevant log output

@400000006492e8921f483f54 device_info
@400000006492e8921fc9eaa4 device_info
@400000006492e8921fca09e4 Exiting bt-loop
@400000006492e89239e45dac Missing device address argument
@400000006492e894147cf4fc INFO:SerialBattery:Starting dbus-serialbattery
@400000006492e8941491d0d4 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
@400000006492e8942fec3234 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E5:C5:66
@400000006492e8942ff7b76c INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E5:C5:66
@400000006492e89f1a1f2434 INFO:SerialBattery:Jkbms_Ble found!
@400000006492e89f1a4132f4 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221009)
@400000006492e89f1a6ab7dc INFO:SerialBattery:Connection established to Jkbms_Ble
@400000006492e89f1a7b3e54 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from c8478ce5c566
@400000006492e89f1a8bb914 INFO:SerialBattery:========== Settings ==========
@400000006492e89f1acd03ec INFO:SerialBattery:> Connection voltage: 55.12V | Current: 1.7A | SoC: 99%
@400000006492e89f1acd2714 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
@400000006492e89f1b481ba4 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
@400000006492e89f1b54c1ec INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 200.0A | MAX BATTERY DISCHARGE CURRENT: 200.0A
@400000006492e89f1b772e6c INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 150.0A | MAX BATTERY DISCHARGE CURRENT: 150.0A (read from BMS)
@400000006492e89f1b83a9bc INFO:SerialBattery:> CVCM:     True
@400000006492e89f1b911354 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
@400000006492e89f1b9f480c INFO:SerialBattery:> CCCM CV:  True  | DCCM CV:  True
@400000006492e89f1bad599c INFO:SerialBattery:> CCCM T:   True  | DCCM T:   True
@400000006492e89f1bb861d4 INFO:SerialBattery:> CCCM SOC: True  | DCCM SOC: True
@400000006492e89f1bc23d44 INFO:SerialBattery:Serial Number/Unique Identifier: 2080303198
@400000006492e89f24b1f96c INFO:SerialBattery:DeviceInstance = 2
@400000006492e89f24bde81c INFO:SerialBattery:com.victronenergy.battery.c8478ce5c566
@400000006492e89f24cd804c INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221009)
@400000006492e89f27e3b92c INFO:SerialBattery:publish config values = 1
@4000000064935562214ee8ac INFO:SerialBattery:Jkbms_Ble: Bluetooth died
@4000000064935562214f0bd4 INFO:SerialBattery:Reset of Bluetooth triggered
@40000000649355622155f944 INFO:SerialBattery:Scraping ended, issuing sys-commands
@40000000649355642f1f974c Starting bluetooth: bluetoothd.
@40000000649355643088379c INFO:SerialBattery:Bluetooth should have been restarted
@4000000064935566313cf524 INFO:SerialBattery:Jkbms_Ble: Bluetooth died
@40000000649355673157eb7c INFO:SerialBattery:Jkbms_Ble: Bluetooth died
@4000000064935568316cc754 INFO:SerialBattery:Jkbms_Ble: Bluetooth died
@400000006493556931807e34 INFO:SerialBattery:Jkbms_Ble: Bluetooth died
@400000006493556a319b2e3c INFO:SerialBattery:Jkbms_Ble: Bluetooth died
@400000006493556b31c29814 INFO:SerialBattery:Jkbms_Ble: Bluetooth died

Any other information that may be helpful

I modified the current settings, after generating the log. (thats why it says: @400000006492e89f1b54c1ec INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 200.0A | MAX BATTERY DISCHARGE CURRENT: 200.0A @400000006492e89f1b772e6c INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 150.0A | MAX BATTERY DISCHARGE CURRENT: 150.0A (read from BMS))

mr-manuel commented 1 year ago

Please install the latest nightly version of the dev branch.

itsdaveit commented 1 year ago

Thanks for your response. Just did it, now i`m at v1.0.20230620dev. After the first reboot, only one battery connected. The second one did this in a loop:

@40000000649562e91d364774 INFO:SerialBattery:Starting dbus-serialbattery
@40000000649562e91d4b522c INFO:SerialBattery:dbus-serialbattery v1.0.20230620dev
@40000000649562e938da11cc INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E6:E8:32
@40000000649562e938ebc50c INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E6:E8:32
@40000000649562f52f273c54 ERROR:SerialBattery:No BMS found at C8:47:8C:E6:E8:32
@40000000649562f52f33e684 ERROR:SerialBattery:ERROR >>> No battery connection at Jkbms_Ble
@40000000649562f612db81cc
@40000000649562f612f5b4d4 INFO:Bluetooth details
@40000000649562f63465cf8c Attempting to disconnect from C8:47:8C:E6:E8:32
@40000000649562f63465f2b4 [^AESC[0;93m^BCHG^AESC[0m^B] Device CC:6E:A4:D0:31:75 RSSI is nil
@40000000649562f634660254 [^AESC[0;91m^BDEL^AESC[0m^B] Device CC:6E:A4:D0:31:75 CC-6E-A4-D0-31-75
@40000000649562f634660e0c [^AESC[0;93m^BCHG^AESC[0m^B] Device 00:04:4B:F3:94:C6 RSSI is nil
@40000000649562f6346619c4 [^AESC[0;93m^BCHG^AESC[0m^B] Device CE:74:DD:51:70:CC RSSI is nil
@40000000649562f634662194 [^AESC[0;93m^BCHG^AESC[0m^B] Controller F0:B0:40:FD:5F:47 Discovering: no
@40000000649562f634662d4c Successful disconnected
@40000000649562fc06ca942c Device C8:47:8C:E6:E8:32 (public)
@40000000649562fc06cab36c       Alias: BAT02
@40000000649562fc06cabb3c       Paired: no
@40000000649562fc06cabf24       Trusted: no
@40000000649562fc06cac6f4       Blocked: no
@40000000649562fc06cacadc       Connected: no
@40000000649562fc06cacec4       LegacyPairing: no
@40000000649562fc06cad694       UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
@40000000649562fc06d80594
@40000000649562fd26eb3414 INFO:SerialBattery:
@40000000649562fd26f5a00c INFO:SerialBattery:Starting dbus-serialbattery
@40000000649562fd2709d7d4 INFO:SerialBattery:dbus-serialbattery v1.0.20230620dev
@40000000649562fe06c30694 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E6:E8:32
@40000000649562fe06cf4364 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E6:E8:32
@40000000649563083826dae4 ERROR:SerialBattery:No BMS found at C8:47:8C:E6:E8:32
@40000000649563083826fe0c ERROR:SerialBattery:ERROR >>> No battery connection at Jkbms_Ble
@40000000649563090f033d24
@40000000649563090f0caf1c INFO:Bluetooth details
@40000000649563092421e2b4 Attempting to disconnect from C8:47:8C:E6:E8:32
@4000000064956309242205dc [^AESC[0;93m^BCHG^AESC[0m^B] Device CE:74:DD:51:70:CC RSSI is nil
@40000000649563092422157c [^AESC[0;93m^BCHG^AESC[0m^B] Controller F0:B0:40:FD:5F:47 Discovering: no
@400000006495630924222134 Successful disconnected
@400000006495630e3553a644 Device C8:47:8C:E6:E8:32 (public)
@400000006495630e3553cd54       Alias: BAT02
@400000006495630e3553d524       Paired: no
@400000006495630e3553dcf4       Trusted: no
@400000006495630e3553e0dc       Blocked: no
@400000006495630e3553e4c4       Connected: no
@400000006495630e3553ec94       LegacyPairing: no
@400000006495630e3553f07c       UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
@400000006495630e357635ec
@40000000649563101d98e1a4 INFO:SerialBattery:
@40000000649563101da3bafc INFO:SerialBattery:Starting dbus-serialbattery
@40000000649563101db625d4 INFO:SerialBattery:dbus-serialbattery v1.0.20230620dev
@400000006495631100e30ef4 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E6:E8:32
@400000006495631100fe6ec4 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E6:E8:32

After another reboot, the second battery started also. I will watch, if the initial problem occurs again.

mr-manuel commented 1 year ago

You installed with the install script or by uploading via FTP? This looks like a line endling problem.

itsdaveit commented 1 year ago

I Installed with:

wget -O /tmp/install.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/master/etc/dbus-serialbattery/install.sh

bash /tmp/install.sh

Also switched to nightly/dev with this method.

But: No crashes since yesterday. It looks promissing. :-)