Python Plugin: GoodWe solar inverter via SEMS API
Moderator: leecollings
-
- Posts: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
One of the data that is seen both in the SEMS portal or through PV Master is the energy that is being taken from the grid (in -) or the energy that is being exported to the grid (in +). I know at all times how much energy I have left over and it is injected into the public network or, on the contrary, how much I lack and I buy from the public network. The investor and SEMS know it through the Meter. Sorry for my English
- waltervl
- Posts: 5721
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
When I look in my SEMS portal I only can see what the solar inverter is sending to my home. And that is logical as the only thing my solar inverter can do is create solar generated power. It does not know if it is consumed in my house or sent to the grid.
But perhaps you post a screenshot of your SEMS portal of what you see. As your request confuses me too
But perhaps you post a screenshot of your SEMS portal of what you see. As your request confuses me too

Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
This is part of the screen of my SEMS Portal
-
- Posts: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
That data is in the inverter because I see it with PV master and SEMS portal. When it consumes from the grid, the arrow goes out towards the house
-
- Posts: 209
- 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
Looks Fancy 
As mentioned, I need the data structure that SEMS API returns, as explained in earlier post (refer to issue 14). Once you provide the info (preferably via PM) I can have a look at it.

As mentioned, I need the data structure that SEMS API returns, as explained in earlier post (refer to issue 14). Once you provide the info (preferably via PM) I can have a look at it.
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: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hello, if you tell me what program I can use to see the data flow going into the inverter and PM Master. The Pv master connects to a Wifi provided by the inverter. I have done tests with Packet Sender and right now it only responds to its native AA55 protocol. A few days ago it answered modBus sequences but I don't know why now it doesn't.
-
- Posts: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
if you tell me what to do i can help
-
- Posts: 209
- 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,
It is kind of in issue 14 on github:
pull the addBattery version of the plug in:
the go to domoticz hardware page, enable debug logging in the GoodWE plugin config and hit 'update'
Now after some time there will appear a file called goodwe.log in /domoticz. Get that file off the RPi (you may have to chown it for acces rights), remove any password/user info and send me the info that is returned in a logline that starts with: response station data request
It is kind of in issue 14 on github:
pull the addBattery version of the plug in:
Code: Select all
cd domoticz/plugins/domoticz-GoodWeSEMS
git checkout addBattery
git pull
Now after some time there will appear a file called goodwe.log in /domoticz. Get that file off the RPi (you may have to chown it for acces rights), remove any password/user info and send me the info that is returned in a logline that starts with: response station data request
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: 16
- Joined: Wednesday 15 June 2022 16:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Hello, before doing that, comment that I have done tests with Packet Sender and I have the frame of bytes that must be sent to the inverter's IP and I have the frame that it returns with positions 45-46 (Watts Import/Export) and position 87 (0=Standby, 1=Exporting, 2=Importing) in case you want me to send you the request and the response from my investor. Although it is hydrido I do not have a battery for now. Cheers
-
- Posts: 36
- Joined: Saturday 17 September 2016 22:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
I have no idea if its relevant or not, but here is my (personal) dump of the API
https://pastebin.com/kV2aKNR7
and some more info: https://github.com/DiedB/Homey-SolarPan ... -521042829
-
- Posts: 209
- 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 Tony,tonymer wrote: ↑Wednesday 22 June 2022 11:12 Hello, before doing that, comment that I have done tests with Packet Sender and I have the frame of bytes that must be sent to the inverter's IP and I have the frame that it returns with positions 45-46 (Watts Import/Export) and position 87 (0=Standby, 1=Exporting, 2=Importing) in case you want me to send you the request and the response from my investor. Although it is hydrido I do not have a battery for now. Cheers
What you are doing does not go via the SEMS web API. My pluging (for which this topic is) accesses the web API (on www.semsportal.com) to fetch the data. You are accessing the inverter directly so I cannot use that info. I need the logging as described earlier (presuming this data is also sent to this cloud server).
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: 12
- Joined: Tuesday 21 February 2017 13:37
- Target OS: Linux
- Domoticz version: 2022.1
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
GoodWe plugin started to crash Domoticz with "Call to function 'onHeartbeat' failed" error message.
domoticz_crash.log has zero size.
occurencies:
Platform: Debian 11 (uname -a: "Linux emc2 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux")
Plugin: domoticz-GoodWeSEMS (https://github.com/JanJaapKo/domoticz-GoodWeSEMS.git)
I've updated the plugin to the latest version with "git pull", restarted domoticz - and got another crash in about an hour.
What can it be? How can this be fixed?
Darsh
domoticz_crash.log has zero size.
occurencies:
- Spoiler: show
- Spoiler: show
Platform: Debian 11 (uname -a: "Linux emc2 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64 GNU/Linux")
Plugin: domoticz-GoodWeSEMS (https://github.com/JanJaapKo/domoticz-GoodWeSEMS.git)
I've updated the plugin to the latest version with "git pull", restarted domoticz - and got another crash in about an hour.
What can it be? How can this be fixed?
Darsh
-
- Posts: 209
- 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
Segmentation faults are quite nasty as they provide very little usefull info..... Normally this means, if I understand correctly, that wha tthe plugin does in Python leads to a problem in de C core of Domoticz. Di dyou update anything before this happened?
I'm running bullseye/debian 11 as well with no issue, however on latest development version though.
Interesting is the fact that it runs ok for an hour and then starts crashing. Could be that has something to do with illegal content returned from Web API but not sure.
Maybe @waltervl has an idea how this could be trouble shooted?
I'm running bullseye/debian 11 as well with no issue, however on latest development version though.
Interesting is the fact that it runs ok for an hour and then starts crashing. Could be that has something to do with illegal content returned from Web API but not sure.
Maybe @waltervl has an idea how this could be trouble shooted?
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: 12
- Joined: Tuesday 21 February 2017 13:37
- Target OS: Linux
- Domoticz version: 2022.1
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
I didn't do or update anything, it just started crashing out of a blue. Here's the full list of crashes at the moment:
What is this "onHeartbeat" function doing? Can it be that GoodWe did a slight change in their web portal that is causing the crash, as the plugin is waiting for something and then gets an unexpected result?
Darsh
- Spoiler: show
What is this "onHeartbeat" function doing? Can it be that GoodWe did a slight change in their web portal that is causing the crash, as the plugin is waiting for something and then gets an unexpected result?
Darsh
-
- Posts: 209
- 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
All right the heartbeat function is a periodic callback from the Domoticz plugin framework (see Developing a Python plugin for more info). I use that to poll the SEMS API. You configure the interval in the plugin (default 5 minutes) so it looks like most attempts are OK as the error seems to occur about max 10 times per day. However, it is annoying. I'll see if I can find some places to add try/catch clauses to handle this more elegantly.
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: 12
- Joined: Tuesday 21 February 2017 13:37
- Target OS: Linux
- Domoticz version: 2022.1
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
At the end it started crashing almost every hour:
UPD: this hasn't fixed the problem: yet another crash an hour ago:
2022-06-27 10:20:25.194 Error: GoodWe GW2500-NS: Call to function 'onHeartbeat' failed, exception details:
Darsh
- Spoiler: show
UPD: this hasn't fixed the problem: yet another crash an hour ago:
2022-06-27 10:20:25.194 Error: GoodWe GW2500-NS: Call to function 'onHeartbeat' failed, exception details:
Darsh
-
- Posts: 209
- 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
Well I cannot reproduce the error. And we would need the full error description, not just the line you're pasting here. I'd give it a try in the domoticz github, because it is a bit out of my league.......
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: 7
- Joined: Saturday 23 July 2022 16:42
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
I'm no coding expert unfortunately to get all 3 phases to readout. Already surprised that i got it all to work, that's all.Hi Jeweettoch,
I'm guessing it ain't all that hard to make, guessing data is there. In both of the plugins.
When i'm comparing it to the UDP readout you'll get about 3 times more data coming trough.
-
- Posts: 34
- Joined: Tuesday 23 February 2016 9:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9700
- Location: NL
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
I see a lot of time outs for the eu server. Are other people also getting this? I have this now for a couple of days.
- waltervl
- Posts: 5721
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Python Plugin: GoodWe solar inverter via SEMS API
Yes, I have the same, a lot of timeouts. This weekend I downscaled the refresh rate from 5 to 10 minutes. It seems less now. Today only 1x.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest