Solaredge inverter plug-in Modbus TCP

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
pgas37
Posts: 99
Joined: Wednesday 06 December 2017 19:44
Target OS: -
Domoticz version:
Contact:

Solaredge inverter plug-in Modbus TCP

Post by pgas37 »

The discussion about the plugin is very extensive and sometimes impossible for the layman to follow and sometimes goes back years.
Recently received a solaredge inverter. I installed the plugin according to the instructions on the domoticz-wiki page. That didn't work at first. After some searching, I came across a temporary fix that I applied. That fix seems to be from 2021.
sudo pip3 uninstall pymodbus
sudo pip3 install pymodbus==2.4.0
After that, it works like a charm. With that, I say carefully, the plugin does not seem to work (yet) with python 3.x.x. in 2023.
Is that correct or is there now a solution that allows you to work with a higher python version?
I ask that because for the Zigbee protocol there is also a plugin for Domoticz and that works with a python version above 3.5. So I can't install that version because in version 2.4 use in my domoticz.

Thanks
Regards Paul
User avatar
Sjonnie2017
Posts: 361
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by Sjonnie2017 »

I have the SolarEdge inverter with the modbus TCP plugin.

I migrated from Domoticz installed directly on my host to a server with Docker containers. I had some issues to iron out but got it working with the help from this community. You might want to consider a Docker environment. I have found it much easier to maintain. Some info on my troubles (and the solution) can be read here: viewtopic.php?p=294777#p294777 (and the posts after that ;) )

Good luck!
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
User avatar
RonkA
Posts: 95
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2023.2
Location: Harlingen
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by RonkA »

Solaredge Modbus plugin runs like a charm on my setup running Version: 2023.2 (build 15559) and Python Version: 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
SolarEdge ModbusTCP - Open Weather Map - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
Xenon
Posts: 4
Joined: Thursday 09 March 2017 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by Xenon »

@RonkA,

Please, could you tell me what versions of pymodbus and/or solaredge modbustcp plugin you've installed?
First of all: I.m far from a Linux-hero! I know some basics, but that's already it...

Since around 2017 up to now, I was running Domoticz (finally 2024.4) on a dusty RPi3 and later a RPi4. A couple of month ago, we got a SolarEdge inverter installed. Therefore, I installed the "Domoticz-SolarEdge_Modbustcp"-plugin (the one prior to v2.0.4) as described in the WIKI. It was capable to read 22 readings out of my Solaredge SE8K-WS, except for the additional energy meter (kWh import/export) and battery status (which are also connected to modbus). So not all equipment was caught by Domoticz.

After upgrading to the Solaredge Modbustcp v2.0.4 plugin, it started to complain about the use of an old library (if I recall well: 0.7.0 where 0.7.2 is minimum). After upgrading to that version, it started to complain about an insufficient version of Python. So finally, I decided to start all over with the latest RPi4-Lite-OS (dec-2023, apt update/upgrade done). It's now running Python 3.11.2 and holds modbus library 3.6.4. After struggling with the apt/pip-issue (where it rejects me using pip) the 2.0.4-Plugin appears to require only a 2.4.0-library. Sufficient, since 3.6.4 was found already. Since then, I have the option to select "Inverter+meter+battery" in Domoticz Hardware setup.

Anyway, Domoticz appears no longer capable to read modbus data at all. My guess is that various versions of python, pymodbus and plugins dislike each other, but I have to admit that I'm getting confused by all those different version numbers, because it seems to me that there is no upward compatibility. Right? So I'm curious how to get this fixed. And to clarify which versions are mandatory to work with recent Pi-Lite-OS and where to get these versions. I'm not afraid to start all over again, but I need some help in understanding in what I'm doing (wrong).

Would appreciate any help to get (all of my) modbus-devices covered in Domoticz. Many thanks in advance for your help.
User avatar
RonkA
Posts: 95
Joined: Tuesday 14 June 2022 12:57
Target OS: NAS (Synology & others)
Domoticz version: 2023.2
Location: Harlingen
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by RonkA »

Please, could you tell me what versions of pymodbus and/or solaredge modbustcp plugin you've installed?
I use an older version of the plugin 1.1.1 but it works in my setup like a charm.(only pannels, no battery)

Reading the Readme it states:
# Domoticz SolarEdge_ModbusTCP plugin

A Domoticz plugin to collect data from SolarEdge power inverters over ModbusTCP.

The plugin uses the `solaredge_modbus` library (<https://github.com/nmakel/solaredge_modbus>) to communicate with the inverter.

The 1.x.x. versions of the plugin only read the inverter data.

The upcoming 2.x.x version will support meters and batteries.

--
.. so i don't think this info is much help for your needs, sorry..
SolarEdge ModbusTCP - Open Weather Map - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
User avatar
waltervl
Posts: 5164
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by waltervl »

I see this open issue on the python plugin where a user is proposing to use a higher version of the SolarEdge_modbus module https://github.com/addiejanssen/domotic ... /issues/73
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Xenon
Posts: 4
Joined: Thursday 09 March 2017 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by Xenon »

Hi @all,

Thank you both for your replies. I finally managed to get where I left by kicking off pymodbus-3.6.4 and installing pymodbus-2.4.0 again (and pymodbusTCP-0.2.1), kicking my 22 SolarEdge sensors alive again. I consider this as a lucky moment, because I have no clue about the logic behind version numbers. I expected that 3.6.4 at least would be capable of what 2.4.0 can do. So far my expectations...

However, I have still no battery nor meter readings available. But at least, I now have what I had before.

It appears that development of an updated plugin got stuck for some reason. I guess I have to be more patient for an updated plugin to become developed and available.

The given suggestion to move over to Docker containers might be a good one. I'll keep the topic in mind. Thnx.
Xenon
Posts: 4
Joined: Thursday 09 March 2017 9:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by Xenon »

waltervl wrote: Friday 16 February 2024 7:56 I see this open issue on the python plugin where a user is proposing to use a higher version of the SolarEdge_modbus module https://github.com/addiejanssen/domotic ... /issues/73
Well, I've found a SolarEdge Modbus 0.8.0, which expects al least pymodbus >=3.5 to be present. Upgrading my pymodbus from 2.4.0 to 3.6.4 (which is above 3.5 and the latest version imho) resulted in no more readings from the inverter. Log shows repeatedly "...reconnecting to SE8K-RWS...". So it appears incompatible too.

Would be nice if the latest plugin would become part of Domoticz 2024.x-build, since SolarEdge is quite a popular inverter brand. Beside SolarEdge, modbusTCP is also used in controlling many heatpump installations. This type of business will be booming for quite a while, so implementation in Domoticz would be justified imho.,
User avatar
waltervl
Posts: 5164
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by waltervl »

It is open source. Using Python plugins usually offers quicker problem solving then using the integrated plugin.

Perhaps better discuss these details in the plugin repository then on this forum.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
McMelloW
Posts: 427
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by McMelloW »

After changing to a system with Bullseye, I had some trouble with the domoticz-solaredge-modbustcp-plugin also.

Changed in the requirements.txt the value solaredge_modbus==0.8.0 and did sudo pip3 install -r requirements.txt
Also a git pull for the latest plugin stuf.

It solved my problems after this actions.
Greetings McMelloW
jiemeb
Posts: 2
Joined: Sunday 02 December 2018 10:06
Target OS: Linux
Domoticz version:
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by jiemeb »

Hi,
version of pymodbus-3.7.0 do not work with Ubuntu 24.04 you must downgrade pymodbus-3.6.9

Regards
JM
fjuppe
Posts: 42
Joined: Thursday 14 September 2023 19:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 16341
Location: Stockholm
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by fjuppe »

Hello,

Can someone with better knowledge than I (linux newbee), help me to understand and solve the problem with this SolarEdge Modbus Plugin. Obviously the module is not found but I dont know how to install it. I have followed all instructions on the github page... I am on latest Domoticz and Python.

Code: Select all

Error: SE Modbus: (SolarEdge_ModbusTCP) failed to load 'plugin.py', Python Path used was '/home/stig/domoticz/plugins/SolarEdge_Modubus/:/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'.
2024-10-27 16:20:32.389 Error: SE Modbus: Traceback (most recent call last):
2024-10-27 16:20:32.389 Error: SE Modbus: File "/home/stig/domoticz/plugins/SolarEdge_Modubus/plugin.py", line 54, in <module>
2024-10-27 16:20:32.389 Error: SE Modbus: import solaredge_modbus
2024-10-27 16:20:32.389 Error: SE Modbus: ModuleNotFoundError: No module named 'solaredge_modbus'
Thanks in advance for your help!
/fjuppe
bramv
Posts: 17
Joined: Wednesday 27 June 2018 23:53
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands/Westland
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by bramv »

I had the same problem after upgrading the pymodbus library to 3.7.4

Only a simple fix will allow pymodbus 3.7.4 to be used tgether with solaredge 0.8.0
1) find location of pymodbus library
type "pip show pymodbus"
see where it is located and type cd plus that location something like cd xxxxxx\python3.9\site-packages\solaredge_modbus

