New Python plugin: Domoticz SolarEdge_ModbusTCP

Moderator: leecollings

AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by AddieJanssen »

You asked for a plan; well, here's a plan :D

I have dusted off and upgraded my development environment and found several topics that need attention:
  1. There are outstanding pull requests on the master branch that address issues that multiple users encounter.
    • Key not found issues.
    • Incorrect values when inverter goes to sleep at night.
  2. The detection of meters and batteries in the meters branch may not work for all inverters.
    • The meters branch requires the user to enter if they only have an inverter or if there are also batteries or meters attached. This is a result of a false response from the solaredge_modbus library for my own inverter.
  3. The meters branch needs merging into master resulting in a release of version 2 of the plugin.
    • Upgrading from v1 to v2 will result in error messages as a result of changes in parameters. There's not a lot that can be done from a plugin perspective - needs to be documented as part of the upgrade instructions.
  4. The solaredge_modbus library has been archived and needs attention.
    • The solaredge_modbus library does not verify the response of the inverter when reading batteries and meters. As a result, my plugin may "see" a non-existent battery or meter and collect random data from the inverter.
    • The solaredge_modbus library depends on another library: pymodbus. Since pymodbus has introduced changes in their API, the solaredge_modbus library will not work with the latests versions of pymodbus.
  5. Domoticz has introduced a new plugin framework named "Extended Framework" and the framework used by my plugin is based on what is now named the "Legacy Framework".
    • Although there are no reported issues with my plugin using the Legacy Framework, it makes sense to migrate to the Extended Framework at some point.
Time for a plan. I do not want to make further changes to v1 (the master branch); instead focus on getting the v2 version released as soon as possible. The initial version will still use the solaredge_modbus library and will require an older version of pymodbus (although newer than currently set for v1).
I need testers who (although they may not have meters or batteries attached to their inverter) start upgrading their v1 plugin to v2 (meters branch) and report issues (here in the Domoticz forum please - not on GitHub).

Next to that, I would like to get in touch with users that do have one or more batteries or meters attached to their inverter. I have found a potential solution for the detection of batteries and meters that should work. It needs testing. To do that, I have created a standalone python script which has nothing to do with Domoticz.
I am looking for users that know (without my help) how to create a virtual environment, install specific versions of pymodbus and run a python script.

Once v2 has become mainstream and it is clear how to correctly detect batteries and meters, I would like to focus on replacing the solaredge_modbus library in order to keep up with newer releases of pymodbus.

There are clones of my plugin that introduced additional functionality. I have not yet looked into that topic and first want to make sure the plugin works and can be installed and maintained properly.

That's the plan. Do share your thoughts - provide feedback and let me know if you can help out with the 2 above mentioned tasks.
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

Wow, that indeed sounds like a great amount of work and time that has to be done.

I have a complete SolarEdge system (since one year now), including

- Inverter

- Meter (integrated into the emergency power backup interface)

- Battery

I would very much like to participate as a tester.
I am looking for users that know (without my help) how to create a virtual environment, install specific versions of pymodbus and run a python script.

I’m just a layperson of the type "copy - paste - hoping", but I managed to install @jvanderzande’s fork with step-by-step help of AI (Claude).
https://github.com/jvanderzande/domotic ... ree/meters

Environment that finally worked after some trials and errors:
Python: 3.13.5
pymodbus: 3.5.4
solaredge_modbus: 0.8.0

So I have a python virtual environment. PYTHONPATH is permantly set in /home/pi/domoticz.env so that Domoticz finds the virtual environment.

So I will not ask for such basic here - AI is my assistant.
I need testers who (although they may not have meters or batteries attached to their inverter) start upgrading their v1 plugin to v2 (meters branch) and report issues (here in the Domoticz forum please - not on GitHub)."\
I only have to find out first if both plugins can run in parallel or if and how I must update or delete jvanderzande’s fork.

If you really go through with updating your plugin, I would greatly appreciate it!
Stop, look and listen.
AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Pre-release version v2.0.5 published

Post by AddieJanssen »

Hi all,

I have just published v2.0.5 on GitHub.

The meters branch has been merged into main, meaning that v1.x.x is no more and we will continue with v2.x.x.

There are no functional changes compared to v2.0.4, however, this version should fix the "key not found" issues.
The requirements have been upgraded to match the latest supported versions by the solaredge-modbus library.

If possible: upgrade your plugin or run this version next to your current version and share your feedback.

I am eager to find out if the "key not found" issue is gone with this version.

Meanwhile, I'll be beavering away at my "to-do" list as shared earlier.
User avatar
JayDotR
Posts: 28
Joined: Thursday 02 January 2025 21:15
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Lux
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by JayDotR »

Hi Addie,

I added two more sockets to my modbusproxy, and your 2.0.5 will run in // with the 2.0.4 of the meter branch on a distinct raspberry.

I will keep you updated of eventual findings or suggests if they appear ;)

Jan
--
Domoticz Beta on raspberry3b, and raspberry4(b) on Rasbian Trixie / Python 3.13 / 64 bit
Using: PiHole, SolarEdge Modbus, Sainlogic / Weather Underground, MQTT, Fritzbox, P1 Meter(s), dzvents Scripting
https://www.github.com/janreimen/
User avatar
JayDotR
Posts: 28
Joined: Thursday 02 January 2025 21:15
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Lux
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by JayDotR »

NB : since debian12, using pip3 to install modules works fine in .venv, however some of the modules exist in never versions natively, so no more need to --break-system-packages if you wont .venv the plugin ;)
--
Domoticz Beta on raspberry3b, and raspberry4(b) on Rasbian Trixie / Python 3.13 / 64 bit
Using: PiHole, SolarEdge Modbus, Sainlogic / Weather Underground, MQTT, Fritzbox, P1 Meter(s), dzvents Scripting
https://www.github.com/janreimen/
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

Unfortunately I am traveling, but I hope to install it tomorrow and will give feedback.
Stop, look and listen.
hjzwiers
Posts: 305
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by hjzwiers »

I'm eager to test this version, and i'm specifically looking into chaging the ev without interaction to the battery and pv, so during the winter i can charge leaving the pv and battery untouched. I've done som work with AI and it came up with the following question:

The current MetersDev plugin exposes Storage Control Mode, Remote Control Mode, and Storage AC Charge Policy, but doesn't expose the SolarEdge rc_discharge_limit register.

The bundled solaredge_modbus library already defines:

rc_discharge_limit = (0xe010, 2, HOLDING, FLOAT32, float, "Remote Control Command Discharge Limit", "W", 6)

and its write implementation supports FLOAT32 via add_32bit_float().

Would you consider exposing rc_discharge_limit as a writable numeric inverter device in the MetersDev plugin?

The intended use is to set the SolarEdge remote battery discharge limit to 0 W while an EV is charging in a "Direct" mode, so grid power supplies the EV deficit without discharging the battery.

I would prefer an upstream implementation rather than modifying the plugin locally.

Is it a possibility to implement this? I also see the the battery is switching to different modes when I'm in Time of use, it switches to Charge from PV and AC, which is fine but i was wondering if it is normal behavior.
User avatar
jvdz
Posts: 2476
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by jvdz »

@AddieJanssen,

In case you are interested in what I have done in my version, there is a thread here where the first post describes the changes I made.
I can make a PR for the "Active Power" change from value to Dimmer device, so you can dynamically update the production from Domoticz when you want.
I will decommission my other development branches when you are picking up your development again to avoid any confusion!
Thanks for all your efforts, and let me know when I can assist..... but I "only" have an inverter setup to test with. :-)
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

EDIT: Sorry. Forget this. It is defined in requiremtns.txt. pymodbus: 3.6.9. I just installed v2.0.5 and it works. Will report later.

Currently, with @janvanderzandes fork, I am running

Python: 3.13.5
pymodbus: 3.5.4 (newer versions produced errors)
solaredge_modbus: 0.8.0

Which pymodbus version must be used for testing @AddieJanssens Pre-release version v2.0.5?
Stop, look and listen.
AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by AddieJanssen »

Regarding the following snippets:
hjzwiers wrote: Thursday 17 September 2026 14:26 ... I've done som work with AI and it came up with the following question: ....
... Is it a possibility to implement this?...
jvdz wrote: Thursday 17 September 2026 15:01 In case you are interested in what I have done in my version, there is a thread here where the first post describes the changes I made. I can make a PR for...
I am currently processing the changes in the pull requests that were made in the past.
The next step is to replace the, archived, solaredge_modbus library.
Once that's done, we should have a version of the plugin were new functionality can be added to again.
So, please hang on to these questions and we will come back to it in due time.

Regarding this question:
hjzwiers wrote: Thursday 17 September 2026 14:26 ... I also see the the battery is switching to different modes when I'm in Time of use, it switches to Charge from PV and AC, which is fine but i was wondering if it is normal behavior.
I am not sure if this is a question related to the plugin or the behavior of your inverter/battery setup.
If it is related to the plugin, it would help to share relevant snippets of the json response from the Domoticz log.
The json response will only show up in the log when the Log Level is set to (at least) Verbose+.

It's been great fun to start working on the plugin again. Getting feedback and people offering help is the incentive that makes it worth investing time into it! Thanks for that - much appreciated.
Last edited by AddieJanssen on Thursday 17 September 2026 21:37, edited 1 time in total.
User avatar
jvdz
Posts: 2476
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by jvdz »

AddieJanssen wrote: Thursday 17 September 2026 18:56 Regarding this question:
jvdz wrote: Thursday 17 September 2026 15:01 I also see the the battery is switching to different modes when I'm in Time of use, it switches to Charge from PV and AC, which is fine but i was wondering if it is normal behavior.
I didn't write that and should be:
hjzwiers wrote: Thursday 17 September 2026 14:26 I also see the the battery is switching to different modes when I'm in Time of use, it switches to Charge from PV and AC, which is fine but i was wondering if it is normal behavior.
AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by AddieJanssen »

Oops... corrected
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

.
.
Managed to get v2.0.5 running. 82 devices created receiving data. No errors so far. Let's see tomorrow at daylight.
.
.
AddieJanssen wrote: Thursday 17 September 2026 18:56 It's been great fun to start working on the plugin again.
👍👍👍
Stop, look and listen.
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

Thank you for the work so far!

All inverter, battery and meter devices are working here without any error in the log and they receive data.
"I am eager to find out if the "key not found" issue is gone with this version."
--> I have no "key not found" error.
"Incorrect values when inverter goes to sleep at night."
--> Only had a quick look last night, so I will oberseve it tonight and report

It also works with the energy dashboard and energy widget - see screenshot of the devices I am using.

However, unfortunately there is no pure solar production device as these devices are adding or subtracting battery usage. But this is not related to the plugin. SolarEdge simply does not provide this as a separate value.

I used to solve this already in the past by a virtual device that receives data via a script that subtracts or adds the battery values.
"The solaredge_modbus library depends on another library: pymodbus. Since pymodbus has introduced changes in their API, the solaredge_modbus library will not work with the latests versions of pymodbus"
--> At least from my user's point of view there doesn't seem to be any problem right now using the old pymodbus 3.6.9.

.
Attachments
Screenshot_20260918-150622.png
Screenshot_20260918-150622.png (254.67 KiB) Viewed 250 times
Stop, look and listen.
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

I have to cancel my claim that there are not errors. Yesterday evening at 21:34, there were th following ones:

Code: Select all

2026-09-18 21:34:22.398  Error: SE_Modbus_Neu: Call to function 'onHeartbeat' failed, exception details:
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu: Traceback (most recent call last):
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:   File "/home/pi/domoticz/plugins/solaredge_modbus_tcp_v2/plugin.py", line 709, in onHeartbeat
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:     _plugin.onHeartbeat()
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:     ~~~~~~~~~~~~~~~~~~~^^
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:   File "/home/pi/domoticz/plugins/solaredge_modbus_tcp_v2/plugin.py", line 251, in onHeartbeat
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu:     meter = self.inverter.meters()[device_name]
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu:             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu: KeyError: 'Meter1'
No new errors since then. Will watch it, if it always comes ones in the evening. Maybe always due to lack of sunpower.

