Page 1 of 1

Issues running Solaredge_Modbus on Rasp. Pi 5 and Python 3.11

Posted: Friday 18 July 2025 12:32
by Diemux
Hi All,

I have been running in to issues with my domoticz setup. I have a Solaredge inverter and have used the solaredge modbus plugin by Addie Janssen. It all worked but due to an error the Raspberry upgraded and the installation was broken.

I was able to restore the system but I'm no longer able to get this plugin working. The combination Python requirements is not valid to run on Bookworm/Python 3.11.
I have been going back and forth with the help of chat GPT to get stuff running but in ends up the same.

Log:
Spoiler: show
2025-07-18 12:24:13.908 Error: Solaredge Omvormer: (SolarEdge_ModbusTCP) failed to load 'plugin.py', Python Path used was '/home/domoticz/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/:/home/domoticz/.local/lib/python3.11/site-packages:/usr/lib/python311.zip:/usr/lib/python3.11:/usr/lib/python3.11/lib-dynload:/usr/local/lib/python3.11/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.11/dist-packages'.
2025-07-18 12:24:13.910 Error: Solaredge Omvormer: Traceback (most recent call last):
2025-07-18 12:24:13.910 Error: Solaredge Omvormer: File "/home/domoticz/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 16, in <module>
2025-07-18 12:24:13.910 Error: Solaredge Omvormer: import solaredge_modbus
2025-07-18 12:24:13.910 Error: Solaredge Omvormer: File "/home/domoticz/.local/lib/python3.11/site-packages/solaredge_modbus/__init__.py", line 7, in <module>
2025-07-18 12:24:13.910 Error: Solaredge Omvormer: from pymodbus.client import ModbusTcpClient
2025-07-18 12:24:13.910 Error: Solaredge Omvormer: ImportError: cannot import name 'ModbusTcpClient' from 'pymodbus.client' (/home/domoticz/.local/lib/python3.11/site-packages/pymodbus/client/__init__.py)
I tried multiple versions of solaredge_modbus and pymodbus but found no working solution. Any tips?

Re: Issues running Solaredge_Modbus on Rasp. Pi 5 and Python 3.11

Posted: Friday 18 July 2025 13:15
by jvdz
Have a look here: viewtopic.php?t=43707

This version has the correct current requirements.txt and some extra options.

Re: Issues running Solaredge_Modbus on Rasp. Pi 5 and Python 3.11

Posted: Friday 18 July 2025 13:17
by eddieb
I am running the jvdz version on my docker/bookworm domoticz. Works fine here

Re: Issues running Solaredge_Modbus on Rasp. Pi 5 and Python 3.11

Posted: Saturday 19 July 2025 12:34
by jannl
May be install an older python version besides 3.11. Should be possible.

In my docker startup I have a lot of python lines to get the solaredge modbus running. The latest docker containers run on bookworm.

Re: Issues running Solaredge_Modbus on Rasp. Pi 5 and Python 3.11

Posted: Saturday 19 July 2025 12:49
by jvdz
You do not need a "lot of python lines" in the startup bash file when you use the proper requirements.txt file as explained in the linked thread. One is sufficient as far as I know.