How to troubleshoot
🚨 IMPORTANT 🚨
-
If you think it could be a bug and you did not already tested the
nightly
build, then install it and see if the error persists. See here how to install it. -
If the logs don't give you enough valuable data, then change the logging from
INFO
toDEBUG
in the config file. See here how to edit theconfig.ini
.
How the driver works
-
During installation (
execution of reinstall-local.sh
) the installer script creates a configuration file (/data/conf/serial-starter.d/dbus-serialbattery.conf
) for theserial starter
. This allows theserial starter
to create services fordbus-serialbattery
, if a new serial adapter is connected. Theserial starter
service (/service/serial-starter
) then creates a service (/service/dbus-serialbattery.*
) for each found serial port.Additionally during installation a service (
/service/dbus-blebattery.*
) for each Bluetooth BMS is created. -
Each created service in
/service/dbus-serialbattery.*
or/service/dbus-serialbattery.*
runs/opt/victronenergy/dbus-serialbattery/start-serialbattery.sh *
where the*
stands for the serial port.For example: The service
/service/dbus-serialbattery.ttyUSB0
runs/opt/victronenergy/dbus-serialbattery/start-serialbattery.sh ttyUSB0
Driver log files
Require root access
💡 If you are opening an issue or posting your logs somewhere please make sure you execute the complete commands to get the logs, including
tai64nlocal
. Without readable timestamps we cannot help you.
Check the log files on your GX device/Raspberry Pi. Connect to your Venus OS device using a SSH client like Putty or bash.
Serial BMS connection
There are two log files that are relevant for the serial connection. Please check both.
/data/log/serial-starter/current
/data/log/dbus-serialbattery.ttyUSB*/current
or/data/log/dbus-serialbattery.ttyAMA0/current
/data/log/serial-starter/current
Serial starter will show, if the driver was started against a USB port.
Execute
💡 The tail
command with the parameter -F
does not quit automatically, since it waits for new log entries.
You can exit by pressing CTRL + C
.
tail -F -n 100 /data/log/serial-starter/current | grep dbus-serialbattery | tai64nlocal
Output
...
INFO: Create daemontools service dbus-serialbattery.ttyUSB0
INFO: Start service dbus-serialbattery.ttyUSB0 once
...
✅ This indicates, that the driver was successfully started against the USB0
port.
/data/log/dbus-serialbattery.ttyUSB*/current
or /data/log/dbus-serialbattery.ttyAMA0/current
Where *
is the number of your USB port (e.g. ttyUSB0
, ttyUSB1
, ttyUSB2
, ...) or ttyAMA0
, if you are using a Raspberry Pi hat.
Execute
💡 The tail
command with the parameter -F
does not quit automatically, since it waits for new log entries.
You can exit by pressing CTRL + C
.
tail -F -n 100 /data/log/dbus-serialbattery.ttyUSB0/current | tai64nlocal
Output
...
INFO:SerialBattery:Starting dbus-serialbattery
INFO:SerialBattery:dbus-serialbattery v1.0.0
INFO:SerialBattery:Testing BMS_NAME
...
INFO:SerialBattery:Connection established to BMS_NAME
INFO:SerialBattery:Battery BMS_NAME connected to dbus from /dev/ttyUSB0
...
INFO:SerialBattery:DeviceInstance = 1
INFO:SerialBattery:com.victronenergy.battery.ttyUSB0
...
✅ This indicates, that your driver started successfully and connected to your BMS. You can see now the BMS in the GUI.
❌ If you see an error like below, then your battery is most likely connected to a different ttyUSB
port.
ERROR:SerialBattery:ERROR >>> No battery connection at /dev/ttyUSB0
Bluetooth BMS connection
/data/log/dbus-blebattery.*/current
Where *
is a unique number starting from 0.
Execute
💡 The tail
command with the parameter -F
does not quit automatically, since it waits for new log entries.
You can exit by pressing CTRL + C
.
tail -F -n 100 /data/log/dbus-blebattery.*/current | tai64nlocal
Output
...
INFO:SerialBattery:dbus-serialbattery v1.0.0
INFO:SerialBattery:init of BMS_NAME at BMS_MAC_ADDRESS
INFO:SerialBattery:test of BMS_NAME at BMS_MAC_ADDRESS
INFO:SerialBattery:BMS_NAME found!
INFO:SerialBattery:Connection established to BMS_NAME
INFO:SerialBattery:Battery BMS_NAME connected to dbus from BMS_MAC_ADDRESS
...
INFO:SerialBattery:DeviceInstance = 1
INFO:SerialBattery:com.victronenergy.battery.BMS_MAC_ADDRESS
...
✅ This indicates, that your driver started successfully and connected to your BMS. You can see now the BMS in the GUI.
❌ If you see an error like below, then your battery is not found.
INFO:SerialBattery:Starting dbus-serialbattery
INFO:SerialBattery:dbus-serialbattery v1.0.0
INFO:SerialBattery:init of BMS_NAME at BMS_MAC_ADDRESS
INFO:SerialBattery:test of BMS_NAME at BMS_MAC_ADDRESS
ERROR:SerialBattery:no BMS found at BMS_MAC_ADDRESS
ERROR:SerialBattery:ERROR >>> No battery connection at BMS_NAME
What to check, if it doesn't work
The log file will tell you what the driver did and where it failed.
No log file
If there is no log folder under /data/log/dbus-serialbattery.*
then check:
-
Did the install have any error? Reinstall the driver, also trying an alternative method and version.
-
Is the connection picked up by serial-starter?
💡 The
tail
command with the parameter-F
does not quit automatically, since it waits for new log entries. You can exit by pressingCTRL + C
.Use the command
tail -F /data/log/serial-starter/current | tai64nlocal
to show the last part of the log file as it updates. Plug your USB device in and out to see, if it's picked up and what
ttyUSB
port it uses.You can also check, which USB port it used by plugging out your USB device, wait some seconds, execute the command below, plug in your USB device, execute the command below again and compare which
ttyUSB
device appeared now.Execute
ls -l /dev/ttyUSB*
Example output (USB device unplugged)
crw-rw---- 1 root dialout 188, 0 Jun 11 17:08 /dev/ttyUSB0
Example output (USB device plugged)
crw-rw---- 1 root dialout 188, 0 Jun 11 17:08 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jun 11 17:08 /dev/ttyUSB1 -
Did the serial starter correctly assign the USB port to the correct service?
If the content under
==> /data/var/lib/serial-starter/* <==
showssbattery
then this USB port is assigned to thedbus-serialbattery
driver.Execute
head /data/var/lib/serial-starter/*
Output
==> /data/var/lib/serial-starter/ttyACM0 <==
gps
==> /data/var/lib/serial-starter/ttyUSB0 <==
vedirect
==> /data/var/lib/serial-starter/ttyUSB1 <==
sbattery
==> /data/var/lib/serial-starter/ttyUSB2 <==
vedirectIf the assignment is wrong you can reset all executing this command
rm /data/var/lib/serial-starter/*
and then reboot. You can also overwrite an assignment by executing the command below. Change the
#
with the number of your USB port before executing the command. Reboot after the change.echo "sbattery" > /data/var/lib/serial-starter/ttyUSB#
-
Check, if your BMS type is found (change to the
ttyUSB*
your device use)-
For serial connected BMS
💡 The
tail
command with the parameter-F
does not quit automatically, since it waits for new log entries. You can exit by pressingCTRL + C
.tail -F /data/log/dbus-serialbattery.ttyUSB0/current | tai64nlocal
or
tail -F /data/log/dbus-serialbattery.*/current | tai64nlocal
to check all devices the serialstarter started.
-
For Bluetooth connected BMS
💡 The
tail
command with the parameter-F
does not quit automatically, since it waits for new log entries. You can exit by pressingCTRL + C
.tail -F /data/log/dbus-blebattery.0/current | tai64nlocal
or
tail -F /data/log/dbus-blebattery.*/current | tai64nlocal
to check all Bluetooth devices.
-
No reply
in log file
Check your cable connections, if the log file shows ERROR: No reply - returning
from the battery.
The RX/TX lights should both flash as data is transfered. If only one flashes then your RX/TX might be swapped.
Driver runtime (stability check)
Check for how long the driver is running without restart.
Execute
For serial connected BMS
svstat /service/dbus-serialbattery.tty*
For Bluetooth connected BMS
svstat /service/dbus-blebattery.*
Output
root@raspberrypi2:~# svstat /service/dbus-serialbattery.*
/service/dbus-serialbattery.ttyUSB0: up (pid 8136) 1128725 seconds
✅ If the seconds (runtime
) have a high number (e.g. several days; 86400 seconds = 1 day) then this indicates, that your driver is stable.
❌ If the seconds (runtime
) are low (e.g. 300 seconds) then this means your driver has (re)started 300 seconds ago.
Check again in a few minutes, if the pid
changed and if the runtime
increased or reset.
If that is the case, your driver is not stable and has a problem.
root@raspberrypi2:~# svstat /service/dbus-serialbattery.*
/service/dbus-serialbattery.ttyUSB0: up (pid 8136) 300 seconds
Additionally you can check the system uptime.
Execute
uptime
Output
10:08:14 up 8 days, 3:24, load average: 1.52, 0.87, 0.79
FAQ (Frequently Asked Questions)
Check the FAQ (Frequently Asked Questions) for answers
Alarm logs (VRM Portal)
Check your Alarm Logs in your VRM portal after selecting your device.
Advanced section (VRM Portal)
Check your graphs in Advanced section in your VRM Portal after selectiong your device.
You can use the graphs to look at your values over time. This makes finding values that change much easier.
- Battery SOC (State Of Charge)
- Battery Summary
- Battery Temperature Sensor
- Battery Voltage and Current
- BMS Charge and Discharge Limits
- BMS Min/Max Cell Voltage
Forum and community help
Forum thead discussions for this driver can be found at: