Closed Barpo closed 2 years ago
@Barpo can you please look at the dbus-serialbattery logs if you see anything in there that will help See https://github.com/Louisvdw/dbus-serialbattery/wiki/Troubleshoot
The serial communication: Pi A5 40 94 08 00 00 00 00 00 00 00 00 81 Daly A5 01 94 08 03 01 00 00 02 00 00 02 4A
Pi A5 40 90 08 00 00 00 00 00 00 00 00 7D Daly A5 01 90 08 00 72 00 00 75 30 01 EF 45
Pi A5 40 91 08 00 00 00 00 00 00 00 00 7E Daly A5 01 91 08 0F 01 02 0E E1 01 01 EF 31
Pi A5 40 92 08 00 00 00 00 00 00 00 00 7F Daly A5 01 92 08 40 01 40 01 DF 01 01 EF 92
Pi A5 40 93 08 00 00 00 00 00 00 00 00 80 Daly A5 01 93 08 00 01 01 2B 00 00 3A 02 AA
Serial port of Pi Sends all kind of requests...
FE FF FF FD FD
01 46 07 53 A2
47 E2 42 47 77 FF 47 E2 42 47 77 FF 47 E2 42 47 77 FF 47 E2 42 23 77 FF
47 E2 42 47 77 FF 47 E2 42 47 77 FF 47 E2 42 47 77 FF 47 E2 42 47 77 FF
A7 E2 22 47 77 FF 47 E2 42 47 77 FF 47 E2 42 47 77 FF 47 E2 42 47 77 FF
41 80
A5 40 94 08 00 00 00 00 00 00 00 00 81
A5 40 90 08 00 00 00 00 00 00 00 00 7D
A5 40 91 08 00 00 00 00 00 00 00 00 7E
A5 40 92 08 00 00 00 00 00 00 00 00 7F
Part of the log:
/data/log/serial-starter/current @400000006154b94414dbb2e4 INFO: Start service vedirect-interface.ttyUSB0 once @400000006154b949256a0e6c INFO: Start service dbus-cgwacs.ttyUSB0 once @400000006154b94e34fe660c INFO: Start service dbus-fzsonick-48tl.ttyUSB0 once @400000006154b95409019c54 INFO: Start service dbus-imt-si-rs485tc.ttyUSB0 once @400000006154b957173c0d2c INFO: Start service dbus-modbus-client.serial.ttyUSB0 once @400000006154b95a2578df64 INFO: Start service dbus-serialbattery.ttyUSB0 once @400000006154b95f35144b84 INFO: Start service gps-dbus.ttyUSB0 once @400000006154b9690bfbfc4c INFO: Start service vedirect-interface.ttyUSB0 once @400000006154b96e1b8c6bec INFO: Start service dbus-cgwacs.ttyUSB0 once @400000006154b9732b244dcc INFO: Start service dbus-fzsonick-48tl.ttyUSB0 once @400000006154b9783ad3e5fc INFO: Start service dbus-imt-si-rs485tc.ttyUSB0 once @400000006154b97c0d7968d4 INFO: Start service dbus-modbus-client.serial.ttyUSB0 once @400000006154b97f1bd04704 INFO: Start service dbus-serialbattery.ttyUSB0 once @400000006154b9842b7d5aac INFO: Start service gps-dbus.ttyUSB0 once @400000006154b98e02445474 INFO: Start service vedirect-interface.ttyUSB0 once @400000006154b99311d1e1cc INFO: Start service dbus-cgwacs.ttyUSB0 once @400000006154b998216b8cb4 INFO: Start service dbus-fzsonick-48tl.ttyUSB0 once @400000006154b99d312bda3c INFO: Start service dbus-imt-si-rs485tc.ttyUSB0 once @400000006154b9a103e39cf4 INFO: Start service dbus-modbus-client.serial.ttyUSB0 once @400000006154b9a412121f1c INFO: Start service dbus-serialbattery.ttyUSB0 once @400000006154b9a92199110c INFO: Start service gps-dbus.ttyUSB0 once @400000006154b9b233f9b7ac INFO: Start service vedirect-interface.ttyUSB0 once @400000006154b9b807f31284 INFO: Start service dbus-cgwacs.ttyUSB0 once
/data/log/dbus-serialbattery.ttyUSB0/current @4000000061549b5011230814 midpoint, deviation = self.battery.get_midvoltage() @4000000061549b501123db04 File "/data/etc/dbus-serialbattery/battery.py", line 190, in get_midvoltage @4000000061549b50113017d4 half1voltage += self.cells[c].voltage @4000000061549b50113207ec IndexError: list index out of range @4000000061549b6020bfdb94 INFO:main:dbus-serialbattery v0.8 @4000000061549b6020d5bd24 INFO:main:Testing LltJbd @4000000061549b6030b65c1c ERROR:utils:>>> ERROR: No reply - returning @4000000061549b6030cef4fc INFO:main:Testing Ant @4000000061549b61050f670c ERROR:utils:>>> ERROR: No reply - returning @4000000061549b610524e6f4 INFO:utils:>>> ERROR: Incorrect Data @4000000061549b61052d5eec INFO:main:Testing Daly @4000000061549b611507f304 ERROR:utils:>>> ERROR: No reply - returning @4000000061549b61151e9fb4 INFO:main:Testing Daly @4000000061549b6124f7302c ERROR:utils:>>> ERROR: No reply - returning @4000000061549b61250c6dac INFO:main:Testing Jkbms @4000000061549b6134e5f824 ERROR:utils:>>> ERROR: No reply - returning @4000000061549b6134fa8dac INFO:main:Testing Sinowealth @4000000061549b62093bcec4 ERROR:utils:>>> ERROR: No reply - returning @4000000061549b62272b0404 INFO:main:Testing LltJbd @4000000061549b6236fdd7bc ERROR:utils:>>> ERROR: No reply - returning @4000000061549b623714a794 INFO:main:Testing Ant @4000000061549b630b623904 ERROR:utils:>>> ERROR: No reply - returning @4000000061549b630b791c64 INFO:utils:>>> ERROR: Incorrect Data @4000000061549b630b8205a4 INFO:main:Testing Daly @4000000061549b6313fcad24 INFO:utils:DalyBMS 3 cells @4000000061549b6314054c2c INFO:main:Connection established to Daly @4000000061549b63174ed9ac INFO:main:Battery connected to dbus from /dev/ttyUSB0 @4000000061549b652ff4b1fc Traceback (most recent call last): @4000000061549b65302821f4 File "/data/etc/dbus-serialbattery/dbushelper.py", line 140, in publish_battery @4000000061549b6530284134 self.publish_dbus() @4000000061549b6530284cec File "/data/etc/dbus-serialbattery/dbushelper.py", line 155, in publish_dbus @4000000061549b6530285c8c midpoint, deviation = self.battery.get_midvoltage() @4000000061549b6530286c2c File "/data/etc/dbus-serialbattery/battery.py", line 190, in get_midvoltage @4000000061549b6530287fb4 half1voltage += self.cells[c].voltage @4000000061549b653029374c IndexError: list index out of range
Super cool!!! the Midpoint fix #53 did the job :)
Great. Thanks for the feedback.
I have same thing. Venus OS 2.72 serial battery version 0.9.1
Except of my log.
root@raspberrypi2:~# tail -f /data/log/dbus-serialbattery.ttyUSB0/current
@4000000061a6d5ff0e357d44 data = read_serial_data(self.generate_command(command), self.port, self.baud_rate, self.LENGTH_POS, self.LENGTH_CHECK)
@4000000061a6d5ff0e361d6c File "/data/etc/dbus-serialbattery/utils.py", line 40, in read_serial_data
@4000000061a6d5ff0e3b0f0c with serial.Serial(port, baudrate=baud, timeout=0.1) as ser:
@4000000061a6d5ff0e3ba764 File "/usr/lib/python2.7/site-packages/serial/serialutil.py", line 240, in init
@4000000061a6d5ff0e4fd374 self.open()
@4000000061a6d5ff0e508b0c File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 288, in open
@4000000061a6d5ff0e69cbe4 self._update_rts_state()
@4000000061a6d5ff0e6a7bac File "/usr/lib/python2.7/site-packages/serial/serialposix.py", line 627, in _update_rts_state
@4000000061a6d5ff0e6c2574 fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_RTS_str)
@4000000061a6d5ff0e6dc76c IOError: [Errno 71] Protocol error
@4000000061a6d6100b964154 WARNING:SerialBattery:dbus-serialbattery v0.9.1
@4000000061a6d6100bb0ab0c WARNING:SerialBattery:Testing LltJbd
@4000000061a6d6101bf1483c ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000061a6d6101bff5db4 WARNING:SerialBattery:Testing Ant
@4000000061a6d6102c612714 ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000061a6d6102c71d0b4 ERROR:SerialBattery:>>> ERROR: Incorrect Data
@4000000061a6d6102c797d8c WARNING:SerialBattery:Testing Daly
@4000000061a6d6102d9c336c Traceback (most recent call last):
@4000000061a6d6102d9c4adc File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 108, in
Ok, odd. Left it connected for a few days. Seems stable now.
I also installed this via USB for another friend and it all worked great out of the box, but was a 4s vs mine is an 8s . Not sure this needs to be opened back up.
@neoneddy you error seem to be from the underlying serial library, which indicates it might be a low level error. My first though would be that is could be a wire/plug that is loose and that is hamperring signals. The wire might settle over time (gravity :) ). If you move the cable a bit and it start giving errors that would be a clear indication.
@Louisvdw rebooted after updating to venus OS 2.73 , Started reconnecting in a loop again, been going on for a day or two now.
I also run GUI Mods if that matters. I can try and reseat the UART cable. I am also connecting 4 dongles via a USB hub, I could could try connecting directly, I ran a 10ft USB extension cable to add this 5th device. I have BMV, 2x Solar, Multiplus, and now the Daly. Maybe putting Daly on it's own USB line might help.
Thanks for response.
@neoneddy those are all good things to try. Check that the error in the log file is the IOError: [Errno 71] Protocol error. (should be the last line of a loop). I also use a 4port USB hub (MPPTx2, MK3, BMSx2) on my Pi3 testing hub so in itself that would not be an issue, but long cables and extra things could lead to cable loss. If you can run a test with the BMS connected to the GX directly you can see if that then works or not, and go from there
Ok, just switched the Daly BMS to its own USB port on the Pi and it’s online now and has a stable connection.
got some other goofy issues I might need to ask Victron Community About
I found according to Wikipedia the USB specification allows for 5m cable for USB1.1 and USB2 and 3m cable for USB3. You might need to add a booster or powered hub to get longer distances. https://en.wikipedia.org/wiki/USB_hardware#Cabling
Daly bms connects en disconnects every 5 to 10 seconds.
tail -f /data/log/serial-starter/current also shows the start of the dbus-serialbattery at the same time.
I use Venus Version 2.66 on my Raspberry Pi Daly 3Cell for testing, interface USB-RS485 and the USB-RS232 from daly or the FTDI: all the same problem...