Closed harald0815 closed 11 months ago
If the adapter is changing often from ttyUSB0
to ttyUSB1
then probably a connection is loose or your hub is not working properly. Check in the discussions for a good USB hub. The driver cannot change anything in this case.
Please post the logs again in the proper format. See Driver log files.
the error also occurs when I connect the USB-UART adapter directly to the cerbo
here is the current driver log after the error occurred
INFO: Start service dbus-cgwacs.ttyUSB0 once
INFO: Start service gps-dbus.ttyUSB0 once
INFO: Start service vedirect-interface.ttyUSB0 once
INFO: Start service dbus-serialbattery.ttyUSB0 once
root@einstein:~# tail -F -n 100 /data/log/dbus-serialbattery.ttyUSB1/current
INFO:SerialBattery:> Connection voltage: 52.7V | Current: 0.0A | SoC: 42.0%
INFO:SerialBattery:> Cell count: 16 | Cells populated: 0
INFO:SerialBattery:> LINEAR LIMITATION ENABLE: True
INFO:SerialBattery:> MAX BATTERY CHARGE CURRENT: 120.0A | MAX BATTERY DISCHARGE CURRENT: 140.0A
INFO:SerialBattery:> CVCM: True
INFO:SerialBattery:> MIN CELL VOLTAGE: 2.9V | MAX CELL VOLTAGE: 3.45V
INFO:SerialBattery:> CCCM CV: True | DCCM CV: True
INFO:SerialBattery:> CCCM T: True | DCCM T: True
INFO:SerialBattery:> CCCM SOC: True | DCCM SOC: True
INFO:SerialBattery:Serial Number/Unique Identifier: 20221006
INFO:SerialBattery:DeviceInstance = 1
INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
INFO:SerialBattery:publish config values = 1
INFO:SerialBattery:refresh_data: result: False
INFO:SerialBattery:refresh_data: result: False
ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1'
ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1'
ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1'
Traceback (most recent call last):
File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 351, in publish_battery
result = self.battery.refresh_data()
File "/opt/victronenergy/dbus-serialbattery/bms/daly.py", line 94, in refresh_data
with open_serial_port(self.port, self.baud_rate) as ser:
AttributeError: __enter__
/opt/victronenergy/serial-starter/run-service.sh: line 15: kill: (2201) - No such process
INFO:SerialBattery:
INFO:SerialBattery:Starting dbus-serialbattery
INFO:SerialBattery:dbus-serialbattery v1.0.20230724beta
INFO:SerialBattery:-- Testing BMS: 1 of 3 rounds
INFO:SerialBattery:Testing Daly at address "\x40"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Daly at address "\x80"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Ecs
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing HeltecModbus
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing HLPdataBMS4S
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Jkbms
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Lifepower
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing LltJbd
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Renogy at address "\x30"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Renogy at address "\xf7"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Seplos
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:-- Testing BMS: 2 of 3 rounds
INFO:SerialBattery:Testing Daly at address "\x40"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Daly at address "\x80"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Ecs
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing HeltecModbus
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing HLPdataBMS4S
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Jkbms
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Lifepower
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing LltJbd
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Renogy at address "\x30"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Renogy at address "\xf7"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Seplos
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:-- Testing BMS: 3 of 3 rounds
INFO:SerialBattery:Testing Daly at address "\x40"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Daly at address "\x80"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Ecs
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing HeltecModbus
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing HLPdataBMS4S
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Jkbms
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Lifepower
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing LltJbd
ERROR:SerialBattery:>>> ERROR: No reply - returning
Renogy at address "\x30"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Renogy at address "\xf7"
ERROR:SerialBattery:>>> ERROR: No reply - returning
INFO:SerialBattery:Testing Seplos
ERROR:SerialBattery:>>> ERROR: No reply - returning
ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB1
*** CCGX booted (0) ***
*** CCGX booted (0) ***
ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1' ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1' ERROR:SerialBattery:[Errno 2] could not open port /dev/ttyUSB1: [Errno 2] No such file or directory: '/dev/ttyUSB1'
This indicates that there is an issue between the Venus OS and the serial adapter. In this case the driver has no issue.
Have you tried another adapter?
Please post the logs again in the proper format. See Driver log files.
We always need the logs with the timestamps to see the timings, else it's difficult to help you.
I belive that some adapters need a massive amount of power from usb. I had several, which did not work with bad USB-Hubs (and I had a lot of bad hubs!!) or when several adapters got connected! So be careful!
Does your BMS offer the possibility to use an RS485 adapter instead of the UART adapter? I had similar problems, sometimes it ran for days, then suddenly several times a day the errors, really completely sporadic.
i completely disassembled and reassembled my entire system several times, tried different active USB hubs, nothing to do.
Then rather out of perplexity I just reconnected my two dalys for a long time via RS485->USB adapter, since then it's been running. I noticed that the system takes some time longer to connect to the BMS when the whole thing is connected via UART->USB adapter (some seconds). With the RS485 adapter the BMS is recognized almost instantaneously.
By the way, I use two Daly Smart BMS, 150A, 8S with a UART as well as CAN/RS485 interface.
@harald0815 did you already solved this issue? i guess i have a similar problem... it my setup it worked serveral weeks with the old driver 0.4. after updating to 1.0 the connection got lost about every second day. @towatai not all daly bms provide a RS485-port :(
Hello, unfortunately I could not solve the problem yet. I've already tried an older version of Venus OS and the driver with an earlier version, unfortunately without success. Also a complete reset, other USB to UART adapters, direct USB connection to the Cerbo and various USB isolators, also without getting any closer to the goal. I am currently using my Smart Shunt as a battery monitor again. and the Daly BMS just hangs on for fun. But I've noticed in the meantime that the connection is made again and again after it's broken off. (without restart)
Oh, and unfortunately I don't have an RS485 interface either.
Please post the logs again in the proper format. See Driver log files.
Post the requested logs with the correct timestamp else we cannot help you.
I have the same issue. Roll back to 0.14.3 fixed it for me.
@rustyfreeman interesting... how did you do the rollback?
I have the same issue. Roll back to 0.14.3 fixed it for me.
How have you done the downgrade.? In my case my old Hub crashed and nothing worked so I Updated the serial driver and the Venus OS and since then, with the same (new) Hub, i have this issue... A downgrade would be nice to isolate the problem AND i would not cost any money ;)
Please open a new issue with fresh logs, so we can fix the issue rather then do a downgrade.
You would find everything in the docs: Downgrade from >= v1.0.0
to <= v0.14.3
Okay i will update everything back to latest gratest and post the Logs in a new Issue.
Describe the problem
Describe the problem
A connection problem occurs several times a day (NO BMS). after a restart everything works again. After some troubleshooting it seems the bms is going from ttyUSB0 to ttyUSB1. In addition, the problem occurs more often with Venus OS v3.00 than with v2.94. Before updating to v3.00 there were no problems.
Driver version
1.0.20230724beta
Venus OS device type
Cerbo GX
Venus OS version
v3.00 and v2.94
BMS type
Daly Smart BMS
Cell count
16
Connection type
Serial USB adapter to TTL
Config file
Relevant log output
Any other information that may be helpful
Connection type Daly Serial USB UART adapter
USB Isolator between USB Hub and USB UART atapter Ocnvlia ADUM3160 USB Isolatormodul
USB Hub CSL - 7 Port USB 3.2 Hub Aktiv