Python Plugin: GoodWe solar inverter via SEMS API
Moderator: leecollings
-
- Posts: 1
- Joined: Saturday 10 August 2019 2:09
- Target OS: Linux
- Domoticz version: 4.11077
- Location: The Netherlands
- Contact:
Python Plugin: GoodWe solar inverter via SEMS API
Seeing as the current default Domoticz implementation does not work anymore I decided to try and develop my own plugin for GoodWe inverters. Following the requests made by their website (http://semsportal.com) and reading trough the API documentation I conjured up the following Python Plugin:
EDIT: As dylian94 does not maintain this plugin anymore please use the maintained copy/fork mention below Check the instructions on that repository
https://github.com/JanJaapKo/domoticz-GoodWeSEMS
.
EDIT: As dylian94 does not maintain this plugin anymore please use the maintained copy/fork mention below Check the instructions on that repository
https://github.com/JanJaapKo/domoticz-GoodWeSEMS
.
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Thanks for sharing! Let me give it a SPIN
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Works like a charm.
https://www.domoticz.com/wiki/Plugins)
And already added to official plugins page! (Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 1
- Joined: Monday 19 August 2019 17:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hi,
Thanks for you work. However I cant seem to it running here on V4.11214.
When trying to add the hardware I get an error saying problem adding hardware. Do you have any idea what might be wrong?
Thanks for you work. However I cant seem to it running here on V4.11214.
When trying to add the hardware I get an error saying problem adding hardware. Do you have any idea what might be wrong?
-
- Posts: 28
- Joined: Sunday 11 February 2018 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hi, does it read the data per string? Ideally I would like to read all the data fields you can export manually through semsportal:
Time
WorkMode
Vpv1(V)
Vpv2(V)
Ipv1(A)
Ipv2(A)
Vac1(V)
Vac2(V)
Vac3(V)
Iac1(A)
Iac2(A)
Iac3(A)
Fac1(Hz)
Fac2(Hz)
Fac3(Hz)
Pac(W)
Temperature(℃)
Daily Generation(kWh)
Total Generation(kWh)
HTotal(Hrs)
RSSI(%)
Time
WorkMode
Vpv1(V)
Vpv2(V)
Ipv1(A)
Ipv2(A)
Vac1(V)
Vac2(V)
Vac3(V)
Iac1(A)
Iac2(A)
Iac3(A)
Fac1(Hz)
Fac2(Hz)
Fac3(Hz)
Pac(W)
Temperature(℃)
Daily Generation(kWh)
Total Generation(kWh)
HTotal(Hrs)
RSSI(%)
-
- Posts: 28
- Joined: Sunday 11 February 2018 21:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Is it possible to send the data to InfluxDB with this plugin?
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
At the moment I guess not, however if the devices are included in Domoticz you could use the influxDB push functionality of domoticz itself to create nice dataflow and (grafana) graphs.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
-
- Posts: 2
- Joined: Sunday 14 October 2018 17:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9700
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Works for me too, thanks!
-
- Posts: 2
- Joined: Friday 28 July 2017 12:48
- Target OS: -
- Domoticz version:
- Contact:
-
- Posts: 24
- Joined: Wednesday 13 May 2015 9:05
- Target OS: Linux
- Domoticz version: latest
- Location: Netherlands
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hi,
I can only select: Goodwe solar inverter via Web API
not the GoodWe inverter (via SEMS portal)
What went wrong?
I can only select: Goodwe solar inverter via Web API
not the GoodWe inverter (via SEMS portal)
What went wrong?
-
- Posts: 191
- Joined: Thursday 12 October 2017 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Dev
- Location: the Netherlands
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hi,
Nice plugin, works great once I worked around a limitation:
password doesn't work for special characters (I had %, &, @ in the pwd). Will see if I can find a fix for that.
Nice plugin, works great once I worked around a limitation:
password doesn't work for special characters (I had %, &, @ in the pwd). Will see if I can find a fix for that.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
-
- Posts: 24
- Joined: Wednesday 13 May 2015 9:05
- Target OS: Linux
- Domoticz version: latest
- Location: Netherlands
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hi Nodri,
I fixed this by updating python:
sudo apt-get install python3.4 libpython3.4 python3.4-dev
Now it is working fine!
I fixed this by updating python:
sudo apt-get install python3.4 libpython3.4 python3.4-dev
Now it is working fine!
-
- Posts: 24
- Joined: Sunday 27 November 2016 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Just implemented it this morning and looks fine, however the log shows errors.
2019-10-31 11:30:04.504 Error: (Zonnepanelen): Async Secure Read Exception: 1, stream truncated
This happens every few minutes anyone an idea where this is coming from?
Regards
Henk
2019-10-31 11:30:04.504 Error: (Zonnepanelen): Async Secure Read Exception: 1, stream truncated
This happens every few minutes anyone an idea where this is coming from?
Regards
Henk
-
- Posts: 24
- Joined: Sunday 27 November 2016 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
After some "Googling" found out it has prob to do with "HTTPS://", maybe this helps to solve the problem.
Added later...
Looks that i have solved the problem.
Reinstalled your plugin and it worked without the error.
So I tried to find out what was the difference with the first time.
I do not know if this is the cause or the solution, but think I need to mention it.
During the hardware install the question comes "Global, Europe, or ....." I installed it the first time with "Global"and ofcourse my credentials.
After saving, it did not work oke, so I went back and changed it "Global"to "Europe" (saved again, and the error occurred.
The second time I installed it, I directly set the hardware to "Europe" and I did not get an error message anymore.
I do not know if the above helps but you never know.
Regards
Henk.
Added later...
Looks that i have solved the problem.
Reinstalled your plugin and it worked without the error.
So I tried to find out what was the difference with the first time.
I do not know if this is the cause or the solution, but think I need to mention it.
During the hardware install the question comes "Global, Europe, or ....." I installed it the first time with "Global"and ofcourse my credentials.
After saving, it did not work oke, so I went back and changed it "Global"to "Europe" (saved again, and the error occurred.
The second time I installed it, I directly set the hardware to "Europe" and I did not get an error message anymore.
I do not know if the above helps but you never know.
Regards
Henk.
Last edited by Hcroij on Friday 01 November 2019 13:29, edited 2 times in total.
-
- Posts: 24
- Joined: Sunday 27 November 2016 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Tried to figure out myself but (ofcourse) could not find the solution.
Although the "Devices" (Apparaten) tab shows the total generation of my panels over the years (12475.100kWh) the representation of it shows only the daily generation.
Hope the pictures explain.
I tried to play around with the line :
Devices[self.baseDeviceIndex + 4].Update(nValue=0, sValue=str(inverter["output_power"]) + ";" + str(inverter["etotal"] * 1000))
In the python script, but (I cleared cache in the browser) this did not work for me.
I did some logging on it and found the following line in the log:
2019-11-01 12:27:47.073 (Totaal gegenereerd Paneel) Updating device from 0:'382W;12475200.0' to have values 0:'392W;12475300.0'.
So looking at this, the update is correct but the "Domotics switch" shows only the first value (382W) and disregarding the second value (12475300)
With regards
Henk
Although the "Devices" (Apparaten) tab shows the total generation of my panels over the years (12475.100kWh) the representation of it shows only the daily generation.
Hope the pictures explain.
I tried to play around with the line :
Devices[self.baseDeviceIndex + 4].Update(nValue=0, sValue=str(inverter["output_power"]) + ";" + str(inverter["etotal"] * 1000))
In the python script, but (I cleared cache in the browser) this did not work for me.
I did some logging on it and found the following line in the log:
2019-11-01 12:27:47.073 (Totaal gegenereerd Paneel) Updating device from 0:'382W;12475200.0' to have values 0:'392W;12475300.0'.
So looking at this, the update is correct but the "Domotics switch" shows only the first value (382W) and disregarding the second value (12475300)
With regards
Henk
- Attachments
-
- totaal switch.JPG (51.66 KiB) Viewed 14511 times
-
- totaal 2.JPG (25.11 KiB) Viewed 14511 times
-
- Posts: 191
- Joined: Thursday 12 October 2017 20:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Dev
- Location: the Netherlands
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hi Henk,
The domoticz plug shows you the actual power (in Watt) not the total. You will see totals when you click the 'log' button. The control will show the sum of the day only indeed. If you want a cumulative, you can export the data in the log section.
I'm working on an update of the plugin, can see if I can fit a total in as well (data does not seem to be reported via the SEMS API so may need to do some adding in the plugin.
The domoticz plug shows you the actual power (in Watt) not the total. You will see totals when you click the 'log' button. The control will show the sum of the day only indeed. If you want a cumulative, you can export the data in the log section.
I'm working on an update of the plugin, can see if I can fit a total in as well (data does not seem to be reported via the SEMS API so may need to do some adding in the plugin.
RPi 3, Domoticz dev version, Aeon ZWave stick (with a whole bunch of slaves), Zigbee using Zigbee2MQTT, Nest thermo, P1 smart meter on RPi Zero
-
- Posts: 24
- Joined: Sunday 27 November 2016 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hallo JanJaap
Would be terriffic if this would work.
My knowledge is not enough to extrat the value from the log.
My max is to fiddel around in a script and change something through trial en error.
So would be great if you could accomplisch this.
Would be terriffic if this would work.
My knowledge is not enough to extrat the value from the log.
My max is to fiddel around in a script and change something through trial en error.
So would be great if you could accomplisch this.
-
- Posts: 5
- Joined: Monday 11 February 2019 11:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10055
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
hi,
You probably need to upgrade to get the screen listed below. I have it running on the lates beta version V4.11468.
regards
You probably need to upgrade to get the screen listed below. I have it running on the lates beta version V4.11468.
regards
-
- Posts: 24
- Joined: Sunday 27 November 2016 16:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Wich screen?
By the way, did an ./updatebeta so I am on version 4.11474.
Even after browser refresh and clearing cache the problem stays.
String has 2 valeus but only representing one.
By the way, did an ./updatebeta so I am on version 4.11474.
Even after browser refresh and clearing cache the problem stays.
String has 2 valeus but only representing one.
Who is online
Users browsing this forum: No registered users and 1 guest