-
-
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
LLT/JBD - JBD BMS very unstable bluetooth connection #777
Comments
Please try also the nightly build from the dev branch. |
@mr-manuel I have tried it yesterday. Also the same result. |
Also identical logs? |
Yes log output is identical. |
Please provide the logs in the correct format as documented and requested. This way we cannot help you. If you don't see the |
Please try to install the |
Some more logs for this issue: 2023-09-05 08:33:34.177824500 INFO:SerialBattery:
2023-09-05 08:33:34.177829500 INFO:SerialBattery:Starting dbus-serialbattery
2023-09-05 08:33:34.179688500 INFO:SerialBattery:dbus-serialbattery v1.0.20230905dev
2023-09-05 08:33:34.548151500 INFO:SerialBattery:Init of LltJbd_Ble at E0:9F:2A:xx:xx:xx
2023-09-05 08:33:34.548601500 INFO:SerialBattery:Test of LltJbd_Ble at E0:9F:2A:xx:xx:xx
2023-09-05 08:33:40.794466500 INFO:SerialBattery:Connection established to LltJbd_Ble
2023-09-05 08:33:40.794948500 INFO:SerialBattery:Battery LltJbd_Ble connected to dbus from blee09f2axxxxxx
2023-09-05 08:33:40.795353500 INFO:SerialBattery:========== Settings ==========
2023-09-05 08:33:40.795831500 INFO:SerialBattery:> Connection voltage: 13.07V | Current: -2.72A | SoC: 17.06%
2023-09-05 08:33:40.796247500 INFO:SerialBattery:> Cell count: 4 | Cells populated: 4
2023-09-05 08:33:40.796667500 INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
2023-09-05 08:33:40.797549500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 75.0A | MAX BATTERY DISCHARGE CURRENT: 150.0A
2023-09-05 08:33:40.798006500 INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 230.0A | MAX BATTERY DISCHARGE CURRENT: 230.0A (read from BMS)
2023-09-05 08:33:40.798421500 INFO:SerialBattery:> CVCM: True
2023-09-05 08:33:40.798858500 INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.5V
2023-09-05 08:33:40.799289500 INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
2023-09-05 08:33:40.799713500 INFO:SerialBattery:> CCCM T: True | DCCM T: True
2023-09-05 08:33:40.800232500 INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
2023-09-05 08:33:40.800740500 INFO:SerialBattery:Serial Number/Unique Identifier: 80_272.0Ah
2023-09-05 08:33:40.853056500 INFO:SerialBattery:DeviceInstance = 6
2023-09-05 08:33:40.853660500 INFO:SerialBattery:com.victronenergy.battery.blee09f2axxxxxx
2023-09-05 08:33:41.661966500 INFO:SerialBattery:publish config values = 0
2023-09-05 09:18:06.212244500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-09-05 09:18:15.706683500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.NoReply', 'Message recipient disconnected from message bus without replying') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176
2023-09-05 09:18:15.752904500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.ServiceUnknown', 'The name org.bluez was not provided by any .service files') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176
2023-09-05 09:18:15.783531500 [CHG] Device E0:9F:2A:xx:xx:xx RSSI: -53
2023-09-05 09:18:15.783539500 [CHG] Device E0:9F:2A:xx:xx:xx RSSI: -53
2023-09-05 09:18:15.783543500 [CHG] Device E0:9F:2A:xx:xx:xx RSSI: -53
2023-09-05 09:18:16.730540500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.ServiceUnknown', 'The name org.bluez was not provided by any .service files') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176
2023-09-05 09:18:17.730947500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.ServiceUnknown', 'The name org.bluez was not provided by any .service files') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176
2023-09-05 09:18:18.731835500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.ServiceUnknown', 'The name org.bluez was not provided by any .service files') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176
2023-09-05 09:18:19.732333500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.ServiceUnknown', 'The name org.bluez was not provided by any .service files') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176
2023-09-05 09:18:20.737443500 ERROR:SerialBattery:Exception occurred: BleakDBusError('org.freedesktop.DBus.Error.ServiceUnknown', 'The name org.bluez was not provided by any .service files') of type <class 'bleak.exc.BleakDBusError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #176 After that I have to run this commands to get it working again: # stop bluetooth system service
/etc/init.d/bluetooth stop
# kill all blebattery processes
pkill -f "supervise dbus-blebattery.*"
pkill -f "multilog .* /var/log/dbus-blebattery.*"
pkill -f "python .*/dbus-serialbattery.py .*_Ble"
# start bluetooth system service
/etc/init.d/bluetooth start |
Many thanks, I will try it soon. But I must wait for the repair of my MultiPlus. I think it is mostly happens on positive (charging) load. Can you reproduce it? |
Unfortunately not. I can only wait for it to happen and then add some code for error handling. |
Okay, so I now experienced also a very unpleasant connection issue with the BMS. Looking and hcidump output and a simple So I tried to change the MAC address of the hci0 adapter in my RPI and surprise, it can connect again. BTW unplugging the dongle from the BMS board or rebooting the entire BMS board does not seem to resolve the issue. There seems to be a hardcoded blacklist timeout of at least 24 hours. |
That sounds strange, for me a simple restart of the driver makes a working reconnect. |
below the BLE log from my JBD BMS, this is on latest Dev version , other versions gave much more errors: 2023-09-17 10:55:46.391618500
2023-09-17 10:55:46.391623500 INFO:Bluetooth details
2023-09-17 10:55:46.426172500 Device A4:C1:38:C0:53:90 not available
2023-09-17 10:55:51.493111500 Device A4:C1:38:C0:53:90 (public)
2023-09-17 10:55:51.493118500 Alias: Accu 1
2023-09-17 10:55:51.493120500 Paired: no
2023-09-17 10:55:51.493122500 Trusted: no
2023-09-17 10:55:51.493123500 Blocked: no
2023-09-17 10:55:51.493125500 Connected: no
2023-09-17 10:55:51.493127500 LegacyPairing: no
2023-09-17 10:55:51.493129500 RSSI: -61
2023-09-17 10:55:51.494420500
2023-09-17 10:55:53.289267500 INFO:SerialBattery:
2023-09-17 10:55:53.289687500 INFO:SerialBattery:Starting dbus-serialbattery
2023-09-17 10:55:53.290617500 INFO:SerialBattery:dbus-serialbattery v1.0.20230905dev
2023-09-17 10:55:53.732126500 INFO:SerialBattery:Init of LltJbd_Ble at A4:C1:38:C0:53:90
2023-09-17 10:55:53.732546500 INFO:SerialBattery:Test of LltJbd_Ble at A4:C1:38:C0:53:90
2023-09-17 10:55:53.882705500 ERROR:SerialBattery:BleakScanner(): Exception occurred: ValueError('dbus_fast._private.marshaller.Marshaller size changed, may indicate binary incompatibility. Expected 24 from C header, got 20 from PyObject') of type <class 'ValueError'> in /opt/victronenergy/dbus-serialbattery/bms/lltjbd_ble.py line #59
2023-09-17 10:55:58.743707500 ERROR:SerialBattery:>>> ERROR: Unable to connect with BLE device
2023-09-17 10:55:58.746020500 ERROR:SerialBattery:No BMS found at A4:C1:38:C0:53:90
2023-09-17 10:55:58.746445500 ERROR:SerialBattery:ERROR >>> No battery connection at LltJbd_Ble
2023-09-17 10:55:59.636611500
2023-09-17 10:55:59.636744500 INFO:Bluetooth details
2023-09-17 10:55:59.719706500 Attempting to disconnect from A4:C1:38:C0:53:90
2023-09-17 10:55:59.719714500 [CHG] Device FE:7C:93:F9:42:6C RSSI is nil
2023-09-17 10:55:59.719718500 [CHG] Device CD:26:4D:CE:82:AE RSSI is nil
2023-09-17 10:55:59.719721500 [CHG] Device A4:C1:37:10:26:0D RSSI is nil
2023-09-17 10:55:59.719725500 [CHG] Device D4:F1:2E:C1:77:33 RSSI is nil
2023-09-17 10:55:59.719729500 [CHG] Device FD:44:C9:E4:C6:E5 RSSI is nil
2023-09-17 10:55:59.719732500 [CHG] Device A4:C1:38:C0:53:90 RSSI is nil
2023-09-17 10:55:59.719819500 [CHG] Device A4:C1:38:E4:CF:B1 RSSI is nil
2023-09-17 10:55:59.719823500 [CHG] Device A4:C1:38:00:2F:44 RSSI is nil
2023-09-17 10:55:59.719827500 [CHG] Device F5:47:C8:BF:C3:69 RSSI is nil
2023-09-17 10:55:59.719830500 [CHG] Controller B8:27:EB:0E:BC:1D Discovering: no
2023-09-17 10:55:59.719834500 Successful disconnected |
@pieterjanvz can you try to change this line
to pip3 install bleak==0.20.2 and then run If you still have the same error add pip3 install dbus-fast==1.87.0 below
and then run |
Thanks I now can connect , but as above its not stable , hope this wil be solved soon |
Did you downgrade only |
Today I have received my repaired MultiPlus, I have installed the nightly dev. I try to reproduce the issue and will post the logs. |
Here the actual log output:
|
Did you reboot once? |
Yes after a reboot, it works a few hours than the issue comes back. |
Some interesting details: After reboot:
After first crash:
I think it's related to the hardware -> Raspberry Pi 3 Model B Plus Rev 1.3 |
We had this already in the past. Can you try this routine, if it happen again and see, it it helps without rebooting? # stop bluetooth system service
/etc/init.d/bluetooth stop
pkill -f "bluetoothd"
# kill bluetooth system stack
rfkill block bluetooth
rfkill unblock bluetooth
# kill all blebattery processes
pkill -f "supervise dbus-blebattery.*"
pkill -f "multilog .* /var/log/dbus-blebattery.*"
pkill -f "python .*/dbus-serialbattery.py .*_Ble.*"
# start bluetooth system service
/etc/init.d/bluetooth start |
Does not work, only the full reboot. |
I find out the following works without a reboot:
I will test again if a hciattach restart is sufficient. Edit: Kernel Log:
|
Sounds great! So we can integrate this in the driver that it restarts the stack in the case of a crash. |
Is sufficient, also brings the device in dbus-serialbattery back. |
Could you script that? |
Yes, I will create a PR |
Edit: Sorry have to merge it first.... |
I have the same issue with Bluetooth randomly being down on my Raspberry Pi 3 Model B Plus Rev 1.3. |
* Update reinstall-local.sh: Fixed charge current parameter Update reinstall-local.sh: Corrected charge current parameter for initial config.ini * Exclude devices from driver startup This prevents blocking the serial port * implement callback function for update * fix comments to reflect new logic * update changelog * set soc=100% when charge mode changes to float, apply exponential smoothing on current readout * remove scan for devices the scan for devices and check if the BMS to test is present doesn't add value if the device is not within range (or the MAC is wrong), then the subsequent start_scraping call will either fail or fail to produce usable data * JKBMS_BLE driver fixes * added Bluetooth signal strenght, increased debug * Optimized reinstallation procedure - Changed: Optimized restart sequence for the bluetooth installation - Changed: Run serial part first and then bluetooth part. This allows the serial driver to get operative faster - Removed: $DRIVERNAME variable for clearer paths - Removed: Bluetooth system driver restart, since the devices get disconnected by the service before starting the dbus-serialbatterydriver * Improved Jkbms_Ble error handling * optimized disable procedure * small fixes * save custom name and make it restart persistant #100 * changed unique identifier from string to function function can be overridden by BMS battery class * fix typo * fix Sinowealth not loading #702 * fix unique identifier function * enable BMS over config, if disabled by default Now you can also add more then one BMS for BMS_TYPE * show battery port in log * ANT BMS fixes Fixed that other devices are recognized as ANT BMS * Sinowealth BMS fixes Fixed that other devices are recognized as Sinowealth BMS * improved publish_battery error handling switched from error count to seconds * Improve Battery Voltage Handling in Linear Absorption Mode * Refactor change time() to int(time()) for consistency in max_voltage_start_time and tDiff calculation * Refactor battery voltage calculations for efficiency and clarity * Remove penalty_buffer * Reset max_voltage_start_time wenn we going to bulk(dynamic) mode * updated changelog * fix reply processing * Reduce the big inrush current, if the CVL jumps from Bulk/Absorbtion to Float fix #659 * Check returned data lenght for Seplos BMS Be stricter about the return data we accept, might fix the problem of grid meters accidently being recognized as a Seplos * Validate current, voltage, capacity and SoC for all BMS This prevents that a device, which is no BMS, is detected as BMS * removed double check * bump version * fix validation if None * updated changelog * proposal to #659 formatted :) * bugfix proposal to #659 * refactor setting float charge_mode * fix type error, removed bluetooth cronjob * updated changelog * fix rs485 write communication errors by inserting sleeps, add debug print for charge mode and fix crash on write soc failures * fix write problem on set_soc. also changed the switch charge/discharge function, just in case * debug msg * Bluetooth optimizations * Fixes by @peterohman #505 (comment) * fix #712 * fix meaningless time to go values * fix meaningless time to go values * Duration of transition to float depends on number of cells * Float transition - Voltage drop per second * Update hlpdatabms4s.py * Validate setting of FLOAT_CELL_VOLTAGE and avoid misconfiguration * consider utils.LINEAR_RECALCULATION_EVERY to refresh CVL * cleanup * consider utils.LINEAR_RECALCULATION_EVERY to refresh CVL * small refactor, introduced set_cvl_linear function to set CVL only once every LINEAR_RECALCULATION_EVERY seconds * fix typo * updated changelog * remove debug msg * remove debug msg * undo debug change * Daly BMS make auto reset soc configurable * added debug and error information for CVL * fix proposal for #733 (#735) * Added: Tollerance to enter float voltage once the timer is triggered * Add bulk voltage Load to bulk voltage every x days to reset the SoC to 100% for some BMS * JKBMS disable high voltage warning on bulk reenable after bulk was completed * fixed error * disable high voltage warning for all BMS when charging to bulk voltage * fix error and change default value measurementToleranceVariation from 0.025 to 0.5 else in OffGrid mode max voltage is always kept * Added temperature names to dbus/mqtt * Use current avg of last 300 cycles for TTG & TTS * Calculate only positive Time-to-SoC points * added current average of last 5 minutes * make CCL and DCL more clear * fix small error * bugfix: LLTJBD BMS SOC different in Xiaoxiang app and dbus-serialbattery * black formatting * JDB BMS - Control FETs for charge, discharge and disable / enable balancer (#761) * feature: Allow to control charge / discharge FET * feature: Allow to enable / disable balancer * bugfix: Cycle Capacity is in 10 mAh Fixes SoC with factor 100 * 100% percentage * JBD BMS show balancer state in GUI page IO (#763) * Bump version * Fix typos * Smaller fixes - fixes #792 (comment) * Removed comments from utils.py This should make more clear that there are no values to change * Updated changelog * possible fix for LLT/JBS connection problems #769 #777 * bugfix: LLT/JBD BMS general packet data size check * improved reinstall and disable script * LLT/JBD BMS - Improved error handling and automatical driver restart in case of error. Should fix: - #730 - #769 - #777 * Fixed Building wheel for dbus-fast won't finish on weak systems Fixes #785 * Support for Daly CAN Bus (#169) * support for Daly CAN Bus * fix constructor args * revert port, needs fix * add can filters * comment logger Some changes are still needed to work with the latest version. They will follow in a next PR. --------- Co-authored-by: Samuel Brucksch <[email protected]> Co-authored-by: Manuel <[email protected]> * JKBMS BLE - Introduction of automatic SOC reset (HW Version 11) (#736) * Introduction of automatic SOC reset for JK BMS (HW Version 11) * Fixed value mapping * Rework of the code to make it simpler to use without additional configuration. Moved execution of SOC reset. It's now executed while changing from "Float" to "Float Transition". * Implementation of suggested changes Persist initial BMS OVP and OVPR settings Make use of max_cell_voltage to calculate trigger value for OVP alert * Added: Daly CAN and JKBMS CAN * added CAN bms to installation script optimized CAN drivers * smaller fixes * Trigger JK BLE SOC reset when using Step Mode * Moved trigger_soc_reset() * fixes LLT/JBD SOC > 100% #769 * changed VOLTAGE_DROP behaviour * Fix JKBMS not starting if BMS manuf. date is empty * corrected bulk, absorption and soc reset terms * fix typo * add JKBMS_BLE debugging data * fix small error * added logging to config * add sleep before starting driver prevents lot of timeouts after reinstalling the driver, since the restart is now much faster than before * changed post install info * fix error * Daly BMS fixed embedded null byte #837 * added info for SoC reset to default config file * fix for #716 #716 * fix for #716 and JKBMS model recognition #716 * optimized logging * fix JKBMS recognition * added debugging * fixes #716 #716 --------- Co-authored-by: Holger Schultheiß <[email protected]> Co-authored-by: Stefan Seidel <[email protected]> Co-authored-by: Bernd Stahlbock <[email protected]> Co-authored-by: seidler2547 <[email protected]> Co-authored-by: ogurevich <[email protected]> Co-authored-by: wollew <[email protected]> Co-authored-by: Oleg Gurevich <[email protected]> Co-authored-by: peterohman <[email protected]> Co-authored-by: Strawder, Paul <[email protected]> Co-authored-by: Paul Strawder <[email protected]> Co-authored-by: Samuel Brucksch <[email protected]> Co-authored-by: Samuel Brucksch <[email protected]> Co-authored-by: ArendsM <[email protected]> Co-authored-by: Meik Arends <[email protected]>
Tried that solution on my RPI4 fails unfortunately. The hciattach fails for me with a timeout. |
I think it's hardware / raspberry firmware related. I will try to use a usb bluetooth device for a better connection. |
I think it's a software bug of bleak. We had this a year ago and it doesn't changed on using an external USB adapter. |
Honestly, I think it is a RPI / firmware issue. Once I encountered it, the only way to fix it on my RPI4 was to restart the entire systems several times (not like 2-3x, more like 5+). Also to my understanding there are several remapping issues known with RPI4 on UART ports and BT serial port. |
Here you can find more detailed info #372 |
I got it working with an USB bluetooth module. There are some needed requirements, the usb module must support BLE (bluetooth version > 4.0). Then some changes to bluetooth setting from the pi.
I will try it over some days, when it's stable I will create some code which can setup the needed requirements to the pi settings by enabled it in the config.ini. |
@mr-manuel please see pull request #890@idstein can you try if it also stable for you? |
I just did a manual test by running
And then waiting for the code from @Marvo2011 to bring BT up again. But the connection to the JBD doesn't get established directly afterwards. So the general problem of dropped connection still persists :-/ Here's the log of the manual test with hciconfig hci0 down. Please note that I modified the python code to output more logging (all the lines starting with ####). And I put more sleep commands between the shell commands. So the line references you see in the logfile don't match the code here on github. Around 22:03:57 it looks like there are 2 threads running at the same time, where one is doing the reset and the other is trying to connect to the BMS. This doesn't seem to be useful I guess. output of "tail -F -n 100 /data/log/dbus-blebattery.*/current | tai64nlocal"
|
@randomname32 Yes we now it takes a lot of time to bring it back. I pushed code for usage of an usb module, can you test this? #890 |
@randomname32 I have a PR for this in the queue, where the battery doesn't disconnect it the cell voltages are in the middle area. |
I now tested a Bluetooth USB dongle on the RPi. I did not use the code from your PR, but I did the required changes manually (dtoverlay=disable-bt in u-boot/config.txt). My dbus-serialbattery version is v1.0.20231128dev (did a fresh install before testing). I noticed 2 things:
I will have an eye on this and see if I get random connection issues or the bt device being down. |
Nice sounds good, for me it's stable for 5 days now. |
#890 with usb bluetooth module fixed it. |
For me, the bluetooth connection has also been stable for 5 days now.
|
* fix Sinowealth not loading #702 * fix unique identifier function * enable BMS over config, if disabled by default Now you can also add more then one BMS for BMS_TYPE * show battery port in log * ANT BMS fixes Fixed that other devices are recognized as ANT BMS * Sinowealth BMS fixes Fixed that other devices are recognized as Sinowealth BMS * improved publish_battery error handling switched from error count to seconds * Improve Battery Voltage Handling in Linear Absorption Mode * Refactor change time() to int(time()) for consistency in max_voltage_start_time and tDiff calculation * Refactor battery voltage calculations for efficiency and clarity * Remove penalty_buffer * Reset max_voltage_start_time wenn we going to bulk(dynamic) mode * updated changelog * fix reply processing * Reduce the big inrush current, if the CVL jumps from Bulk/Absorbtion to Float fix #659 * Check returned data lenght for Seplos BMS Be stricter about the return data we accept, might fix the problem of grid meters accidently being recognized as a Seplos * Validate current, voltage, capacity and SoC for all BMS This prevents that a device, which is no BMS, is detected as BMS * removed double check * bump version * fix validation if None * updated changelog * proposal to #659 formatted :) * bugfix proposal to #659 * refactor setting float charge_mode * fix type error, removed bluetooth cronjob * updated changelog * fix rs485 write communication errors by inserting sleeps, add debug print for charge mode and fix crash on write soc failures * fix write problem on set_soc. also changed the switch charge/discharge function, just in case * debug msg * Bluetooth optimizations * Fixes by @peterohman #505 (comment) * fix #712 * fix meaningless time to go values * fix meaningless time to go values * Duration of transition to float depends on number of cells * Float transition - Voltage drop per second * Update hlpdatabms4s.py * Validate setting of FLOAT_CELL_VOLTAGE and avoid misconfiguration * consider utils.LINEAR_RECALCULATION_EVERY to refresh CVL * cleanup * consider utils.LINEAR_RECALCULATION_EVERY to refresh CVL * small refactor, introduced set_cvl_linear function to set CVL only once every LINEAR_RECALCULATION_EVERY seconds * fix typo * updated changelog * remove debug msg * remove debug msg * undo debug change * Daly BMS make auto reset soc configurable * added debug and error information for CVL * fix proposal for #733 (#735) * Added: Tollerance to enter float voltage once the timer is triggered * Add bulk voltage Load to bulk voltage every x days to reset the SoC to 100% for some BMS * JKBMS disable high voltage warning on bulk reenable after bulk was completed * fixed error * disable high voltage warning for all BMS when charging to bulk voltage * fix error and change default value measurementToleranceVariation from 0.025 to 0.5 else in OffGrid mode max voltage is always kept * Added temperature names to dbus/mqtt * Use current avg of last 300 cycles for TTG & TTS * Calculate only positive Time-to-SoC points * added current average of last 5 minutes * make CCL and DCL more clear * fix small error * bugfix: LLTJBD BMS SOC different in Xiaoxiang app and dbus-serialbattery * black formatting * JDB BMS - Control FETs for charge, discharge and disable / enable balancer (#761) * feature: Allow to control charge / discharge FET * feature: Allow to enable / disable balancer * bugfix: Cycle Capacity is in 10 mAh Fixes SoC with factor 100 * 100% percentage * JBD BMS show balancer state in GUI page IO (#763) * Bump version * Fix typos * Smaller fixes - fixes #792 (comment) * Removed comments from utils.py This should make more clear that there are no values to change * Updated changelog * possible fix for LLT/JBS connection problems #769 #777 * bugfix: LLT/JBD BMS general packet data size check * improved reinstall and disable script * LLT/JBD BMS - Improved error handling and automatical driver restart in case of error. Should fix: - #730 - #769 - #777 * Fixed Building wheel for dbus-fast won't finish on weak systems Fixes #785 * Support for Daly CAN Bus (#169) * support for Daly CAN Bus * fix constructor args * revert port, needs fix * add can filters * comment logger Some changes are still needed to work with the latest version. They will follow in a next PR. --------- Co-authored-by: Samuel Brucksch <[email protected]> Co-authored-by: Manuel <[email protected]> * JKBMS BLE - Introduction of automatic SOC reset (HW Version 11) (#736) * Introduction of automatic SOC reset for JK BMS (HW Version 11) * Fixed value mapping * Rework of the code to make it simpler to use without additional configuration. Moved execution of SOC reset. It's now executed while changing from "Float" to "Float Transition". * Implementation of suggested changes Persist initial BMS OVP and OVPR settings Make use of max_cell_voltage to calculate trigger value for OVP alert * Added: Daly CAN and JKBMS CAN * added CAN bms to installation script optimized CAN drivers * smaller fixes * Trigger JK BLE SOC reset when using Step Mode * Moved trigger_soc_reset() * fixes LLT/JBD SOC > 100% #769 * changed VOLTAGE_DROP behaviour * Fix JKBMS not starting if BMS manuf. date is empty * corrected bulk, absorption and soc reset terms * fix typo * add JKBMS_BLE debugging data * fix small error * Some changes for lost bluetooth connection / hci_uart stack restart * added logging to config * add sleep before starting driver prevents lot of timeouts after reinstalling the driver, since the restart is now much faster than before * changed post install info * fix error * Daly BMS fixed embedded null byte #837 * added info for SoC reset to default config file * fix for #716 #716 * fix for #716 and JKBMS model recognition #716 * optimized logging * fix JKBMS recognition * added debugging * fixes #716 #716 * Bind device instance to unique_identifier #718 * added data types to battery class disabled unused variables * save current charge state #840 * correct file permissions * updated changelog * added periodic saveChargeDetails * fix some small errors * fix issue with ruuvi tags When there are hundreds of unused ruuvi tags in the settings list that where added because thei where nearby the driver does not start correctly. These stale entries are disabled on the driver startup. The issue was already filed to Victron developers * CVL with i-controller instead of penaltysum * cvl_controller: switch to choose PenaltySum or ICOntroller + documentation * docu enhancement * Add setting and install logic for usb bluetooth module * round temperatures * changed battery disconnect behaviour * Fixes #891 #891 * updated changelog * Add bluetooth device note to config.default.ini * Fix typo in bluetooth note in config.default.ini * fixed error in new cvl_controller * fixed float division by zero and code optimization * Restart MAX_VOLTAGE_TIME_SEC if cell diff > CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_TIME_RESTART * Calculation of the SOC based on coloumb-counting (#868) * Calculation of the SOC in the driver based on coloumb-counting * soc_calc: add current correction before integration * soc_calc: correction map for current * Soc_calc: CorrectionMap, switch to turn on/off correction, selectable initial value * soc_calc: Bugfix * soc_calc: Bugfix * store soc in dbus for restart * store soc in dbus for restart (formatted) * store soc in dbus for restart (bugfix) * save soc_calc only after change > 1.0 * store soc in dbus for restart (bugfix) * logger does not work this way. do not know why * writing and reading to dbus works * Removed options: SOC_CALC_CURRENT_CORRECTION, SOC_CALC_RESET_VALUE_ON_RESTART, SOC_CALC_INIT_VALUE sort soc_calc alphabetically * fixed comments * Updated changelog, small fixes * Changed: PUBLISH_CONFIG_VALUES from 0/1 to True/False * Changed: Code optimizations - Changed some variables to be more clear - Added comments for easier code understanding * Calculated SOC: Added two decimals, added BMS SOC for MQTT & Node-RED * Updated changelog, small fixes * Changed: PUBLISH_CONFIG_VALUES from 0/1 to True/False * Changed: Code optimizations - Changed some variables to be more clear - Added comments for easier code understanding * Calculated SOC: Added two decimals, added BMS SOC for MQTT & Node-RED * Fix #898 #898 * Changed: Fix issue loading settings from dbus * Added nightly install option makes it easier for users to pretest fixes * Changed: more detailed error output when an exception happens * Possible fix for #912 #912 * Fixes #919 #919 * Changed: Exit script with error, if port excluded else the serialstarter stops at the dbus-serialbattery * Fixed some smaller errors * Updated pre-release workflow * Fix JK BMS connection restart when bluetooth fails. This fix installs a new thread to monitor the state of the original scraping thread. If scraping thread dies, it verifies that it did not because the scraping was intentionally stopped by calling stop_scrapping. When restarting the scrapper, it first calls the bluetooth reset lambda function that was passed in the class contructor, such that bluetooth is ready to make a proper connection. * Fixes #916 #916 * Added Venus OS version to logfile * Fix #840 #840 * Small code formatting fixes * Optimized reinstall script. Restart GUI only on changes. * Display debugging data in GUI when DEBUG enabled * Install script now shows repositories and version numbers * Update daly_can.py Fixing #950 for DalyBMS * Update jkbms_can.py Fixing #950 for Jk BMS * Fix black lint check * Fixes #970 #970 * Fixed some errors in restoring values from dbus settings * Moved sleep on start for all BMS * Update config description * Reworked a part of the default config * fix typo in stopping services when reinstalling * Fix Time-to-SoC and Time-to-Go calculation * Add changelog info * Round sum and diff voltage * Temperature limitation variables where changed * SoC limitation variables where changed * Added error messages * Remove unneeded code * Reset SoC to 0% if empty * Add GUIv2 for dbus-serialbattery * Check free space before installing * Added new GUIv2 version * Removed Python 2 compatibility * Changelog update * Code cleanup - Removed: get_temperatures() - Removed: update_last_seen() * Bluetooth code optimizations * Fixed some JKBMS BLE not starting #819 * Check if packages are already installed before install * Fixed some SOC calculation errors * Fixed None SOC on driver start * Do not show and allow button change when callback is missing for: - ForceChargingOff - ForceDischargingOff - TurnBalancingOff * Check if a device instance is already used by creating a PID file * Log and execute SOC reset to 100% or 0% only once * Update GitHub workflow and issue templates * Fixed LLT/JBD BMS with only on temperature sensor #791 #971 * Fix warning on reinstall * Fix missing IO control for JBDBMS #992 #992 * Prepare for removing dev branch --------- Co-authored-by: ogurevich <[email protected]> Co-authored-by: Bernd Stahlbock <[email protected]> Co-authored-by: wollew <[email protected]> Co-authored-by: Oleg Gurevich <[email protected]> Co-authored-by: peterohman <[email protected]> Co-authored-by: Strawder, Paul <[email protected]> Co-authored-by: Paul Strawder <[email protected]> Co-authored-by: Samuel Brucksch <[email protected]> Co-authored-by: Samuel Brucksch <[email protected]> Co-authored-by: ArendsM <[email protected]> Co-authored-by: Meik Arends <[email protected]> Co-authored-by: Marvo2011 <[email protected]> Co-authored-by: cflenker <[email protected]> Co-authored-by: cflenker <[email protected]> Co-authored-by: Cupertino Miranda <[email protected]> Co-authored-by: Martin Polehla <[email protected]>
Describe the bug
When I connect a JBD BMS over bluetooth the connection drops randomly, all charger and loads stoped working.
How to reproduce
See log....
Expected behavior
BMS / driver should reconnect, for the moment I have to restart the driver.
Driver version
1.0.20230531 (also latest dev nightly)
Venus OS device type
Raspberry Pi
Venus OS version
3.10~2
BMS type
Smart BMS (LLT, JBD, Overkill Solar)
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: