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.
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
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