2) edit the file __init__.py
change line 9 into
from pymodbus.pdu.register_read_message import ReadHoldingRegistersResponse

3) restart plugin or domoticz
fjuppe
Posts: 42
Joined: Thursday 14 September 2023 19:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 16341
Location: Stockholm
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by fjuppe »

Hello bramv!

Thank you for your reply !

Sorry to say, your suggested fix did not work. From what I can see, the error is about the same....by looking at the below, do you have another suggestion??
Thanks in advance!

This is what I have installed;

Code: Select all

Requirement already satisfied: solaredge_modbus in /usr/local/lib/python3.11/dist-packages (0.8.0)
Requirement already satisfied: pymodbus>=3.5.0 in /home/fjuppe/.local/lib/python3.11/site-packages (from solaredge_modbus) (3.7.4)
Requirement already satisfied: pyserial-asyncio>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from solaredge_modbus) (0.6)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from pyserial-asyncio>=0.6.0->solaredge_modbus) (3.5)
And this is what is reported in the Domoticz error log:

Code: Select all

SE Modbus: (SolarEdge_ModbusTCP) failed to load 'plugin.py', Python Path used was '/home/fjuppe/domoticz/plugins/SE_Modbus/:/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'.
2024-11-18 14:06:58.454 Error: SE Modbus: Traceback (most recent call last):
2024-11-18 14:06:58.454 Error: SE Modbus: File "/home/fjuppe/domoticz/plugins/SE_Modbus/plugin.py", line 68, in <module>
2024-11-18 14:06:58.454 Error: SE Modbus: import solaredge_modbus
2024-11-18 14:06:58.454 Error: SE Modbus: File "/usr/local/lib/python3.11/dist-packages/solaredge_modbus/__init__.py", line 9, in <module>
2024-11-18 14:06:58.454 Error: SE Modbus: from pymodbus.register_read_message import ReadHoldingRegistersResponse
2024-11-18 14:06:58.454 Error: SE Modbus: ModuleNotFoundError: No module named 'pymodbus.register_read_message'
and this is the __init__.py:

Code: Select all

"""Pymodbus: Modbus Protocol Implementation.

Released under the BSD license
"""

__all__ = [
    "ExceptionResponse",
    "FramerType",
    "ModbusException",
    "pymodbus_apply_logging_config",
    "__version__",
    "__version_full__",
]

from pymodbus.exceptions import ModbusException
from pymodbus.framer import FramerType
from pymodbus.logging import pymodbus_apply_logging_config
from pymodbus.pdu.register_read_message import ReadHoldingRegistersResponse



__version__ = "3.7.4"
__version_full__ = f"[pymodbus, version {__version__}]"
bramv
Posts: 17
Joined: Wednesday 27 June 2018 23:53
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Netherlands/Westland
Contact:

Re: Solaredge inverter plug-in Modbus TCP

Post by bramv »

Hellofjuppe,

I'm not sure but it looks like the domoticz or the plugin was not restarted or the file was not saved because the error still says the line 9 contains pymodbus.register_read_message in stead of pymodbus.pdu.register_read_message

kind regards,
Bram Vreugdenhil
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest