Salt batteries are missing after update to 3.60

Hello,

after update to 3.60 batteries are no longer visible (also in gui-v2)

the fzsonick driver is running:

ps|grep fzsonick
1524 root 1768 S supervise dbus-fzsonick-48tl.ttyUSB0
1643 root 1780 S multilog t s25000 n4 /var/log/dbus-fzsonick-48tl.tty

i switching back to 3.55 and it works again.

Thanks for fixing this bug.

Thomas

Hi, moving to modifications.
Not sure about the status of this driver, appears to be a third party mod that needs updating to be compatible with 3.60. The driver developer needs to do that, I am not sure this is maintained by Victron.

In this case the ‘bug’ is on the modified driver side. Cpntact the maker of the driver and ask them to move forward with development.

Otherwise v3.55 is a pretty neat OS.

where is the driver developer ?

wherei is the “maker of the driver” ? i found nothing in the files …

here a quick fix for 3.60, it was a python problem after switch to python 3.12
now it works again… i hope this fix can included in the offical release.

--- data.py.org
+++ data.py
@@ -1,5 +1,5 @@
 
-from collections import Iterable
+from collections.abc import Iterable
 
 # trick the pycharm type-checker into thinking Callable is in scope, not used at runtime
 # noinspection PyUnreachableCode
--- dbus-fzsonick-48tl.py.org
+++ dbus-fzsonick-48tl.py
@@ -18,7 +18,7 @@
 from dbus.mainloop.glib import DBusGMainLoop
 from data import BatteryStatus, Signal, Battery, LedColor
 
-from collections import Iterable
+from collections.abc import Iterable
 from os import path
 
 app_dir = path.dirname(path.realpath(__file__))
@@ -241,7 +241,7 @@
 
 	sid = re.sub(b'[^\x20-\x7E]', b'', slave_id)  # remove weird special chars
 
-	match = re.match('(?P<hw>48TL(?P<ah>\d+)) *(?P<bms>.*)', sid.decode('ascii'))
+	match = re.match(r'(?P<hw>48TL(?P<ah>\d+)) *(?P<bms>.*)', sid.decode('ascii'))
 
 	if match is None:
 		raise Exception('no known battery found')
--- convert.py.org
+++ convert.py
@@ -1,4 +1,4 @@
-from collections import Iterable
+from collections.abc import Iterable
 
 import config as cfg
 from data import LedState, BatteryStatus

?

Why are you referencing this?

Then you will need to expand here. What batteries?

FZSonick 48TL

Sorry. Being daft
You mention salt batteries in the title.

The challenge here is these batteries are not supported so there won’t be any testing.

Thank you @smueff1970 for the detective work. A quick look in the code suggests that Iterable is only used in the annotations, and just removing it altogether is probably a better solution.

Can you also check if fixing the regex on line 244 of dbus-fzsonick-48tl.py works, by just making it a raw string (prefix with r):

match = re.match(r'(?P<hw>48TL(?P<ah>\d+)) *(?P<bms>.*)', sid.decode('ascii'))

If that all works for you (I already tested, but without a battery) then that can be fixed in a future release.

Hello Izak,
i have already, see the diff above, the regex changed to “r” raw, otherwise the script has complaint the “\d” escape character. That work on a production system by on customer.
I hope a answered your question correctly.
Thanks
Thomas

Thank you. Scheduled for a future release.

1 Like

Thank you very much ! Thomas