-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Bluetooth with JKBMS doesn't work #693
Comments
The same here. I have a similar setup and got exactly the same error message when trying to add my two JKBMS (4s) with BT. Adding only one BMS works just fine. |
One JKBMS via Bluetooth is not working for me, but I am also connected with serial connection as my system is productive. |
Could you try to execute this lines manually and check the results? opkg update
opkg install python3-misc python3-pip
pip3 install bleak |
Seems like nothing has changed:
Edit: But it worked. Restarted the Cerbo and now 2 Bluetooth connections are working. |
Could you also post the output of /usr/libexec/bluetooth/bluetoothd -v /usr/bin/bluetoothctl -v bluetoothctl devices Does it connect, if you restart the bluetooth driver? /etc/init.d/bluetooth restart If you revert back to the latest beta all works fine? |
/etc/init.d/bluetooth restart --> Still no connection At the latest beta version the connection was already unstable. It connected and disconnected around 4 times a day. It worked approx. 6h and then it did not for the next 6 hours. And so on. I also updated from Venus OS 2.92 to 3.0 trying to fix the issue with the latest version. It did not work. |
You have disabled Bluetooth in the Venus OS settings? Have you tried an external Bluetooth dongle? |
Bluetooth is disabled. I have no Bluetooth dongle. Some time later the Bluetooth connection established. Maybe that helps: JKBMS 1:root@einstein:~# tail -n 200 -f /data/log/dbus-blebattery.0/current | tai64nlocal
2023-06-06 00:12:08.061872500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 361, in publish_battery
2023-06-06 00:12:08.061876500 success = self.battery.refresh_data()
2023-06-06 00:12:08.061879500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 162, in refresh_data
2023-06-06 00:12:08.061883500 self.jk.start_scraping()
2023-06-06 00:12:08.061885500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py", line 366, in start_scraping
2023-06-06 00:12:08.062018500 self.bt_thread.start()
2023-06-06 00:12:08.062022500 File "/usr/lib/python3.8/threading.py", line 848, in start
2023-06-06 00:12:08.062024500 raise RuntimeError("threads can only be started once")
2023-06-06 00:12:08.062027500 RuntimeError: threads can only be started once
2023-06-06 00:12:08.062080500
2023-06-06 00:12:08.062082500 connect and scrape on address: C8:47:8C:E8:04:67
2023-06-06 00:12:08.062084500 btloop
2023-06-06 00:12:08.062086500 reconnect
2023-06-06 00:12:08.062087500
2023-06-06 00:12:08.062088500 btloop
2023-06-06 00:12:08.062089500 reconnect
2023-06-06 00:12:08.062090500 Exiting bt-loop
2023-06-06 00:12:08.769699500 Missing device address argument
2023-06-06 00:12:10.962119500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:12:10.963453500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:12:11.539063500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:12:11.539869500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:12:21.298406500 INFO:SerialBattery:Jkbms_Ble found!
2023-06-06 00:12:21.299587500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:12:21.301136500 INFO:SerialBattery:Connection established to Jkbms_Ble
2023-06-06 00:12:21.301873500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from c8478ce80467
2023-06-06 00:12:21.302468500 INFO:SerialBattery:========== Settings ==========
2023-06-06 00:12:21.303168500 INFO:SerialBattery:> Connection voltage: 53.14V | Current: -1.7A | SoC: 93%
2023-06-06 00:12:21.303762500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2023-06-06 00:12:21.304382500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-06-06 00:12:21.305095500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 70.0A | MAX BATTERY DISCHARGE CURRENT: 100.0A
2023-06-06 00:12:21.306386500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 110.0A | MAX BATTERY DISCHARGE CURRENT: 180.0A (read from BMS)
2023-06-06 00:12:21.308612500 INFO:SerialBattery:> CVCM: True
2023-06-06 00:12:21.309349500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-06-06 00:12:21.310144500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
2023-06-06 00:12:21.311038500 INFO:SerialBattery:> CCCM T: True | DCCM T: True
2023-06-06 00:12:21.311763500 INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
2023-06-06 00:12:21.312401500 INFO:SerialBattery:Serial Number/Unique Identifier: 2082316058
2023-06-06 00:12:21.582115500 INFO:SerialBattery:DeviceInstance = 3
2023-06-06 00:12:21.583995500 INFO:SerialBattery:com.victronenergy.battery.c8478ce80467
2023-06-06 00:12:21.585330500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:12:21.651462500 INFO:SerialBattery:publish config values = 1
2023-06-06 00:13:05.820105500 INFO:SerialBattery:Jkbms_Ble: Bluetooth died
2023-06-06 00:13:05.827462500 INFO:SerialBattery:Reset of Bluetooth triggered
2023-06-06 00:13:05.827471500 INFO:SerialBattery:Scraping ended, issuing sys-commands
2023-06-06 00:13:07.963645500 Starting bluetooth: bluetoothd.
2023-06-06 00:13:07.987368500 INFO:SerialBattery:Bluetooth should have been restarted
2023-06-06 00:13:08.029511500 Traceback (most recent call last):
2023-06-06 00:13:08.029520500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 361, in publish_battery
2023-06-06 00:13:08.029524500 success = self.battery.refresh_data()
2023-06-06 00:13:08.029527500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 162, in refresh_data
2023-06-06 00:13:08.029530500 self.jk.start_scraping()
2023-06-06 00:13:08.029533500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py", line 366, in start_scraping
2023-06-06 00:13:08.029674500 self.bt_thread.start()
2023-06-06 00:13:08.029677500 File "/usr/lib/python3.8/threading.py", line 848, in start
2023-06-06 00:13:08.029681500 raise RuntimeError("threads can only be started once")
2023-06-06 00:13:08.029683500 RuntimeError: threads can only be started once
2023-06-06 00:13:08.038150500
2023-06-06 00:13:08.038157500 connect and scrape on address: C8:47:8C:E8:04:67
2023-06-06 00:13:08.038159500 btloop
2023-06-06 00:13:08.038160500 reconnect
2023-06-06 00:13:08.038162500
2023-06-06 00:13:08.038163500 btloop
2023-06-06 00:13:08.038165500 reconnect
2023-06-06 00:13:08.038166500 Exiting bt-loop
2023-06-06 00:13:08.935589500 Missing device address argument
2023-06-06 00:13:10.943643500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:13:10.945068500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:13:11.333901500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:13:11.334671500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:13:21.850598500 INFO:SerialBattery:Jkbms_Ble found!
2023-06-06 00:13:21.850607500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:13:21.850609500 INFO:SerialBattery:Connection established to Jkbms_Ble
2023-06-06 00:13:21.850612500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from c8478ce80467
2023-06-06 00:13:21.850616500 INFO:SerialBattery:========== Settings ==========
2023-06-06 00:13:21.850618500 INFO:SerialBattery:> Connection voltage: 53.13V | Current: -1.5A | SoC: 93%
2023-06-06 00:13:21.850621500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2023-06-06 00:13:21.850816500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-06-06 00:13:21.853142500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 70.0A | MAX BATTERY DISCHARGE CURRENT: 100.0A
2023-06-06 00:13:21.854286500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 110.0A | MAX BATTERY DISCHARGE CURRENT: 180.0A (read from BMS)
2023-06-06 00:13:21.855227500 INFO:SerialBattery:> CVCM: True
2023-06-06 00:13:21.857471500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-06-06 00:13:21.858982500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
2023-06-06 00:13:21.860063500 INFO:SerialBattery:> CCCM T: True | DCCM T: True
2023-06-06 00:13:21.861245500 INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
2023-06-06 00:13:21.862266500 INFO:SerialBattery:Serial Number/Unique Identifier: 2082316058
2023-06-06 00:13:21.991216500 INFO:SerialBattery:DeviceInstance = 3
2023-06-06 00:13:21.992360500 INFO:SerialBattery:com.victronenergy.battery.c8478ce80467
2023-06-06 00:13:21.993718500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:13:22.141216500 INFO:SerialBattery:publish config values = 1
2023-06-06 00:14:06.231351500 INFO:SerialBattery:Jkbms_Ble: Bluetooth died
2023-06-06 00:14:06.232205500 INFO:SerialBattery:Reset of Bluetooth triggered
2023-06-06 00:14:06.232874500 INFO:SerialBattery:Scraping ended, issuing sys-commands
2023-06-06 00:14:08.362680500 Starting bluetooth: bluetoothd.
2023-06-06 00:14:08.385440500 INFO:SerialBattery:Bluetooth should have been restarted
2023-06-06 00:14:08.397378500 Traceback (most recent call last):
2023-06-06 00:14:08.397387500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 361, in publish_battery
2023-06-06 00:14:08.397391500 success = self.battery.refresh_data()
2023-06-06 00:14:08.397394500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 162, in refresh_data
2023-06-06 00:14:08.397398500 self.jk.start_scraping()
2023-06-06 00:14:08.397399500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py", line 366, in start_scraping
2023-06-06 00:14:08.397527500 self.bt_thread.start()
2023-06-06 00:14:08.397531500 File "/usr/lib/python3.8/threading.py", line 848, in start
2023-06-06 00:14:08.397533500 raise RuntimeError("threads can only be started once")
2023-06-06 00:14:08.397536500 RuntimeError: threads can only be started once
2023-06-06 00:14:08.397802500
2023-06-06 00:14:08.397806500 connect and scrape on address: C8:47:8C:E8:04:67
2023-06-06 00:14:08.397809500 btloop
2023-06-06 00:14:08.397810500 reconnect
2023-06-06 00:14:08.397811500
2023-06-06 00:14:08.397812500 btloop
2023-06-06 00:14:08.397813500 reconnect
2023-06-06 00:14:08.397815500 Exiting bt-loop
2023-06-06 00:14:09.411165500 Missing device address argument
2023-06-06 00:14:11.200771500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:14:11.202354500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:14:11.899368500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:14:11.900501500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:14:22.794672500 INFO:SerialBattery:Jkbms_Ble found!
2023-06-06 00:14:22.795835500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:14:22.797860500 INFO:SerialBattery:Connection established to Jkbms_Ble
2023-06-06 00:14:22.799486500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from c8478ce80467
2023-06-06 00:14:22.800106500 INFO:SerialBattery:========== Settings ==========
2023-06-06 00:14:22.800800500 INFO:SerialBattery:> Connection voltage: 53.13V | Current: -1.5A | SoC: 93%
2023-06-06 00:14:22.801378500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2023-06-06 00:14:22.801982500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-06-06 00:14:22.802606500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 70.0A | MAX BATTERY DISCHARGE CURRENT: 100.0A
2023-06-06 00:14:22.803216500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 110.0A | MAX BATTERY DISCHARGE CURRENT: 180.0A (read from BMS)
2023-06-06 00:14:22.803811500 INFO:SerialBattery:> CVCM: True
2023-06-06 00:14:22.804463500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-06-06 00:14:22.805098500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
2023-06-06 00:14:22.805684500 INFO:SerialBattery:> CCCM T: True | DCCM T: True
2023-06-06 00:14:22.806273500 INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
2023-06-06 00:14:22.806845500 INFO:SerialBattery:Serial Number/Unique Identifier: 2082316058
2023-06-06 00:14:22.910876500 INFO:SerialBattery:DeviceInstance = 3
2023-06-06 00:14:22.911717500 INFO:SerialBattery:com.victronenergy.battery.c8478ce80467
2023-06-06 00:14:22.912736500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:14:22.959463500 INFO:SerialBattery:publish config values = 1
2023-06-06 00:15:07.052266500 INFO:SerialBattery:Jkbms_Ble: Bluetooth died
2023-06-06 00:15:07.052970500 INFO:SerialBattery:Reset of Bluetooth triggered
2023-06-06 00:15:07.053806500 INFO:SerialBattery:Scraping ended, issuing sys-commands
2023-06-06 00:15:09.187155500 Starting bluetooth: bluetoothd.
2023-06-06 00:15:09.217427500 INFO:SerialBattery:Bluetooth should have been restarted
2023-06-06 00:15:09.258158500 Traceback (most recent call last):
2023-06-06 00:15:09.258167500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 361, in publish_battery
2023-06-06 00:15:09.258171500 success = self.battery.refresh_data()
2023-06-06 00:15:09.258173500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 162, in refresh_data
2023-06-06 00:15:09.258177500 self.jk.start_scraping()
2023-06-06 00:15:09.258179500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py", line 366, in start_scraping
2023-06-06 00:15:09.258311500 self.bt_thread.start()
2023-06-06 00:15:09.258314500 File "/usr/lib/python3.8/threading.py", line 848, in start
2023-06-06 00:15:09.258317500 raise RuntimeError("threads can only be started once")
2023-06-06 00:15:09.258320500 RuntimeError: threads can only be started once
2023-06-06 00:15:09.258581500
2023-06-06 00:15:09.258587500 connect and scrape on address: C8:47:8C:E8:04:67
2023-06-06 00:15:09.258589500 btloop
2023-06-06 00:15:09.258590500 reconnect
2023-06-06 00:15:09.258592500
2023-06-06 00:15:09.258593500 btloop
2023-06-06 00:15:09.258594500 reconnect
2023-06-06 00:15:09.258595500 Exiting bt-loop
2023-06-06 00:15:10.178107500 Missing device address argument
2023-06-06 00:15:12.044011500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:15:12.046681500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:15:12.939625500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:15:12.942122500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:15:34.361598500 ERROR:SerialBattery:ERROR >>> No battery connection at Jkbms_Ble
2023-06-06 00:15:34.361607500
2023-06-06 00:15:34.361608500 connect and scrape on address: C8:47:8C:E8:04:67
2023-06-06 00:15:34.361611500 btloop
2023-06-06 00:15:34.361612500 reconnect
2023-06-06 00:15:34.361613500
2023-06-06 00:15:34.361614500 Exiting bt-loop
2023-06-06 00:15:37.982733500 Attempting to disconnect from C8:47:8C:E9:03:8B
2023-06-06 00:15:37.982743500 [CHG] Device C8:47:8C:E9:03:8B ServicesResolved: no
2023-06-06 00:15:37.982746500 Successful disconnected
2023-06-06 00:15:40.167916500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:15:40.169655500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:15:40.633469500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:15:40.634213500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E8:04:67
2023-06-06 00:15:51.318404500 INFO:SerialBattery:Jkbms_Ble found!
2023-06-06 00:15:51.319442500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:15:51.321491500 INFO:SerialBattery:Connection established to Jkbms_Ble
2023-06-06 00:15:51.322685500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from c8478ce80467
2023-06-06 00:15:51.325185500 INFO:SerialBattery:========== Settings ==========
2023-06-06 00:15:51.327975500 INFO:SerialBattery:> Connection voltage: 53.13V | Current: -1.5A | SoC: 93%
2023-06-06 00:15:51.329432500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2023-06-06 00:15:51.333357500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-06-06 00:15:51.336436500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 70.0A | MAX BATTERY DISCHARGE CURRENT: 100.0A
2023-06-06 00:15:51.340117500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 110.0A | MAX BATTERY DISCHARGE CURRENT: 180.0A (read from BMS)
2023-06-06 00:15:51.341350500 INFO:SerialBattery:> CVCM: True
2023-06-06 00:15:51.342563500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-06-06 00:15:51.343659500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
2023-06-06 00:15:51.355771500 INFO:SerialBattery:> CCCM T: True | DCCM T: True
2023-06-06 00:15:51.357220500 INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
2023-06-06 00:15:51.358905500 INFO:SerialBattery:Serial Number/Unique Identifier: 2082316058
2023-06-06 00:15:51.506262500 INFO:SerialBattery:DeviceInstance = 3
2023-06-06 00:15:51.507475500 INFO:SerialBattery:com.victronenergy.battery.c8478ce80467
2023-06-06 00:15:51.508690500 INFO:SerialBattery:BAT: JKBMS 10.XW 16 cells (20221217)
2023-06-06 00:15:51.546020500 INFO:SerialBattery:publish config values = 1 JKBMS 2:root@einstein:~# tail -n 200 -f /data/log/dbus-blebattery.1/current | tai64nloca l
2023-06-06 00:14:39.031847500 Traceback (most recent call last):
2023-06-06 00:14:39.031856500 File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 361, in publish_battery
2023-06-06 00:14:39.031859500 success = self.battery.refresh_data()
2023-06-06 00:14:39.031862500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 162, in refresh_data
2023-06-06 00:14:39.031866500 self.jk.start_scraping()
2023-06-06 00:14:39.031867500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py", line 366, in start_scraping
2023-06-06 00:14:39.032070500 self.bt_thread.start()
2023-06-06 00:14:39.032072500 File "/usr/lib/python3.8/threading.py", line 848, in start
2023-06-06 00:14:39.032075500 raise RuntimeError("threads can only be started once")
2023-06-06 00:14:39.032078500 RuntimeError: threads can only be started once
2023-06-06 00:14:39.032334500
2023-06-06 00:14:39.032338500 connect and scrape on address: C8:47:8C:E9:03:8B
2023-06-06 00:14:39.032340500 btloop
2023-06-06 00:14:39.032342500 reconnect
2023-06-06 00:14:39.032343500
2023-06-06 00:14:39.032344500 btloop
2023-06-06 00:14:39.032345500 reconnect
2023-06-06 00:14:39.032346500 Exiting bt-loop
2023-06-06 00:14:39.913518500 Missing device address argument
2023-06-06 00:14:41.986549500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:14:41.988481500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:14:42.428697500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:14:42.429519500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:14:51.825723500 INFO:SerialBattery:Jkbms_Ble found!
2023-06-06 00:14:51.825731500
2023-06-06 00:14:51.825732500 connect and scrape on address: C8:47:8C:E9:03:8B
2023-06-06 00:14:51.825735500 btloop
2023-06-06 00:14:51.825736500 reconnect
2023-06-06 00:14:51.825737500
2023-06-06 00:14:51.840021500 Traceback (most recent call last):
2023-06-06 00:14:51.840030500 File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 163, in <module>
2023-06-06 00:14:51.840034500 main()
2023-06-06 00:14:51.840035500 File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 128, in main
2023-06-06 00:14:51.840039500 if testbms.test_connection() is True:
2023-06-06 00:14:51.840041500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 103, in test_connection
2023-06-06 00:14:51.840168500 self.get_settings()
2023-06-06 00:14:51.840170500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 131, in get_settings
2023-06-06 00:14:51.840175500 self.capacity = self.jk.get_status()["cell_info"]["capacity_nominal"]
2023-06-06 00:14:51.840178500 KeyError: 'capacity_nominal'
2023-06-06 00:14:54.299904500 Exiting bt-loop
2023-06-06 00:14:54.690997500 Missing device address argument
2023-06-06 00:14:56.304447500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:14:56.305833500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:14:56.989659500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:14:56.991087500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:15:12.857607500 ERROR:SerialBattery:ERROR >>> No battery connection at Jkbms_Ble
2023-06-06 00:15:12.857615500
2023-06-06 00:15:12.857616500 connect and scrape on address: C8:47:8C:E9:03:8B
2023-06-06 00:15:12.857619500 btloop
2023-06-06 00:15:12.857621500 reconnect
2023-06-06 00:15:12.857622500
2023-06-06 00:15:12.857623500 btloop
2023-06-06 00:15:12.857624500 reconnect
2023-06-06 00:15:12.857625500 Exiting bt-loop
2023-06-06 00:15:13.232099500 Missing device address argument
2023-06-06 00:15:14.945606500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:15:14.947312500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:15:15.388731500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:15:15.389478500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:15:21.010133500 ERROR:SerialBattery:No Jkbms_Ble found at C8:47:8C:E9:03:8B
2023-06-06 00:15:21.010937500 ERROR:SerialBattery:ERROR >>> No battery connection at Jkbms_Ble
2023-06-06 00:15:21.011232500
2023-06-06 00:15:21.320001500 Missing device address argument
2023-06-06 00:15:23.011497500 INFO:SerialBattery:Starting dbus-serialbattery
2023-06-06 00:15:23.012837500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-06-06 00:15:23.393564500 INFO:SerialBattery:Init of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:15:23.394271500 INFO:SerialBattery:Test of Jkbms_Ble at C8:47:8C:E9:03:8B
2023-06-06 00:15:34.503645500 INFO:SerialBattery:Jkbms_Ble found!
2023-06-06 00:15:34.505407500 INFO:SerialBattery:BAT: JKBMS 11.XW 16 cells (20221224)
2023-06-06 00:15:34.507196500 INFO:SerialBattery:Connection established to Jkbms_Ble
2023-06-06 00:15:34.509434500 INFO:SerialBattery:Battery Jkbms_Ble connected to dbus from c8478ce9038b
2023-06-06 00:15:34.512183500 INFO:SerialBattery:========== Settings ==========
2023-06-06 00:15:34.514573500 INFO:SerialBattery:> Connection voltage: 53.25V | Current: -2.1A | SoC: 93%
2023-06-06 00:15:34.515542500 INFO:SerialBattery:> Cell count: 16 | Cells populated: 16
2023-06-06 00:15:34.516443500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-06-06 00:15:34.517465500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 70.0A | MAX BATTERY DISCHARGE CURRENT: 100.0A
2023-06-06 00:15:34.518427500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 140.0A | MAX BATTERY DISCHARGE CURRENT: 200.0A (read from BMS)
2023-06-06 00:15:34.519296500 INFO:SerialBattery:> CVCM: True
2023-06-06 00:15:34.538814500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
2023-06-06 00:15:34.541594500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
2023-06-06 00:15:34.543211500 INFO:SerialBattery:> CCCM T: True | DCCM T: True
2023-06-06 00:15:34.544732500 INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
2023-06-06 00:15:34.546482500 INFO:SerialBattery:Serial Number/Unique Identifier: 2092245065
2023-06-06 00:15:34.832464500 INFO:SerialBattery:DeviceInstance = 4
2023-06-06 00:15:34.836261500 INFO:SerialBattery:com.victronenergy.battery.c8478ce9038b
2023-06-06 00:15:34.838402500 INFO:SerialBattery:BAT: JKBMS 11.XW 16 cells (20221224)
2023-06-06 00:15:34.907198500 INFO:SerialBattery:publish config values = 1 |
Please put tripple backticks ``` in the line before and after your code/logs for correct formatting. This should help, thanks. What is your BMS hardware/firmware version? |
Both BMS are JK_B2A20S20P (JK-B2A20S20P) JKBMS 1: JKBMS 2: /etc/init.d/bluetooth restart with a Serial connection and only one Bluetooth connection works instantly. (11.XW via Serial, 10.XW via BT). Having 2 Bluetooth JKBMS in Config --> No connection. |
I can confirm the same issue with also two JK bms'es. Version is 2.92 and the troubleshooting mentioned in this topic/bug report is the same with mine setup. My Victron also reboots the GX side once in the X hours. My MQTT messages are missing for a couple of minutes and that is the moment the VenusOS reboots. The system also resets the names I've given them and when I check the names are standard. The connection is sometimes restored to both the units and sometimes not. I'm keeping the serial connection to one of the BMS'es live to keep the CCL and DCL accurate with settings. |
@sstolk90 for the names see #100 @baranator could you take a look at the thread issue? |
@mr-manuel seems like it happens here, on reconnect:
Do you really think it should do that? If anything, it should call It could also be that with the scanning removed (#695) that the initial connect will be more reliable since there wouldn't be two processes doing exactly the same scan at exactly the same time. @sstolk90 can you find out the reason for the reboot? There could be a hint in |
Please execute this commands to apply the potential fixes: wget -O /data/etc/dbus-serialbattery/bms/jkbms_ble.py https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/dev/etc/dbus-serialbattery/bms/jkbms_ble.py
wget -O /data/etc/dbus-serialbattery/bms/jkbms_brn.py https://raw.githubusercontent.com/mr-manuel/venus-os_dbus-serialbattery/dev/etc/dbus-serialbattery/bms/jkbms_brn.py
bash /data/etc/dbus-serialbattery/reinstall-local.sh
reboot Let me know, if this fixes your problem. |
I have this in the logs
|
I've installed this and will monitor for issues! |
What does the driver log say?
The logs say it...
|
In the meanwhile I found this two links regarding
@seidler2547 do you also see this in your logs with the |
Logs:
After the reboot it detects 1 JK BMS over Bluetooth and the other one on serial. I think when I reboot the bluetooth process it will reconnect to the second one. Will test it now |
Ok, this means, that the driver creashes and restarts. Can you contact me on Discord? |
@sstolk90 is the BT dongle far away from the batteries or is there a lot of interference, e.g. From WiFi? Also, you did disable Bluetooth in the GUI, didn't you? Right now from the logs it seems that the connection doesn't work because the communication between the GX and the BMS is interrupted. I don't immediately see how the driver could work around that, but it's hard to say. |
I made some changes in my |
This is solved with https://github.com/mr-manuel/venus-os_dbus-serialbattery/releases/tag/v1.0.20230610beta which gets merged with the |
Describe the bug
Bluetooth connection to JKBMS is not working since the new latest version (1.0.20230531)
How to reproduce
Steps to reproduce the behavior:
Expected behavior
Venus OS is connecting to the JKBMS
Driver version
1.0.20230531
Venus OS device type
Cerbo GX
Venus OS version
3.0.0 (newest stable)
BMS type
JKBMS / Heltec BMS
Cell count
16
Connection type
Bluetooth
Config file
Relevant log output
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered: