SolarEdge production throttling from Domoticz

Moderator: leecollings

eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

That would be nice !
I am in progress of migrating my old install to a fresh docker based install
I have this python plugin running but I needed to manually change the requirements to requirements80.txt version
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

You can still test with the updated plugin.py that is available in the separate branch. Just rename you current version and use the one available in github.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

I was looking at your version running on my test machine and I noticed that is shows about 20W more solar production that the addiejansen version
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

It is the exact same code that retrieves the data, so that sounds pretty strange to me that the difference is fixed, but I understand there will be a difference s you never query the converter at the exact same time. I even didn't know you could have multiple queries running at the same time.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

My "production" domoticz rpi polls my solaredge and so does my "test" rpi.
although they both poll every 5 seconds, there are differemces. Overall they are close to eachother.
For now I'll leave it as it is ;-)
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

I think I know what a difference could be. Honestly think the average calculation should be removed and the real values should be used. So try simply disabling that on both in the hardware settings.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

Ok, changed that one on both.
too late for today, production just stopped
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
HvdW
Posts: 612
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Re: SolarEdge production throttling from Domoticz

Post by HvdW »

Very, very interesting @jvdz
I don't have SolarEdge so I thought this is not for me.
I have asked AI if there's something for my 2013 SMA 5000TL-21 and guess what?

Code: Select all

The SMA Power Control Module is an interesting option if you want to regulate the energy fed back into the grid. This module allows the inverter's active power to be dynamically adjusted in steps of 0-30-60-100%, depending on the grid connection. This means you can prevent excessive power feed-in, which can be useful if you want to avoid costs or optimize self-consumption.
Key features of the module:
Dynamic power regulation: The module can reduce the inverter's power when the grid connection reaches a threshold.
Compatibility: Suitable for various Sunny Boy and Sunny Tripower inverters.
Control via sensors and PLC: Current transformers measure the current at the grid connection, and a PLC sends digital signals to the module.
Monitoring via Sunny Portal: You receive notifications when the module is activated.

Compatible SMA inverters controlled with the Power Control Module Sunny Boy and Sunny Tripower inverters can reduce active power through control via the Power Control Module. Depending on the type of inverter, the appropriate optional Power Control Module must be selected.
SMA inverters compatible with the Power Control Module PWCBRD-10:
Sunny Tripower 5/6/7/8/9/10/12000TL-20
SMA inverters compatible with the Power Control Module PCONTROLMOD:
Sunny Boy 2500/3000TLST-21
Sunny Boy 3000/3600/4000/5000/TL-21
Sunny Tripower 8/10/12/15/17000TL-10
Sunny Tripower 20/25000TL-30
Sunny Tripower 15/20000TLEE-10
Time to dive into this matter.
Bugs bug me.
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

When somebody is interested to work with me to get the battery info also in the plugin:
I do not have a battery connected to my SolarEdge, but can provide a test plugin that lists all information available when a battery is connected to the SolarEdge inverter.
When Log level is set to debug, it will list all available information in a JSON format.
This information can then be used to determine whether a battery is connected and then see what devices should be created.
We can do this offline via Email to easily exchange information.... just ping me in case you're interested.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
imautohuttraeger
Posts: 139
Joined: Saturday 14 March 2020 13:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Location: Germany
Contact:

Re: SolarEdge production throttling from Domoticz

Post by imautohuttraeger »

I'm highly interested, but I'll hardly be home for the next few weeks and possibly months. I could try it remotely via VPN, but I can't guarantee it would work.

Hope someone else can step in.
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

I manage the domoticz of a friend who has a solaredge with battery ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

I have created a separate branch "batteries" where i added the query for meters & batteries which will be added to the available data.
When you use this version of plugin.py and you set the log to debug, it will dump all retrieved data in the domotics.log.
This is what it looks like for me without any attached meters or batteries:

Code: Select all

2025-06-12 10:19:25.408  Solaredge: [V] inverter values : {
    "c_id": "SunS",
    "c_did": 1,
    "c_length": 65,
    "c_manufacturer": "SolarEdge",
    "c_model": "SE5000",
    "c_version": "0003.2537",
    "c_deviceaddress": 1,
    "c_sunspec_did": 101,
    "c_sunspec_length": 50,
    "current": 488,
    "l1_current": 488,
    "l2_current": 0,
    "l3_current": 0,
    "current_scale": -2,
    "l1_voltage": 2349,
    "l2_voltage": 0,
    "l3_voltage": 0,
    "l1n_voltage": 0,
    "l2n_voltage": 0,
    "l3n_voltage": 0,
    "voltage_scale": -1,
    "power_ac": 11409,
    "power_ac_scale": -1,
    "frequency": 49974,
    "frequency_scale": -3,
    "power_apparent": 11486,
    "power_apparent_scale": -1,
    "power_reactive": 13294,
    "power_reactive_scale": -2,
    "power_factor": 9932,
    "power_factor_scale": -2,
    "energy_total": 36040880,
    "energy_total_scale": 0,
    "current_dc": 3130,
    "current_dc_scale": -3,
    "voltage_dc": 3700,
    "voltage_dc_scale": -1,
    "power_dc": 11583,
    "power_dc_scale": -1,
    "temperature": 3667,
    "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,
    "meters": {},
    "batteries": {
        "Battery1": {
            "c_manufacturer": "\u0002",
            "c_model": "False",
            "c_version": "False",
            "c_serialnumber": "False",
            "c_deviceaddress": 15,
            "c_sunspec_did": 0,
            "rated_energy": -3.4028234663852886e+38,
            "maximum_charge_continuous_power": -3.4028234663852886e+38,
            "maximum_discharge_continuous_power": -3.4028234663852886e+38,
            "maximum_charge_peak_power": -3.4028234663852886e+38,
            "maximum_discharge_peak_power": -3.4028234663852886e+38,
            "average_temperature": -3.4028234663852886e+38,
            "maximum_temperature": 0.0,
            "instantaneous_voltage": -3.4028234663852886e+38,
            "instantaneous_current": -3.4028234663852886e+38,
            "instantaneous_power": 0.0,
            "lifetime_export_energy_counter": 0,
            "lifetime_import_energy_counter": 0,
            "maximum_energy": -3.4028234663852886e+38,
            "available_energy": -3.4028234663852886e+38,
            "soh": -3.4028234663852886e+38,
            "soe": -3.4028234663852886e+38,
            "status": 7,
            "status_internal": 0,
            "event_log": 0,
            "event_log_internal": 0
        },
        "Battery2": {
            "c_manufacturer": "\u0002",
            "c_model": "False",
            "c_version": "False",
            "c_serialnumber": "False",
            "c_deviceaddress": 14,
            "c_sunspec_did": 0,
            "rated_energy": -3.4028234663852886e+38,
            "maximum_charge_continuous_power": -3.4028234663852886e+38,
            "maximum_discharge_continuous_power": -3.4028234663852886e+38,
            "maximum_charge_peak_power": -3.4028234663852886e+38,
            "maximum_discharge_peak_power": -3.4028234663852886e+38,
            "average_temperature": -3.4028234663852886e+38,
            "maximum_temperature": 0.0,
            "instantaneous_voltage": -3.4028234663852886e+38,
            "instantaneous_current": -3.4028234663852886e+38,
            "instantaneous_power": 0.0,
            "lifetime_export_energy_counter": 0,
            "lifetime_import_energy_counter": 0,
            "maximum_energy": -3.4028234663852886e+38,
            "available_energy": -3.4028234663852886e+38,
            "soh": -3.4028234663852886e+38,
            "soe": -3.4028234663852886e+38,
            "status": 7,
            "status_internal": 0,
            "event_log": 0,
            "event_log_internal": 0
        }
    }
}
I assume you will see actual data when Batteries are attached and also find extra data in case you have power meters attached measuring the life return to the net.
In case you do see actual data, it needs to be determined which of those values need to be shown in Domoticz and which devicetype is required.
This then will be put into a table and then devices will be created and updated after the code for that is added.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

got an error in my logging on the main tree of @jvdz

Code: Select all

2025-06-12 14:17:34.700 Error: Solaredge: Call to function 'onHeartbeat' failed, exception details:
2025-06-12 14:17:34.700 Error: Solaredge: Traceback (most recent call last):
2025-06-12 14:17:34.701 Error: Solaredge: File "/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 544, in onHeartbeat
2025-06-12 14:17:34.701 Error: Solaredge: _plugin.onHeartbeat()
2025-06-12 14:17:34.701 Error: Solaredge: File "/opt/domoticz/userdata/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 352, in onHeartbeat
2025-06-12 14:17:34.701 Error: Solaredge: to_lookup = int(inverter_values[unit[Column.MODBUSNAME]])
2025-06-12 14:17:34.701 Error: Solaredge: ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
2025-06-12 14:17:34.701 Error: Solaredge: KeyError: 'status'
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

eddieb wrote: Wednesday 11 June 2025 21:43 My "production" domoticz rpi polls my solaredge and so does my "test" rpi.
although they both poll every 5 seconds, there are differemces. Overall they are close to eachother.
For now I'll leave it as it is ;-)
Are you using a mod-bus proxy to allow multiple devices to connect? If so, how is that running for you?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

No, nothing special, just banging the interface with 2 clients
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

Ok, that doesn't work for my setup as it gives error when connecting with with 2 clients at the same time, but seems to be "normal". Created an modbusproxy docker to be able to have 2 clients connect now.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

I tried the battery version on the system of my friend ...
no luck in an easy way, is an older environment, can not upgrade just because I want to test this, sorry

Code: Select all

2025-06-12 19:24:19.612 Status: Solaredge direct: Initialized version 1.2.3, author 'Addie Janssen Modified by:jvdzande'
2025-06-12 19:24:19.646 Status: Solaredge direct: solaredge_modbus version: 0.7.0
2025-06-12 19:24:19.646 Status: Solaredge direct: pymodbus version: 2.4.0
2025-06-12 19:24:19.646 Error: Solaredge direct: Call to function 'onStart' failed, exception details:
2025-06-12 19:24:19.648 Error: Solaredge direct: Traceback (most recent call last):
2025-06-12 19:24:19.648 Error: Solaredge direct: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 832, in onStart
2025-06-12 19:24:19.649 Error: Solaredge direct: _plugin.onStart()
2025-06-12 19:24:19.649 Error: Solaredge direct: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 366, in onStart
2025-06-12 19:24:19.649 Error: Solaredge direct: self.p1_idx = int(Parameters["Mode6"])
2025-06-12 19:24:19.649 Error: Solaredge direct: ValueError: invalid literal for int() with base 10: ''
2025-06-12 19:24:26.063 Error: Solaredge direct: Call to function 'onHeartbeat' failed, exception details:
2025-06-12 19:24:26.064 Error: Solaredge direct: Traceback (most recent call last):
2025-06-12 19:24:26.064 Error: Solaredge direct: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 836, in onHeartbeat
2025-06-12 19:24:26.064 Error: Solaredge direct: _plugin.onHeartbeat()
2025-06-12 19:24:26.064 Error: Solaredge direct: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 569, in onHeartbeat
2025-06-12 19:24:26.064 Error: Solaredge direct: self.contactInverter()
2025-06-12 19:24:26.064 Error: Solaredge direct: File "/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py", line 592, in contactInverter
2025-06-12 19:24:26.064 Error: Solaredge direct: inverter_values = self.inverter.read_all()
2025-06-12 19:24:26.064 Error: Solaredge direct: AttributeError: 'NoneType' object has no attribute 'read_all'
2025-06-12 19:24:36.083 Error: Solaredge direct: Call to function 'onHeartbeat' failed, exception details:
2025-06-12 19:24:36.084 Error: Solaredge direct: Traceback (most recent call last): 
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

You get this because domoticz isn't restarted after updating the plugin and it is missing the added the extra option for syncing with idx.
Alternative is to disable that idx sync part so it isn't missing... can do that if that makes lives easier for now.
I am wondering which version you took as that idx part is in both branches.

Anyway, I added a check for it being a number, else make it 0, which is the better approach. Try the latest version when you have time. :-)
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
eddieb
Posts: 335
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by eddieb »

I did a systemctl restart domoticz ...
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC with Node-Red and MQTT / SolarEdge SE3500H modbus_tcp / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
User avatar
jvdz
Posts: 2328
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge production throttling from Domoticz

Post by jvdz »

understood. I needed that check in there when it isn't specified yet in the hardware setup page. It forces you there to put in a 0 to disable the sync.
All you really need is to "Update" the hardware to restart the plugin without having to restart the whole Domoticz instance.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest