Closed dyn4mic closed 11 months ago
Did you already try the nightly
build of the dev
branch? If not please do so and enable LOGGING = DEBUG
in the conig.ini
. The debugging option is only working with the latest nightly build.
Yes, just tried again:
root@raspberrypi2:~# tail -F -n 100 /data/log/dbus-serialbattery.ttyUSB0/current | tai64nlocal
2023-11-17 18:50:09.312842500 *** CCGX booted (0) ***
2023-11-17 18:51:07.556867500 INFO:SerialBattery:
2023-11-17 18:51:07.557400500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-17 18:51:07.558735500 INFO:SerialBattery:dbus-serialbattery v1.0.20231103dev
2023-11-17 18:51:23.568457500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2023-11-17 18:51:23.569058500 INFO:SerialBattery:Testing Jkbms
2023-11-17 18:51:24.037489500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 18:51:24.546533500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2023-11-17 18:51:24.547311500 INFO:SerialBattery:Testing Jkbms
2023-11-17 18:51:24.929213500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 18:51:25.442819500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2023-11-17 18:51:25.444306500 INFO:SerialBattery:Testing Jkbms
2023-11-17 18:51:25.856956500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 18:51:26.368083500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0
2023-11-17 18:52:33.423348500 INFO:SerialBattery:
2023-11-17 18:52:33.423760500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-17 18:52:33.424669500 INFO:SerialBattery:dbus-serialbattery v1.0.20231103dev
2023-11-17 18:52:49.441514500 INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
2023-11-17 18:52:49.441961500 INFO:SerialBattery:Testing Jkbms
2023-11-17 18:52:49.710135500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 18:52:50.212207500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2023-11-17 18:52:50.212651500 INFO:SerialBattery:Testing Jkbms
2023-11-17 18:52:50.479427500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 18:52:50.981561500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2023-11-17 18:52:50.982011500 INFO:SerialBattery:Testing Jkbms
2023-11-17 18:52:51.248932500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 18:52:51.751076500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0
If not please do so and enable
LOGGING = DEBUG
in theconig.ini
.
You have not enabled debugging:
i thought i did.
root@raspberrypi2:~# cat /data/etc/dbus-serialbattery/config.ini
[DEFAULT]
LOGGING = DEBUG
; --------- Additional settings ---------
; Specify only one BMS type to load else leave empty to try to load all available
; -- Available BMS:
; Daly, Ecs, HeltecModbus, HLPdataBMS4S, Jkbms, Lifepower, LltJbd, Renogy, Seplos
; -- Available BMS, but disabled by default:
; https://louisvdw.github.io/dbus-serialbattery/general/install#how-to-enable-a-disabled-bms
; Ant, MNB, Sinowealth
BMS_TYPE = Jkbms
root@raspberrypi2:~#
Have you rebooted after the change?
Multiple times. any chance to get in touch via discord or something else? Appreciate the support.
Full reinstall(uninstall+reboot+reinstall+reboot)
2023-11-17 19:20:03.351571500 *** CCGX booted (0) ***
2023-11-17 19:21:36.755629500 INFO:SerialBattery:
2023-11-17 19:21:36.756565500 INFO:SerialBattery:Starting dbus-serialbattery
2023-11-17 19:21:36.758012500 INFO:SerialBattery:dbus-serialbattery v1.0.20231103dev
tail: /data/log/dbus-serialbattery.ttyUSB0/current has been replaced; following end of new file
2023-11-17 19:21:52.919184500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:52.919190500 INFO:SerialBattery:Testing Daly at address "\x80"
2023-11-17 19:21:53.035427500 DEBUG:SerialBattery:read_sentence \x94: no sentence start received
2023-11-17 19:21:53.035972500 DEBUG:SerialBattery:request_data: bad reply no. 0
2023-11-17 19:21:53.036460500 DEBUG:SerialBattery:No data received in read_status_data()
2023-11-17 19:21:53.037656500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:53.038188500 INFO:SerialBattery:Testing Ecs
2023-11-17 19:21:53.099080500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:53.099577500 INFO:SerialBattery:Testing HeltecModbus
2023-11-17 19:21:53.100407500 DEBUG:SerialBattery:Testing on slave address 1
2023-11-17 19:21:53.511568500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 1/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:53.921548500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 2/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:54.330941500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 3/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:54.740341500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 4/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:55.150206500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 5/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:55.560677500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 6/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:55.971406500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 7/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:56.381165500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 8/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:56.791551500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 9/10 for /dev/ttyUSB0(1)
2023-11-17 19:21:56.792039500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:56.792475500 INFO:SerialBattery:Testing HLPdataBMS4S
2023-11-17 19:21:57.600576500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:57.601032500 INFO:SerialBattery:Testing Jkbms
2023-11-17 19:21:57.874331500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:57.875853500 INFO:SerialBattery:Testing Lifepower
2023-11-17 19:21:58.146259500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:58.147916500 DEBUG:SerialBattery:>>> ERROR: Incorrect Data
2023-11-17 19:21:58.153690500 INFO:SerialBattery:Testing LltJbd
2023-11-17 19:21:58.421448500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:58.423196500 INFO:SerialBattery:Testing Renogy at address "\x30"
2023-11-17 19:21:58.692623500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:58.694231500 INFO:SerialBattery:Testing Renogy at address "\xf7"
2023-11-17 19:21:58.968966500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:21:58.970558500 INFO:SerialBattery:Testing Seplos
2023-11-17 19:21:58.971437500 DEBUG:SerialBattery:read status data
2023-11-17 19:21:58.972134500 DEBUG:SerialBattery:read serial data seplos
2023-11-17 19:21:58.976829500 DEBUG:SerialBattery:wrote 20 bytes to serial port /dev/ttyUSB0, command=b'~20004642E00201FD36\r'
2023-11-17 19:21:59.979013500 DEBUG:SerialBattery:short read, data=b''
2023-11-17 19:21:59.980501500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:00.481972500 INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
2023-11-17 19:22:00.482797500 INFO:SerialBattery:Testing Daly at address "\x40"
2023-11-17 19:22:00.609237500 DEBUG:SerialBattery:read_sentence \x94: no sentence start received
2023-11-17 19:22:00.609244500 DEBUG:SerialBattery:request_data: bad reply no. 0
2023-11-17 19:22:00.609745500 DEBUG:SerialBattery:No data received in read_status_data()
2023-11-17 19:22:00.611035500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:00.611628500 INFO:SerialBattery:Testing Daly at address "\x80"
2023-11-17 19:22:00.737677500 DEBUG:SerialBattery:read_sentence \x94: no sentence start received
2023-11-17 19:22:00.738143500 DEBUG:SerialBattery:request_data: bad reply no. 0
2023-11-17 19:22:00.738535500 DEBUG:SerialBattery:No data received in read_status_data()
2023-11-17 19:22:00.739757500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:00.740217500 INFO:SerialBattery:Testing Ecs
2023-11-17 19:22:01.149656500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:01.150085500 INFO:SerialBattery:Testing HeltecModbus
2023-11-17 19:22:01.150736500 DEBUG:SerialBattery:Testing on slave address 1
2023-11-17 19:22:01.560915500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 1/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:01.969859500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 2/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:02.378634500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 3/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:02.787963500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 4/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:03.196749500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 5/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:03.605759500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 6/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:04.014944500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 7/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:04.427441500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 8/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:04.836824500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 9/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:04.837282500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:04.837711500 INFO:SerialBattery:Testing HLPdataBMS4S
2023-11-17 19:22:05.645750500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:05.646228500 INFO:SerialBattery:Testing Jkbms
2023-11-17 19:22:05.916147500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:05.917501500 INFO:SerialBattery:Testing Lifepower
2023-11-17 19:22:06.184946500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:06.186272500 DEBUG:SerialBattery:>>> ERROR: Incorrect Data
2023-11-17 19:22:06.186756500 INFO:SerialBattery:Testing LltJbd
2023-11-17 19:22:06.456744500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:06.458182500 INFO:SerialBattery:Testing Renogy at address "\x30"
2023-11-17 19:22:06.726496500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:06.727984500 INFO:SerialBattery:Testing Renogy at address "\xf7"
2023-11-17 19:22:06.997608500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:06.999313500 INFO:SerialBattery:Testing Seplos
2023-11-17 19:22:07.000089500 DEBUG:SerialBattery:read status data
2023-11-17 19:22:07.000778500 DEBUG:SerialBattery:read serial data seplos
2023-11-17 19:22:07.005277500 DEBUG:SerialBattery:wrote 20 bytes to serial port /dev/ttyUSB0, command=b'~20004642E00201FD36\r'
2023-11-17 19:22:08.007432500 DEBUG:SerialBattery:short read, data=b''
2023-11-17 19:22:08.008971500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:08.511761500 INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
2023-11-17 19:22:08.511768500 INFO:SerialBattery:Testing Daly at address "\x40"
2023-11-17 19:22:08.637785500 DEBUG:SerialBattery:read_sentence \x94: no sentence start received
2023-11-17 19:22:08.637793500 DEBUG:SerialBattery:request_data: bad reply no. 0
2023-11-17 19:22:08.637796500 DEBUG:SerialBattery:No data received in read_status_data()
2023-11-17 19:22:08.640146500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:08.640152500 INFO:SerialBattery:Testing Daly at address "\x80"
2023-11-17 19:22:08.764750500 DEBUG:SerialBattery:read_sentence \x94: no sentence start received
2023-11-17 19:22:08.765377500 DEBUG:SerialBattery:request_data: bad reply no. 0
2023-11-17 19:22:08.765893500 DEBUG:SerialBattery:No data received in read_status_data()
2023-11-17 19:22:08.767244500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:08.767888500 INFO:SerialBattery:Testing Ecs
2023-11-17 19:22:09.177218500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:09.177865500 INFO:SerialBattery:Testing HeltecModbus
2023-11-17 19:22:09.178616500 DEBUG:SerialBattery:Testing on slave address 1
2023-11-17 19:22:09.588882500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 1/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:10.001180500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 2/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:10.406736500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 3/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:10.817599500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 4/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:11.223857500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 5/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:11.632262500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 6/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:12.040804500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 7/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:12.449232500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 8/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:12.862266500 DEBUG:SerialBattery:testing failed (No communication with the instrument (no answer)) 9/10 for /dev/ttyUSB0(1)
2023-11-17 19:22:12.862855500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:12.863305500 INFO:SerialBattery:Testing HLPdataBMS4S
2023-11-17 19:22:13.671284500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:13.676575500 INFO:SerialBattery:Testing Jkbms
2023-11-17 19:22:13.942080500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:13.943564500 INFO:SerialBattery:Testing Lifepower
2023-11-17 19:22:14.214763500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:14.216339500 DEBUG:SerialBattery:>>> ERROR: Incorrect Data
2023-11-17 19:22:14.216974500 INFO:SerialBattery:Testing LltJbd
2023-11-17 19:22:14.486087500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:14.487531500 INFO:SerialBattery:Testing Renogy at address "\x30"
2023-11-17 19:22:14.755316500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:14.756731500 INFO:SerialBattery:Testing Renogy at address "\xf7"
2023-11-17 19:22:15.029100500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:15.030523500 INFO:SerialBattery:Testing Seplos
2023-11-17 19:22:15.031175500 DEBUG:SerialBattery:read status data
2023-11-17 19:22:15.031765500 DEBUG:SerialBattery:read serial data seplos
2023-11-17 19:22:15.036258500 DEBUG:SerialBattery:wrote 20 bytes to serial port /dev/ttyUSB0, command=b'~20004642E00201FD36\r'
2023-11-17 19:22:16.038284500 DEBUG:SerialBattery:short read, data=b''
2023-11-17 19:22:16.039607500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-11-17 19:22:16.540948500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0
DEBUG option seems to be recognised
Multiple times. any chance to get in touch via discord or something else? Appreciate the support.
If you click on my name, you will find all you need.
There is no data comming back from the BMS. Cloud you please post a picture of the whole connection, when attached to the Raspberry Pi and JKBMS? If all the cabeling is correct, then the connection of the JKBMS maybe is faulty, the RS485 converter is faulty or the USB to serial adapter is faulty. What you could try is to connect a USB to TTL adapter to the GPS port of the JKBMS. Be aware that the voltage comming out on the + of the connection is Vbatt.
Hey guys, I have exactly the same BMS and also can't get it to work using serial. I tried Bluetooth first, but it drops after a while for unknown reason, so I wanted to go serial to have it rock solid. Here is my log:
> 2023-11-21 17:56:25.043767500 INFO:SerialBattery:Testing Jkbms
> 2023-11-21 17:56:25.069018500 ERROR:SerialBattery:Unexpected err=error('unpack_from requires a buffer of at least 5 bytes for unpacking 5 bytes at offset 0 (actual buffer size is 4)'), type(err)=<class 'struct.error'>
(INFO:SerialBattery:dbus-serialbattery v1.0.20230531)
BTW: When I switch up RX/TX then I get "No reply - returning" as well.
My BMS Hardware version is "V11.XW", software "V11.261"
@wasnertobias thanks for comment. kind of nice to see that i am not the only one. giving more insight, my BMS was bought via NKON.nl in October.
my upcoming things to try:
nkon was assuring me the adapter i bought(also from them) is suited for the BMS
Maybe this new BMS has another command to request the data from the BMS. Could you ask your seller for the communication protocol?
@mr-manuel The seller has provided me with the following document can协议.pdf
Unfortunately this is the CAN documentation. We need the same for the serial connection (UART/TTL/RS485).
@mr-manuel Sorry for that, I tried again to get the correct document. Not sure if this is the one you were asking for: rs485通信协议.pdf
Yes this is the document I need. Unfortunately the structure is the same as the driver was implemented. This makes it unclear, why this is not working. Help is appreciated.
@mr-manuel thanks for your assistance, to give an update, i tried an external bluetooth adapter, sadly after some time it just stalled, so no updated information was visible in venus os(dev latest version), ended up depleting the battery allthough lower limit of SOC reached, for latest release a lot of lost BMS came up, which initially led me to cable the connection.
next step TTL, finally got a cabled connection to my BMS and received data. I went with https://amzn.eu/d/eDXb5DW
I will observe the situation how stable but i expect no issues from here on forward.
Awesome job you have done here. Kudos and many thanks.
further research brought me to this forum entry: https://www.akkudoktor.net/forum/bms-batterie-management-monitoring-system/zusammenfassung-jk-bms-victron-gx/
recommending https://amzn.eu/d/aVQLW29
@mr-manuel until now i didnt find any specific recommendations on this project in regards to usb adapters. Would be great to add this for upcoming people.
My experience in regards to jkbms:
Describe the problem
Cant get the serial interface get to work. App About Section: how i connect the BMS to my raspberry pi 3 via USB on the test the tx led is blinking but the rx led never blinks on the USB adapter. Kindly asking for assistance. The bluetooth connection is working, sadly not very stable thats why i want to have cabled version. with other version of the driver(dev/latest or beta) the bluetooth connection has some other drawbacks. BLE connection should be out of scope for this issue report.
To give more insight on the BLE connection, and why i want to switch to cabled version: i connect BLE via onboard raspberry pi 3 bluetooth controller
Driver version
v1.0.20230531
Venus OS device type
Raspberry Pi
Venus OS version
v3.11
BMS type
JKBMS / Heltec BMS
Cell count
4s
Connection type
Serial USB adapter to RS485
Config file
Relevant log output
Any other information that may be helpful
No response