New Python plugin: Domoticz SolarEdge_ModbusTCP
Moderator: leecollings
-
- Posts: 17
- Joined: Sunday 27 September 2020 16:17
- Target OS: -
- Domoticz version:
- Contact:
New Python plugin: Domoticz SolarEdge_ModbusTCP
I have created a Python plugin to get the data from my SolarEdge inverter into Domoticz.
The inverter needs to be connected to the network and Modbus needs to be enabled on it.
The plugin is available on GitHub:
https://github.com/addiejanssen/domotic ... tcp-plugin
It would be great to hear your feedback on it.
If it is working for you: please share your setup.
Enjoy,
Addie
The inverter needs to be connected to the network and Modbus needs to be enabled on it.
The plugin is available on GitHub:
https://github.com/addiejanssen/domotic ... tcp-plugin
It would be great to hear your feedback on it.
If it is working for you: please share your setup.
Enjoy,
Addie
-
- Posts: 279
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Hi,
just installed this plugin following your instructions.
All went smooth and it seems to work ok on a SE3500H ...
Eddie
just installed this plugin following your instructions.
All went smooth and it seems to work ok on a SE3500H ...
Eddie
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
Feeding ADSB https://adsb.im/home
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Hi Addie,
Installed your plugin today as well. Works like a charm. Well done!
Also I have an SE3500H with 12 panels.
I did set debug = true But I don't see any messages.
Installed your plugin today as well. Works like a charm. Well done!
Also I have an SE3500H with 12 panels.
I did set debug = true But I don't see any messages.
Greetings McMelloW
-
- Posts: 279
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Running for 2 days now and I am very pleased with this plugin.
I notice something in I can not explain ... Why do these events occur with different users ?
Why are some events caused by "timer" ???
I notice something in I can not explain ... Why do these events occur with different users ?
Why are some events caused by "timer" ???
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
Feeding ADSB https://adsb.im/home
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Having the same as Eddieb.
The plugin is running 24/7 During sleeping hours, 'sleeping' data is still added to the database. Can we change this?
The plugin is running 24/7 During sleeping hours, 'sleeping' data is still added to the database. Can we change this?
Greetings McMelloW
-
- Posts: 279
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Actually I don't mind monitoring (parts) of the inverter 24x7
I was just curious about the different users ...
And, if there is somthing like "sleeping" time, when is this ? is this configurable ?
I was just curious about the different users ...
And, if there is somthing like "sleeping" time, when is this ? is this configurable ?
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
Feeding ADSB https://adsb.im/home
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
I don't know about the different users either.
What I understand from my supplier. The inverter goes to the status sleeping when the production is less the a certain amount on the panels.
Up till now, I have used a DzVents script with a perl script to readout the inverter. This is active only during daytime.
The inverter is allways in sleeping status during this time interval.
What I understand from my supplier. The inverter goes to the status sleeping when the production is less the a certain amount on the panels.
Up till now, I have used a DzVents script with a perl script to readout the inverter. This is active only during daytime.
Code: Select all
on = {
timer = { 'every minute between 15 minutes before sunrise and 15 minutes after sunset' }
Greetings McMelloW
-
- Posts: 279
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
at least the Temperature, P1 Voltage and Frequency counters work 24/7.
the inverter self does not update the other counters when idle ...
the inverter self does not update the other counters when idle ...
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
Feeding ADSB https://adsb.im/home
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
In that case, it is no big deal to run 24/7
Greetings McMelloW
-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Hi Addie,
Would it also be possible to "fire" the script from a script ?
i.e. I do like "sync" it from my P1 activity.
This to be able to calculate the in house consumption of power.
( yes I know calculating it from an event makes me calculating it 1 sample too late , but I still like this very much )
Would it also be possible to "fire" the script from a script ?
i.e. I do like "sync" it from my P1 activity.
This to be able to calculate the in house consumption of power.
( yes I know calculating it from an event makes me calculating it 1 sample too late , but I still like this very much )
-
- Posts: 279
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
that would be nice, but P1 executes every second and I doubt if the inverter likes to be polled every second ...freijn wrote: ↑Thursday 01 October 2020 21:49 Hi Addie,
Would it also be possible to "fire" the script from a script ?
i.e. I do like "sync" it from my P1 activity.
This to be able to calculate the in house consumption of power.
( yes I know calculating it from an event makes me calculating it 1 sample too late , but I still like this very much )
I am running a script here that counts P1power and Solarpower into Realpower.
The script is triggerd by Solarpower and is pretty accurate.
Except when there is fast fluctuation in Solarpower ... The values from the inverter seems to have a small delay compared with P1 ...
My calculation sometimes give me NEGATIVE Realpower usages because of this !
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
Feeding ADSB https://adsb.im/home
-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
My inverter is happy with it. fired and calculated every second.
-
- Posts: 279
- Joined: Wednesday 04 July 2018 7:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Hmm,
I am interested in the modifications you made to make this happen
I am interested in the modifications you made to make this happen
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
Feeding ADSB https://adsb.im/home
- McMelloW
- Posts: 427
- Joined: Monday 20 November 2017 17:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V2024.1
- Location: Harderwijk, NL
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Getting regular the following errors in the log.
What can I do about this?
What can I do about this?
Code: Select all
2020-10-03 11:58:54.790 Error: (SolarEdge) 'onHeartbeat' failed 'KeyError'.
2020-10-03 11:58:54.790 Error: (SolarEdge) ----> Line 522 in '/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py', function onHeartbeat
2020-10-03 11:58:54.790 Error: (SolarEdge) ----> Line 335 in '/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py', function onHeartbeat
Greetings McMelloW
- Sjonnie2017
- Posts: 361
- Joined: Wednesday 02 August 2017 19:43
- Target OS: Linux
- Domoticz version: Latest ß
- Location: The Netherlands
- Contact:
Just a tiny little problem
Hi,
I installed the script in a somewhat different way than described on github (I missed one line ). I can add the hardware but the devices don't show up. Any help truly appreciated!
The steps I took (and the mistake I made )
EDIT: I forgot to add the log
Greetz,
Sjonnie
I installed the script in a somewhat different way than described on github (I missed one line ). I can add the hardware but the devices don't show up. Any help truly appreciated!
The steps I took (and the mistake I made )
Code: Select all
pi@RPi3:~/domoticz/plugins $ git clone https://github.com/addiejanssen/domoticz-solaredge-modbustcp-plugin.git
Cloning into 'domoticz-solaredge-modbustcp-plugin'...
remote: Enumerating objects: 34, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 34 (delta 12), reused 26 (delta 8), pack-reused 0
Unpacking objects: 100% (34/34), done.
pi@RPi3:~/domoticz/plugins $ sudo systemctl restart domoticz
pi@RPi3:~/domoticz/plugins $ sudo pip3 install solaredge_modbus
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting solaredge_modbus
Downloading https://files.pythonhosted.org/packages/9c/32/e55ff68a75f940b568c0195ab346b22bf94f7820e8554bb825c3c4c447e2/solaredge_modbus-0.6.0-py3-none-any.whl
Collecting pymodbus>=2.3.0 (from solaredge_modbus)
Downloading https://files.pythonhosted.org/packages/78/21/6c57bfb2b3fca465606a8115e7993bcb008c0714592a55b4ec9e903f8371/pymodbus-2.4.0-py2.py3-none-any.whl (141kB)
100% |████████████████████████████████| 143kB 1.1MB/s
Requirement already satisfied: pyserial>=3.4 in /usr/lib/python3/dist-packages (from pymodbus>=2.3.0->solaredge_modbus) (3.4)
Collecting six>=1.15.0 (from pymodbus>=2.3.0->solaredge_modbus)
Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Installing collected packages: six, pymodbus, solaredge-modbus
Found existing installation: six 1.12.0
Not uninstalling six at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'six'. No files were found to uninstall.
Successfully installed pymodbus-2.4.0 six-1.15.0 solaredge-modbus-0.6.0
pi@RPi3:~/domoticz/plugins $ sudo systemctl restart domoticz
- Spoiler: show
Greetz,
Sjonnie
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
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
-
- Posts: 17
- Joined: Sunday 27 September 2020 16:17
- Target OS: -
- Domoticz version:
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
To be honest: I have no idea...
I have not added anything in the plugin to work with users, so this must be one of the nice hidden features of Domoticz.
If time permits, I will try to replicate it on my setup and investigate.
-
- Posts: 17
- Joined: Sunday 27 September 2020 16:17
- Target OS: -
- Domoticz version:
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
It is not a problem to run it 24/7; the plugin will not write any data to the database unless the value has changed.
So during night, lots of devices will not change value at all.
I have put an item on my to do list for this; it makes sense to skip certain devices when the status of the inverter is not "producing".
Will look into it over the next weeks.
-
- Posts: 17
- Joined: Sunday 27 September 2020 16:17
- Target OS: -
- Domoticz version:
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Nice!McMelloW wrote: ↑Saturday 03 October 2020 12:29 Getting regular the following errors in the log.
What can I do about this?Code: Select all
2020-10-03 11:58:54.790 Error: (SolarEdge) 'onHeartbeat' failed 'KeyError'. 2020-10-03 11:58:54.790 Error: (SolarEdge) ----> Line 522 in '/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py', function onHeartbeat 2020-10-03 11:58:54.790 Error: (SolarEdge) ----> Line 335 in '/home/pi/domoticz/plugins/domoticz-solaredge-modbustcp-plugin/plugin.py', function onHeartbeat
Looks like your inverter is returning a status that is not supported by the solaredge_modbus library that is used by the plugin.
I will update the plugin to catch the error so we can find out what that status is.
Will get back to you when this is in place.
-
- Posts: 17
- Joined: Sunday 27 September 2020 16:17
- Target OS: -
- Domoticz version:
- Contact:
Re: Just a tiny little problem
Sjonnie2017 wrote: ↑Saturday 03 October 2020 17:44 Hi,
I installed the script in a somewhat different way than described on github (I missed one line ). I can add the hardware but the devices don't show up. Any help truly appreciated!
EDIT2: Forgot to mention that the inverter is a SolarEdge SE4000H and is connected to my network by wire. Installed today and as far as I know no alterations.
Greetz,
Sjonnie
Hi Sjonnie,
The plugin is not able to connect with your inverter.
This is probably not an issue with your software.
Did you enable Modbus on your inverter and if so: do the ip address and ports match?
-
- Posts: 17
- Joined: Sunday 27 September 2020 16:17
- Target OS: -
- Domoticz version:
- Contact:
Re: New Python plugin: Domoticz SolarEdge_ModbusTCP
Hi freijn,freijn wrote: ↑Thursday 01 October 2020 21:49 Hi Addie,
Would it also be possible to "fire" the script from a script ?
i.e. I do like "sync" it from my P1 activity.
This to be able to calculate the in house consumption of power.
( yes I know calculating it from an event makes me calculating it 1 sample too late , but I still like this very much )
The plugin is not a script, so I don't know if this is possible.
If you are looking for a script, it might be easier to use the solaredge_modbus library itself.
Have a look at the example that the developer provided in his github repo: https://github.com/nmakel/solaredge_mod ... example.py
Who is online
Users browsing this forum: Droll, Google [Bot] and 0 guests