Page 1 of 13
Python Plugin: GoodWe solar inverter via SEMS API
Posted: Saturday 10 August 2019 2:36
by dylian
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
.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Saturday 10 August 2019 12:33
by sincze
Thanks for sharing! Let me give it a SPIN
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Saturday 10 August 2019 12:43
by sincze
Works like a charm.
- Goodwe.JPG (46.33 KiB) Viewed 15682 times
And already added to official plugins page! (
https://www.domoticz.com/wiki/Plugins)
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 19 August 2019 17:34
by henkwel
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?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 30 August 2019 10:09
by Wiljums
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(%)
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 30 August 2019 11:23
by Wiljums
Is it possible to send the data to InfluxDB with this plugin?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 30 August 2019 18:58
by sincze
Wiljums wrote: ↑Friday 30 August 2019 11:23
Is it possible to send the data to InfluxDB with this plugin?
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.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 09 September 2019 12:33
by Koploper
Works for me too, thanks!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Thursday 19 September 2019 10:49
by frandevelop
dylian wrote: ↑Saturday 10 August 2019 2:36
goodwe-domoticz-1.png
Hi
Where is this configuration?
In hardware only shows:
Location:
UserName:
Not new devices found and logs show this error:
Error: GoodweAPI: Error getting http user data!
Thanks
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 15 October 2019 21:11
by ricvee
Hi,
I can only select: Goodwe solar inverter via Web API
not the GoodWe inverter (via SEMS portal)
What went wrong?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 18 October 2019 15:23
by JanJaap
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.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 23 October 2019 20:29
by Nodri
ricvee wrote: ↑Tuesday 15 October 2019 21:11
Hi,
I can only select: Goodwe solar inverter via Web API
not the GoodWe inverter (via SEMS portal)
What went wrong?
Same here, also i don't get the watt "tile" so can't see how much we're making.
What am i doing wrong??
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 23 October 2019 21:10
by ricvee
Hi Nodri,
I fixed this by updating python:
sudo apt-get install python3.4 libpython3.4 python3.4-dev
Now it is working fine!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Thursday 31 October 2019 16:39
by Hcroij
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
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 01 November 2019 11:29
by Hcroij
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.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 01 November 2019 11:59
by Hcroij
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
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 03 November 2019 16:40
by JanJaap
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.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 06 November 2019 16:26
by Hcroij
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.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 08 November 2019 10:00
by uermend
hi,
You probably need to upgrade to get the screen listed below. I have it running on the lates beta version V4.11468.
regards
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Saturday 09 November 2019 19:47
by Hcroij
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.