Statistics of inverter, battery and meter power devices do not show any strange values at 21:34
Stop, look and listen.
AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by AddieJanssen »

imautohuttraeger wrote: Saturday 19 September 2026 11:23 I have to cancel my claim that there are not errors. Yesterday evening at 21:34, there were th following ones:

Code: Select all

2026-09-18 21:34:22.398  Error: SE_Modbus_Neu: Call to function 'onHeartbeat' failed, exception details:
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu: Traceback (most recent call last):
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:   File "/home/pi/domoticz/plugins/solaredge_modbus_tcp_v2/plugin.py", line 709, in onHeartbeat
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:     _plugin.onHeartbeat()
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:     ~~~~~~~~~~~~~~~~~~~^^
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:   File "/home/pi/domoticz/plugins/solaredge_modbus_tcp_v2/plugin.py", line 251, in onHeartbeat
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu:     meter = self.inverter.meters()[device_name]
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu:             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu: KeyError: 'Meter1'
No new errors since then. Will watch it, if it always comes ones in the evening. Maybe always due to lack of sunpower.

Statistics of inverter, battery and meter power devices do not show any strange values at 21:34
That's interesting. The error states that the plugin did not receive any information of Meter1. Meters in general don't "just" disappear.

Would you be so kind to set the log level of the plugin to Verbose+ and if the error occurs, include the latest json output before the error in your message? That gives context to why the error occurred.
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

"Would you be so kind to set the log level of the plugin to Verbose+ and if the error occurs, include the latest json output before the error in your message? That gives context to why the error occurred."
I have changed the log level to verbose+ yesterday late afternoon. This night there were no SolarEgde related errors. However, I have copied the error log (Setup / Log) but there are just sValue errors that are existent for a longer time already and I haven't found time yet to debug .

Code: Select all

2026-09-19 18:03:51.757  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:03:57.490  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:03:57.632  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:04:47.098  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:04:47.164  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:05:46.251  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:05:46.394  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:05:46.599  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:05:46.740  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:05:47.015  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:05:47.155  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:05:57.539  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:05:57.736  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:06:16.215  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:06:16.421  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:06:29.144  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:06:29.459  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:06:29.691  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:06:29.912  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:06:30.261  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:06:30.833  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:06:44.698  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:06:44.940  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:00.283  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:18.980  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:19.312  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:27.934  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:28.077  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:35.290  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:35.453  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:39.954  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:40.385  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:49.501  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:49.684  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:54.556  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:54.776  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:09:59.094  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:09:59.537  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:13:20.422  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:13:20.520  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:13:41.950  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:13:42.016  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:14:27.668  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:14:27.808  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:14:28.034  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:14:28.178  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:14:28.450  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:14:28.592  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:15:50.542  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:15:50.742  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:16:00.384  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:16:00.589  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:16:38.987  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:16:39.072  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:16:51.173  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:16:51.351  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:17:01.309  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:17:01.559  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:22:09.563  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:22:09.737  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:23:09.663  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:23:09.824  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:23:43.232  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:23:43.374  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:24:05.974  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:24:06.158  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:32:18.452  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:32:18.599  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:32:34.411  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:32:34.603  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:32:34.830  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:32:34.971  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:32:35.335  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:32:35.512  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:33:00.704  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:33:01.016  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:33:33.369  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:33:33.511  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:37:21.899  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:37:22.047  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 18:37:27.532  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 18:37:27.718  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 20:39:49.917  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 20:39:50.256  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 21:26:00.617  Error: Open Meteo ohne API: Error getting http data!
2026-09-19 23:21:59.731  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 23:21:59.951  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 23:22:00.195  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 23:22:00.446  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-19 23:22:00.709  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-19 23:22:00.906  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-20 02:33:09.524  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-20 02:33:09.695  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-20 03:10:58.824  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-20 03:10:58.961  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-20 03:10:59.608  Error: Invalid Number sValue: '0;0' for device idx: '367'
2026-09-20 03:10:59.744  Error: Invalid Number sValue: '375;3.1' for device idx: '818'
2026-09-20 09:07:01.938  Error: Open Meteo ohne API: Error getting http data!
2026-09-20 10:07:07.329  Error: Open Meteo ohne API: Error getting http data!
2026-09-20 11:37:16.529  Error: Open Meteo ohne API: Error getting http data!
Or do you mean sometching else with "include the latest json output"?

Can I keep the verbose+ log level? System is still running stable, so no problem yet. Or will the log expand critically and write too much on the sd card?
Stop, look and listen.
AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by AddieJanssen »

imautohuttraeger wrote: Sunday 20 September 2026 12:11
"Would you be so kind to set the log level of the plugin to Verbose+ and if the error occurs, include the latest json output before the error in your message? That gives context to why the error occurred."
I have changed the log level to verbose+ yesterday late afternoon. This night there were no SolarEgde related errors. However, I have copied the error log (Setup / Log) but there are just sValue errors that are existent for a longer time already and I haven't found time yet to debug .

Or do you mean sometching else with "include the latest json output"?

Can I keep the verbose+ log level? System is still running stable, so no problem yet. Or will the log expand critically and write too much on the sd card?
If everything runs fine, the Domoticz log shows a lot of lines like this (when log level is set to verbose+):

Code: Select all

2026-09-19 16:03:21.187  SolarEdge: Inverter returned information for Inverter
2026-09-19 16:03:21.188  SolarEdge: device: Inverter values: {
    "c_id": "SunS",
    "c_did": 1,
    "c_length": 65,
    "c_manufacturer": "SolarEdge",
    "c_model": "SE7K",
    "c_version": "0003.2537",
    "c_deviceaddress": 1,
    "c_sunspec_did": 103,
    "c_sunspec_length": 50,
    "current": 348,
    "l1_current": 115,
    "l2_current": 116,
    "l3_current": 116,
    "current_scale": -2,
    "l1_voltage": 4015,
    "l2_voltage": 3988,
    "l3_voltage": 4024,
    "l1n_voltage": 2328,
    "l2n_voltage": 2324,
    "l3n_voltage": 2280,
    "voltage_scale": -1,
    "power_ac": 7810,
    "power_ac_scale": -1,
    "frequency": 5002,
    "frequency_scale": -2,
    "power_apparent": 8037,
    "power_apparent_scale": -1,
    "power_reactive": -19000,
    "power_reactive_scale": -2,
    "power_factor": -9713,
    "power_factor_scale": -2,
    "energy_total": 40678720,
    "energy_total_scale": 0,
    "current_dc": 10606,
    "current_dc_scale": -4,
    "voltage_dc": 7475,
    "voltage_dc_scale": -1,
    "power_dc": 7928,
    "power_dc_scale": -1,
    "temperature": 4111,
    "temperature_scale": -2,
    "status": 4,
    "vendor_status": 0,
    "rrcr_state": 0,
    "active_power_limit": 100,
    "cosphi": 0,
    "commit_power_control_settings": 0,
    "restore_power_control_default_settings": 0,
    "reactive_power_config": 0,
    "reactive_power_response_time": 200,
    "advanced_power_control_enable": 1,
    "export_control_mode": 0,
    "export_control_limit_mode": 0,
    "export_control_site_limit": 0
}
2026-09-19 16:03:21.203  SolarEdge: Updated 25 values out of 25
When there's error, we want to know what the inverter returned to understand what happened.
For example:

Code: Select all

...
2026-09-20 07:19:03.671  SolarEdge: device: Inverter values: {
    "export_control_mode": 0,
    "export_control_limit_mode": 0,
    "export_control_site_limit": 0
}
2026-09-20 07:19:03.671  Error: SolarEdge: Call to function 'onHeartbeat' failed, exception details:
....
That shows that we only got 3 values from the inverter and its clear that the plugin can't process this, resulting in an error.

So, what we need, is something like this

Code: Select all

2026-09-18 21:34:22.xxx SE_Modbus_Neu: device: Inverter values: {
    "c_id": "SunS",
    "c_did": 1,
    "c_length": 65,
    "c_manufacturer": "SolarEdge",
    "c_model": "SE7K",
    "c_version": "0003.2537",
    "c_deviceaddress": 1,
    "c_sunspec_did": 103,
    "c_sunspec_length": 50,
    "current": 348,
    "l1_current": 115,
    "l2_current": 116,
    "l3_current": 116,
    "current_scale": -2,
    "l1_voltage": 4015,
    "l2_voltage": 3988,
    "l3_voltage": 4024,
.....
}
2026-09-18 21:34:22.398  Error: SE_Modbus_Neu: Call to function 'onHeartbeat' failed, exception details:
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu: Traceback (most recent call last):
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:   File "/home/pi/domoticz/plugins/solaredge_modbus_tcp_v2/plugin.py", line 709, in onHeartbeat
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:     _plugin.onHeartbeat()
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:     ~~~~~~~~~~~~~~~~~~~^^
2026-09-18 21:34:22.418  Error: SE_Modbus_Neu:   File "/home/pi/domoticz/plugins/solaredge_modbus_tcp_v2/plugin.py", line 251, in onHeartbeat
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu:     meter = self.inverter.meters()[device_name]
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu:             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
2026-09-18 21:34:22.421  Error: SE_Modbus_Neu: KeyError: 'Meter1'
Hope this helps....
User avatar
imautohuttraeger
Posts: 392
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Germany
Contact:

Re: New Python plugin: Domoticz SolarEdge_ModbusTCP

Post by imautohuttraeger »

When the the ERRORS are happening, they are shown for a longer time in the log of the web UI. So I can see in the morning what happened last night at 21:3. I have posted the SE related errors
Saturday 19 September 2026 11:23 (see above. They happened on Friday, but on Saturday there were no errors)

But if you need more than the errors: The number of NORMAL and STATUS entries are very, very much. So only the entries of the actual minute are shown in the web UI. This means I can't provide the corresponding entries at the specific time when the errors occurred.

That is why I asked if you mean something else than the what I can provide from the log didplay of the web UI.

Is there a file or something that stores the log of a longer time?

Sorry, it seems I am not a good helper. Bt I simply don't know how to provide more than the errors. Via the we UI I must sit in front of the computer exactly at the time the errors are happening an react very fast to copy it 🙂
Attachments
Screenshot_20260920-163327.png
Screenshot_20260920-163327.png (216.81 KiB) Viewed 127 times
Stop, look and listen.
AddieJanssen
Posts: 38
Joined: Sunday 27 September 2020 16:17
Target OS: -
Domoticz version:
Contact:

Pre-release version v2.0.6 published

Post by AddieJanssen »

Hi all,

I have just published v2.0.6 on GitHub.

The goal of this release was fixing issues and making the plugin more robust. That completes a few items on my to-do list.
  1. There are outstanding pull requests on the master branch that address issues that multiple users encounter.
    • Key not found issues.
    • Incorrect values when inverter goes to sleep at night.
  2. The detection of meters and batteries in the meters branch may not work for all inverters.
    • The meters branch requires the user to enter if they only have an inverter or if there are also batteries or meters attached. This is a result of a false response from the solaredge_modbus library for my own inverter.
  3. The meters branch needs merging into master resulting in a release of version 2 of the plugin.
    • Upgrading from v1 to v2 will result in error messages as a result of changes in parameters. There's not a lot that can be done from a plugin perspective - needs to be documented as part of the upgrade instructions.
  4. The solaredge_modbus library has been archived and needs attention.
    • The solaredge_modbus library does not verify the response of the inverter when reading batteries and meters. As a result, my plugin may "see" a non-existent battery or meter and collect random data from the inverter.
    • The solaredge_modbus library depends on another library: pymodbus. Since pymodbus has introduced changes in their API, the solaredge_modbus library will not work with the latests versions of pymodbus.
  5. Domoticz has introduced a new plugin framework named "Extended Framework" and the framework used by my plugin is based on what is now named the "Legacy Framework".
    • Although there are no reported issues with my plugin using the Legacy Framework, it makes sense to migrate to the Extended Framework at some point.
My focus will now shift to the solaredge_modbus library and pymodbus topics.

If possible: upgrade your plugin or run this version next to your current version and share your feedback.
Post Reply