Skip to content
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

JBD BMS will not be recognized (reopen of #608) #636

Closed
sloesp opened this issue May 12, 2023 · 27 comments
Closed

JBD BMS will not be recognized (reopen of #608) #636

sloesp opened this issue May 12, 2023 · 27 comments
Assignees
Labels
support Support request

Comments

@sloesp
Copy link

sloesp commented May 12, 2023

Describe the problem

This is a reopen of #608. Now with physical cells.

Hello,
i am using a Jaibaida AP21S002 21S 300A BMS with the RS485/USB Interface. If i use the JBDTools on Windows i get Data from the BMS. With Venus OS on RASP-Pi i see the LEDs on the Interface blinking for both directions (send/receive) but the are not BMS Information at the GUI.

Any Ideas?
Thanks so far.
Slotty

Driver version

0.14.3

Venus OS device type

Raspberry Pi

Venus OS version

V2.92 same with 2.93

BMS type

Smart BMS (LLT, JBD, Overkill Solar)

Cell count

8

Connection type

Serial USB adapter to RS485

Config file

original utils.py

Relevant log output

@400000006453a4fd23a7a5bc INFO:SerialBattery:Testing LltJbd
@400000006453a4fd2a21742c INFO:SerialBattery:Testing Ant
@400000006453a4fd3a038a24 ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4fd3a1600b4 ERROR:SerialBattery:>>> ERROR: Incorrect Data
@400000006453a4fd3a1f99bc INFO:SerialBattery:Testing Daly
@400000006453a4fe0e6c9e8c ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4fe0e7ce684 INFO:SerialBattery:Testing Daly
@400000006453a4fe1e60bdb4 ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4fe1e71154c INFO:SerialBattery:Testing Jkbms
@400000006453a4fe2e63b1bc ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4fe2e741124 INFO:SerialBattery:Testing Lifepower
@400000006453a4ff02c8074c ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4ff02d7c2a4 ERROR:SerialBattery:>>> ERROR: Incorrect Data
@400000006453a4ff02e17aec INFO:SerialBattery:Testing Renogy
@400000006453a4ff12c2f4a4 ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4ff12d3a22c INFO:SerialBattery:Testing Renogy
@400000006453a4ff22b22de4 ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006453a4ff22c2a8a4 INFO:SerialBattery:Testing Ecs
@400000006453a500085e150c ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyACM0

Any other information that may be helpful

No response

@sloesp sloesp added the support Support request label May 12, 2023
@mr-manuel
Copy link
Collaborator

Hi, can you post the output of ls -l /dev/tty*?

@sloesp
Copy link
Author

sloesp commented May 12, 2023

Hello, the output is

crw--w----    1 root     tty         4,   0 Jan  1  1970 /dev/tty0
crw-------    1 root     tty         4,   1 May 12 11:53 /dev/tty1
crw--w----    1 root     tty         4,  10 Jan  1  1970 /dev/tty10
crw--w----    1 root     tty         4,  11 Jan  1  1970 /dev/tty11
crw--w----    1 root     tty         4,  12 Jan  1  1970 /dev/tty12
crw--w----    1 root     tty         4,  13 Jan  1  1970 /dev/tty13
crw--w----    1 root     tty         4,  14 Jan  1  1970 /dev/tty14
crw--w----    1 root     tty         4,  15 Jan  1  1970 /dev/tty15
crw--w----    1 root     tty         4,  16 Jan  1  1970 /dev/tty16
crw--w----    1 root     tty         4,  17 Jan  1  1970 /dev/tty17
crw--w----    1 root     tty         4,  18 Jan  1  1970 /dev/tty18
crw--w----    1 root     tty         4,  19 Jan  1  1970 /dev/tty19
crw--w----    1 root     tty         4,   2 Jan  1  1970 /dev/tty2
crw--w----    1 root     tty         4,  20 Jan  1  1970 /dev/tty20
crw--w----    1 root     tty         4,  21 Jan  1  1970 /dev/tty21
crw--w----    1 root     tty         4,  22 Jan  1  1970 /dev/tty22
crw--w----    1 root     tty         4,  23 Jan  1  1970 /dev/tty23
crw--w----    1 root     tty         4,  24 Jan  1  1970 /dev/tty24
crw--w----    1 root     tty         4,  25 Jan  1  1970 /dev/tty25
crw--w----    1 root     tty         4,  26 Jan  1  1970 /dev/tty26
crw--w----    1 root     tty         4,  27 Jan  1  1970 /dev/tty27
crw--w----    1 root     tty         4,  28 Jan  1  1970 /dev/tty28
crw--w----    1 root     tty         4,  29 Jan  1  1970 /dev/tty29
crw--w----    1 root     tty         4,   3 Jan  1  1970 /dev/tty3
crw--w----    1 root     tty         4,  30 Jan  1  1970 /dev/tty30
crw--w----    1 root     tty         4,  31 Jan  1  1970 /dev/tty31
crw--w----    1 root     tty         4,  32 Jan  1  1970 /dev/tty32
crw--w----    1 root     tty         4,  33 Jan  1  1970 /dev/tty33
crw--w----    1 root     tty         4,  34 Jan  1  1970 /dev/tty34
crw--w----    1 root     tty         4,  35 Jan  1  1970 /dev/tty35
crw--w----    1 root     tty         4,  36 Jan  1  1970 /dev/tty36
crw--w----    1 root     tty         4,  37 Jan  1  1970 /dev/tty37
crw--w----    1 root     tty         4,  38 Jan  1  1970 /dev/tty38
crw--w----    1 root     tty         4,  39 Jan  1  1970 /dev/tty39
crw--w----    1 root     tty         4,   4 Jan  1  1970 /dev/tty4
crw--w----    1 root     tty         4,  40 Jan  1  1970 /dev/tty40
crw--w----    1 root     tty         4,  41 Jan  1  1970 /dev/tty41
crw--w----    1 root     tty         4,  42 Jan  1  1970 /dev/tty42
crw--w----    1 root     tty         4,  43 Jan  1  1970 /dev/tty43
crw--w----    1 root     tty         4,  44 Jan  1  1970 /dev/tty44
crw--w----    1 root     tty         4,  45 Jan  1  1970 /dev/tty45
crw--w----    1 root     tty         4,  46 Jan  1  1970 /dev/tty46
crw--w----    1 root     tty         4,  47 Jan  1  1970 /dev/tty47
crw--w----    1 root     tty         4,  48 Jan  1  1970 /dev/tty48
crw--w----    1 root     tty         4,  49 Jan  1  1970 /dev/tty49
crw--w----    1 root     tty         4,   5 Jan  1  1970 /dev/tty5
crw--w----    1 root     tty         4,  50 Jan  1  1970 /dev/tty50
crw--w----    1 root     tty         4,  51 Jan  1  1970 /dev/tty51
crw--w----    1 root     tty         4,  52 Jan  1  1970 /dev/tty52
crw--w----    1 root     tty         4,  53 Jan  1  1970 /dev/tty53
crw--w----    1 root     tty         4,  54 Jan  1  1970 /dev/tty54
crw--w----    1 root     tty         4,  55 Jan  1  1970 /dev/tty55
crw--w----    1 root     tty         4,  56 Jan  1  1970 /dev/tty56
crw--w----    1 root     tty         4,  57 Jan  1  1970 /dev/tty57
crw--w----    1 root     tty         4,  58 Jan  1  1970 /dev/tty58
crw--w----    1 root     tty         4,  59 Jan  1  1970 /dev/tty59
crw--w----    1 root     tty         4,   6 Jan  1  1970 /dev/tty6
crw--w----    1 root     tty         4,  60 Jan  1  1970 /dev/tty60
crw--w----    1 root     tty         4,  61 Jan  1  1970 /dev/tty61
crw--w----    1 root     tty         4,  62 Jan  1  1970 /dev/tty62
crw--w----    1 root     tty         4,  63 Jan  1  1970 /dev/tty63
crw--w----    1 root     tty         4,   7 Jan  1  1970 /dev/tty7
crw--w----    1 root     tty         4,   8 Jan  1  1970 /dev/tty8
crw--w----    1 root     tty         4,   9 Jan  1  1970 /dev/tty9
crw-rw----    1 root     dialout   166,   0 May 12 13:02 /dev/ttyACM0
crw-------    1 root     tty       204,  64 May 12 11:53 /dev/ttyAMA0
crw-rw----    1 root     dialout     4,  64 Jan  1  1970 /dev/ttyS0
crw-------    1 root     root        5,   3 Jan  1  1970 /dev/ttyprintk

@mr-manuel
Copy link
Collaborator

Are you using a Raspberry Pi RS485 HAT? Can you please post pictures of your connection?

@sloesp
Copy link
Author

sloesp commented May 12, 2023

No i am using the jbd Uart Tool which works fine with the JBD Windows Software. So the connection must be ok. Maybe its a problem with the amount of testing many different bmstypes. How can i minimize the test to only one bms (lltjbd) ?
In the Log, it seems like there is no response at the lltjbd test. Am i right?

@mr-manuel
Copy link
Collaborator

/dev/ttyAMA0 normally is a Raspberry Pi RS485 HAT, therefore I asked.

Still waiting for pictures to help you.

Please try the beta version of the driver.

@sloesp
Copy link
Author

sloesp commented May 13, 2023

Here is the picture of my connections
grafik

@sloesp
Copy link
Author

sloesp commented May 13, 2023

With the nightly build installed i got the following log

@40000000645f693406911954 INFO:SerialBattery:Testing Jkbms
@40000000645f69341694a1cc ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000645f6934169fc55c INFO:SerialBattery:Testing Lifepower
@40000000645f693426704b3c ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000645f6934267b093c ERROR:SerialBattery:>>> ERROR: Incorrect Data
@40000000645f69342681a88c INFO:SerialBattery:Testing LltJbd
@40000000645f69342cd3a3ac ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
@40000000645f69342cda7d94 INFO:SerialBattery:Testing Renogy
@40000000645f6935010df36c ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000645f69350118dc64 INFO:SerialBattery:Testing Renogy

@mr-manuel
Copy link
Collaborator

There were some issues with the JBD/LLT in the beta. Can you try this one?

https://github.com/mr-manuel/venus-os_dbus-serialbattery/releases/tag/v1.0.20230515beta

@Clericerr
Copy link

Hello,
I had the same problem with the JBD RS485 to USB converters. The problem is that these are recognized as ACM0 and are therefore interpreted by Venus as a partial GPS adapter. I was able to solve the problem by adapting the serial-starter.rules file.

  1. read out the ID_SERIAL_SHORT from the converter with:
    udevadm info --query=property --name=/dev/ttyACM0

  2. open etc/udev/rules.d/serial-starter.rules
    image

  3. add your converter

ACTION=="add", ENV{ID_BUS}=="usb", ENV{ID_SERIAL_SHORT}=="Add your ID here", ENV{VE_SERVICE}="sbattery"

image

@sloesp
Copy link
Author

sloesp commented May 16, 2023

I am not sure that you got me response. So here again.

This is the Log for the named beta version.

Logs
@400000006460e6dc34bf41fc INFO:SerialBattery:
@400000006460e6dc34cf0524 INFO:SerialBattery:Starting dbus-serialbattery
@400000006460e6dc3500235c INFO:SerialBattery:dbus-serialbattery v1.0.20230515beta
@400000006460e6dc35003eb4 INFO:SerialBattery:Testing Daly
@400000006460e6dd189d8574 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6de021d7b24 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6de0224d5f4 INFO:SerialBattery:No reply to cmd 94
@400000006460e6de022b0bcc WARNING:SerialBattery:No data received in read_status_data()
@400000006460e6de21490cac WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6df0ad450e4 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6df0adc8e44 INFO:SerialBattery:No reply to cmd 90
@400000006460e6df2a16a68c WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e01391e91c WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e0139a267c INFO:SerialBattery:No reply to cmd 90
@400000006460e6e032be8444 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e032c886c4 WARNING:SerialBattery:No data received in read_battery_code()
@400000006460e6e032f2e284 INFO:SerialBattery:Testing Daly
@400000006460e6e116a3c4cc WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e20053b3bc WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e2005b453c INFO:SerialBattery:No reply to cmd 94
@400000006460e6e200abf964 WARNING:SerialBattery:No data received in read_status_data()
@400000006460e6e21f9c1c14 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e3091c0224 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e309249d44 INFO:SerialBattery:No reply to cmd 90
@400000006460e6e3285edc9c WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e411e80d94 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e411f49884 INFO:SerialBattery:No reply to cmd 90
@400000006460e6e43130b084 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e43137b17c WARNING:SerialBattery:No data received in read_battery_code()
@400000006460e6e4316312f4 INFO:SerialBattery:Testing Ecs
@400000006460e6e434e826bc INFO:SerialBattery:Testing HLPdataBMS4S
@400000006460e6e917be3964 INFO:SerialBattery:Testing Jkbms
@400000006460e6e92794d5dc ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e9279fa37c INFO:SerialBattery:Testing Lifepower
@400000006460e6e93773a3fc ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6e9377dd944 ERROR:SerialBattery:>>> ERROR: Incorrect Data
@400000006460e6e93784af44 INFO:SerialBattery:Testing LltJbd
@400000006460e6ea02407444 ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
@400000006460e6ea02479c4c INFO:SerialBattery:Testing Renogy
@400000006460e6ea123c9e04 ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ea1247e0d4 INFO:SerialBattery:Testing Renogy
@400000006460e6ea2220deac ERROR:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ea222bc7a4 INFO:SerialBattery:Testing Seplos
@400000006460e6eb22733c9c WARNING:SerialBattery:short read, data=b''
@400000006460e6ec04bcd654 INFO:SerialBattery:Testing Daly
@400000006460e6ec24142ee4 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ed0da8e514 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ed0db3f51c INFO:SerialBattery:No reply to cmd 94
@400000006460e6ed0dbc3a4c WARNING:SerialBattery:No data received in read_status_data()
@400000006460e6ed2ce5ef44 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ee165c1154 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ee16660434 INFO:SerialBattery:No reply to cmd 90
@400000006460e6ee358d9264 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ef1f2f064c WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6ef1f3a220c INFO:SerialBattery:No reply to cmd 90
@400000006460e6f002be79fc WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6f002c88064 WARNING:SerialBattery:No data received in read_battery_code()
@400000006460e6f002d8b8bc INFO:SerialBattery:Testing Daly
@400000006460e6f0222f4244 WARNING:SerialBattery:>>> ERROR: No reply - returning
@400000006460e6f10bb38d54 WARNING:SerialBattery:>>> ERROR: No reply - returning

@sloesp
Copy link
Author

sloesp commented May 16, 2023

@Clericerr
Thank you the hint, but it didnt help. Communication via RS485 Interface is working, but response causes an error due to unexpexted end of data.

@Aquasada
Copy link

Something similar happens to me.
I've been using the driver with two bms jbd for about a year, after updating the driver to v0.14.3 all good, then update venus to 3.0 and good. Today I wanted to edit dbushelper.py to change the default name to the hardware version since I edited this field in the bms but when I restart it did not detect the bms. After uninstalling and installing now with version 1.0 of the driver and venus 2.94 I have managed to get one of the bms to appear, always the same although it usually takes time to recognize it, the windows application works fine

@mr-manuel
Copy link
Collaborator

Could you please try with the latest beta released today? There were some changes in the JBD/LLT BMS driver.

https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v1.0.20230525beta

@Aquasada
Copy link

Aquasada commented May 25, 2023

¿Podría intentarlo con la última versión beta lanzada hoy? Hubo algunos cambios en el controlador JBD/LLT BMS.

https://github.com/Louisvdw/dbus-serialbattery/releases/tag/v1.0.20230525beta

I just installed it and it still doesn't detect, now neither of the two bms appears

I have an em111 with its rs485-usb adapter and it detects it without problems, it's the same model as one of the ones you fail me all with the ft232 chip

I have a cerbo gx

@Aquasada
Copy link

I have done several tests
I have installed version v0.9 without the bms appearing. Then install the latest final version v0.14.3 and here if the bms appear. I reboot a few times and it stops detecting them

@mr-manuel
Copy link
Collaborator

@idstein maybe you can take a look?

@idstein
Copy link
Contributor

idstein commented May 26, 2023

@Aquasada can you provide logs from the latest dev version?
Reading through @sloesp logs my guess is there is a missing boundary check for the name. It tries to decode the string with a wrong \xdd character at the end.

@mr-manuel mr-manuel assigned mr-manuel and idstein and unassigned mr-manuel May 26, 2023
@Aquasada
Copy link

Aquasada commented May 26, 2023

I manage clumsily, can you tell me the command to see those logs? thank you

@sloesp
Copy link
Author

sloesp commented May 26, 2023

@idstein
Here is my complett log with the latest build

@40000000647093ab26161d4c INFO:SerialBattery:
@40000000647093ab2621ecbc INFO:SerialBattery:Starting dbus-serialbattery
@40000000647093ab26478d8c INFO:SerialBattery:dbus-serialbattery v1.0.20230525beta
@40000000647093ab2647a4fc INFO:SerialBattery:Testing Daly
@40000000647093ab2d98b0fc ERROR:SerialBattery:read_sentence 94: no sentence start received
@40000000647093ab2da23294 INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ab2daadd54 WARNING:SerialBattery:No data received in read_status_data()
@40000000647093ab34ed4b24 ERROR:SerialBattery:read_sentence 90: no sentence start received
@40000000647093ab34f6d48c INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac00a06c5c ERROR:SerialBattery:read_sentence 90: no sentence start received
@40000000647093ac00aa111c INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac07e95e24 ERROR:SerialBattery:read_sentence 57: no sentence start received
@40000000647093ac07f2b8ac INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac07fa8c94 WARNING:SerialBattery:No data received in read_battery_code()
@40000000647093ac080fc62c INFO:SerialBattery:Testing Daly
@40000000647093ac0f6b1714 ERROR:SerialBattery:read_sentence 94: no sentence start received
@40000000647093ac0f74b01c INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac0f7dd00c WARNING:SerialBattery:No data received in read_status_data()
@40000000647093ac16c05164 ERROR:SerialBattery:read_sentence 90: no sentence start received
@40000000647093ac16c9dacc INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac1e177014 ERROR:SerialBattery:read_sentence 90: no sentence start received
@40000000647093ac1e178b6c INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac2564edec ERROR:SerialBattery:read_sentence 57: no sentence start received
@40000000647093ac25650d2c INFO:SerialBattery:request_data: bad reply no. 0
@40000000647093ac256518e4 WARNING:SerialBattery:No data received in read_battery_code()
@40000000647093ac259be43c INFO:SerialBattery:Testing Ecs
@40000000647093ac290e008c INFO:SerialBattery:Testing HeltecModbus
@40000000647093ac291d4e84 INFO:SerialBattery:Testing on slave address 1
@40000000647093ac2e672c5c INFO:SerialBattery:found in try 1/10 for /dev/ttyACM0(1):     $^M5^LÑ
@40000000647093ac2e6747b4 G
@40000000647093ac2e674b9c y^M�^M5      ã
@40000000647093ac2e67536c G~ô~ô^H^A^@^@
@40000000647093ad0b412444 WARNING:SerialBattery:Error reading settings from BMS, retry (1/10): Checksum error in rtu mode: '\ta' instea
@40000000647093ad23ba08c4 WARNING:SerialBattery:Error reading settings from BMS, retry (2/10): Checksum error in rtu mode: '\ta' instea
@40000000647093ae0096a08c WARNING:SerialBattery:Error reading settings from BMS, retry (3/10): Checksum error in rtu mode: '\ta' instea
@40000000647093ae19127adc WARNING:SerialBattery:Error reading settings from BMS, retry (4/10): Checksum error in rtu mode: '\ta' instea
@40000000647093ae318eca5c WARNING:SerialBattery:Error reading settings from BMS, retry (5/10): Checksum error in rtu mode: '\ta' instea
@40000000647093af0e6be6f4 WARNING:SerialBattery:Error reading settings from BMS, retry (6/10): Checksum error in rtu mode: '\ta' instea
@40000000647093af26de012c WARNING:SerialBattery:Error reading settings from BMS, retry (7/10): Checksum error in rtu mode: '\ta' instea
@40000000647093b003b49db4 WARNING:SerialBattery:Error reading settings from BMS, retry (8/10): Checksum error in rtu mode: '\ta' instea
@40000000647093b01c28bb8c WARNING:SerialBattery:Error reading settings from BMS, retry (9/10): Checksum error in rtu mode: '\ta' instea
@40000000647093b01c329314 INFO:SerialBattery:None
@40000000647093b01c7d0d7c Traceback (most recent call last):
@40000000647093b01c7d2104   File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 156, in <module>
@40000000647093b01c7d348c     main()
@40000000647093b01c7d3c5c   File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 125, in main
@40000000647093b01c7d4fe4     battery = get_battery(port)
@40000000647093b01c7d57b4   File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 83, in get_battery
@40000000647093b01c7d6b3c     if battery.test_connection():
@40000000647093b01c7e2e8c   File "/opt/victronenergy/dbus-serialbattery/bms/heltecmodbus.py", line 101, in test_connection
@40000000647093b01c7e45fc     and self.read_status_data()
@40000000647093b01c7e51b4   File "/opt/victronenergy/dbus-serialbattery/bms/heltecmodbus.py", line 229, in read_status_data
@40000000647093b01c7e653c     logger.info("Heltec-" + self.hwTypeName)
@40000000647093b01c7e70f4 AttributeError: 'HeltecModbus' object has no attribute 'hwTypeName'

@mr-manuel
Copy link
Collaborator

@sloesp please use the full command, when you get logs, see How to troubleshoot. Else we cannot see the correct time, which also helps us to understand the problem better.

When posting code/logs please put tripple backticks ``` in the line before and after the code. I edited your post.

@idstein
Copy link
Contributor

idstein commented May 26, 2023

@idstein Here is my complett log with the latest build

The culprit is a broken HeltecModbus BMS implementation. Can you try to add BMS_TYPE = LltJbd to your config.ini and capture the logs a gain?

@sloesp
Copy link
Author

sloesp commented May 26, 2023

@mr-manuel
Thank you for the hint to create useful logfiles but in this case there are several controlcharacters in the log so the output didnt contain the hole log.

@sloesp
Copy link
Author

sloesp commented May 26, 2023

Here is the log with configured BMS_TYPE in config.ini

2023-05-26 12:08:06.223343500 #4
2023-05-26 12:08:06.223344500 #5
2023-05-26 12:08:06.223346500 #6
2023-05-26 12:08:06.223347500 #7
2023-05-26 12:08:07.408779500 INFO:SerialBattery:
2023-05-26 12:08:07.409209500 INFO:SerialBattery:Starting dbus-serialbattery
2023-05-26 12:08:07.410104500 INFO:SerialBattery:dbus-serialbattery v1.0.20230525beta
2023-05-26 12:08:07.410542500 INFO:SerialBattery:Testing LltJbd
2023-05-26 12:08:07.882757500 ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
2023-05-26 12:08:08.384041500 INFO:SerialBattery:Testing LltJbd
2023-05-26 12:08:08.853816500 ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
2023-05-26 12:08:09.355065500 INFO:SerialBattery:Testing LltJbd
2023-05-26 12:08:09.829465500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-26 12:08:10.096669500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-26 12:08:10.370917500 ERROR:SerialBattery:>>> ERROR: No reply - returning
2023-05-26 12:08:10.873097500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyACM0
2023-05-26 12:08:10.873253500 #0
2023-05-26 12:08:10.873255500 #1
2023-05-26 12:08:10.873256500 #2
2023-05-26 12:08:10.873258500 #3

@sloesp
Copy link
Author

sloesp commented May 26, 2023

I am sorry. This is the right one.

2023-05-26 12:08:02.123348500 #5
2023-05-26 12:08:02.123349500 #6
2023-05-26 12:08:02.123351500 #7
2023-05-26 12:08:03.308211500 INFO:SerialBattery:
2023-05-26 12:08:03.308839500 INFO:SerialBattery:Starting dbus-serialbattery
2023-05-26 12:08:03.309829500 INFO:SerialBattery:dbus-serialbattery v1.0.20230525beta
2023-05-26 12:08:03.310375500 INFO:SerialBattery:Testing LltJbd
2023-05-26 12:08:03.779810500 ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
2023-05-26 12:08:04.281331500 INFO:SerialBattery:Testing LltJbd
2023-05-26 12:08:04.751849500 ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
2023-05-26 12:08:05.253376500 INFO:SerialBattery:Testing LltJbd
2023-05-26 12:08:05.721334500 ERROR:SerialBattery:Unexpected err=UnicodeDecodeError('utf-8', b'JBD-AP21S002-L21-300A-B-U-R-C-\xdd', 30, 31, 'unexpected end of data'), type(err)=<class 'UnicodeDecodeError'>
2023-05-26 12:08:06.222943500 ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyACM0
2023-05-26 12:08:06.223287500 #0
2023-05-26 12:08:06.223289500 #1
2023-05-26 12:08:06.223291500 #2
2023-05-26 12:08:06.223292500 #3

@idstein
Copy link
Contributor

idstein commented May 26, 2023

@mr-manuel there are 2 fixes for review which helps to resolve this issue here.

@mr-manuel
Copy link
Collaborator

I merged them. @sloesp can you try to install the nightly from the dev branch? Run the install.sh and select 3and then 2.

@sloesp
Copy link
Author

sloesp commented May 26, 2023

Problem is fixed. BMS is recognized also without being configured in the config.ini
Thanks for your support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Support request
Projects
None yet
Development

No branches or pull requests

5 participants