Hi,
I wanted to look into the new Pylontech firmware update feature with an Ekrano GX, Venus OS v3.71, and Pylontech US3000C batteries, and as the Pylontech battery did not show up in the list of devices having a potential firmware update in the vrm portal I looked a bit deeper into it
Setup
-
Ekrano GX
-
Venus OS v3.71
-
Pylontech US3000C
-
vecan0= 500000 bit/s -
vecan1= 250000 bit/s
Manually executing /opt/victronenergy/mqtt-rpc/thirdparty/pylon/py-tool -l shows the battery on vecan0:
<device serial="Y240311C31090015" version="2.4" description="Pylon Low-V Bat" id="B009" type="pylontech" connection="vecan0" updatable="True"/>
From the logs, when triggering looking for new firmware versions via vrm the generic scan was invoking:
INFO:streamcommand:Command ('vup', '--xml', '--no-local', '--canbus', 'socketcan:vecan1') terminated with status 0
INFO:streamcommand:Command ('xupt', '--xml') terminated with status 89
WARNING:thirdpartyupdater:"/opt/victronenergy/mqtt-rpc/thirdparty/pylon/py-tool -l" returned abnormal exit code 7
Looking at /opt/victronenergy/mqtt-rpc/mqtt-rpc.py, get_canbuses() only checks DBus services matching:
com.victronenergy.vecan.*
But on my system DBus shows:
com.victronenergy.vecan.vecan1
com.victronenergy.battery.socketcan_vecan0
So vecan0 is ignored by the generic scan, even though that is where the Pylontech battery actually is.
After patching get_canbuses() to also include com.victronenergy.battery.socketcan_*, the scan started invoking both CAN buses:
INFO:streamcommand:Command ('vup', '--xml', '--no-local', '--canbus', 'socketcan:vecan0') terminated with status 0
INFO:streamcommand:Command ('vup', '--xml', '--no-local', '--canbus', 'socketcan:vecan1') terminated with status 0
and discovery started working, hence the pylontech battery showed up in the vrm firmware update device list. So it looks like mqtt-rpc.py:get_canbuses() ignores com.victronenergy.battery.socketcan_*, so valid battery CAN interfaces like vecan0 are missed.
Has anyone else seen this with Ekrano GX + US3000C or do you see anyhting obvious that I might have configured/setup wrong?
