Page 8 of 13
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 06 September 2021 22:59
by Brutus
JanJaap wrote: ↑Monday 06 September 2021 22:44
Right, so the W(att) is not something the plugin does but that comes from how Domoticz deals with these devices, so can't help you there (and I try to avoid lua because python is much nicer). This topic is about the plugin, not about anything you can do with the data in domoticz.
I'll have a look at the updates later, although they look OK on my RPi.
The updates are going right now after installing the latest update..
I resolved the W issue with this line of code in my LUA:
Code: Select all
local PowerGeneration = ""..PowerGeneration1..""
PowerGeneration = PowerGeneration:sub(1, #PowerGeneration-1)
Thnx!
Greetings
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 07 September 2021 10:06
by vinjon
it's working again for both inverters.
Thanx!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Thursday 09 September 2021 21:06
by JanJaap
Hi,
Well on my RPi 3 I do not have the issue with the update time, it behaves as expected:
1 minute setting (at 20:28):
5 minute setting (at 20:32);

- log 1 and 5 minutes
- log 1 5 minute.PNG (39.82 KiB) Viewed 3060 times
The code just counts down how often onHeartbeat is called. It could be that the heartbeat routine is called too often? I do not influence that from the plugin (although it is/should be possible to do so but in other plugins I found that that mechanism doesn't work).
Do you have other plugins where you can try this on?
In the meantime I also made some smaller updates to the plugin on error handling.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 13 September 2021 10:27
by plenkske
I have updated the plugin using "git pull", but I cant get it to work.
Getting the following error:
Code: Select all
2021-09-13 10:23:05.775 Error: Python Plugin System: (GoodWeSEMS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Module Import failed, exception: 'ModuleNotFoundError'
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Module Import failed: ' Name: requests'
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Error Line details not available.
What I tried:
- checked the pyhton paths and they are there
- updated the urllib3 package like suggested in this thread
- restarted domoticz service
- with and without station ID
Nothing resulted in a change of the error message. Still getting the same.
Someone knows what I can try ?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 13 September 2021 11:08
by waltervl
plenkske wrote: ↑Monday 13 September 2021 10:27
I have updated the plugin using "git pull", but I cant get it to work.
Getting the following error:
Code: Select all
2021-09-13 10:23:05.775 Error: Python Plugin System: (GoodWeSEMS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Module Import failed, exception: 'ModuleNotFoundError'
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Module Import failed: ' Name: requests'
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Error Line details not available.
What I tried:
- checked the pyhton paths and they are there
- updated the urllib3 package like suggested in this thread
- restarted domoticz service
- with and without station ID
Nothing resulted in a change of the error message. Still getting the same.
Someone knows what I can try ?
You should now also have the python module requests installed.
Should be done with
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 13 September 2021 11:18
by waltervl
waltervl wrote: ↑Thursday 26 August 2021 16:24
Brutus wrote: ↑Thursday 26 August 2021 13:56
The timings of the refresh interval are not working the way it needs to be.
When setting the refresh interval to 10 seconds the script pulls every second...
When setting the refresh interval to 30 seconds the script pulls the first time after 30 seconds after that it puls every second...
When setting the refresh interval to 1 minute the script pulls every 10 seconds.
When setting the refresh interval to 5 minutes the script pulls the first time after 5 minutes after that it pulls every 10 seconds...
Greetings
I can confirm, did not notice it yet, was happy that it worked again at last.
For me it is fixed with the latest version update. Now working on normal interval (1 min in my case).
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 13 September 2021 11:27
by plenkske
waltervl wrote: ↑Monday 13 September 2021 11:08
plenkske wrote: ↑Monday 13 September 2021 10:27
I have updated the plugin using "git pull", but I cant get it to work.
Getting the following error:
Code: Select all
2021-09-13 10:23:05.775 Error: Python Plugin System: (GoodWeSEMS) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Module Import failed, exception: 'ModuleNotFoundError'
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Module Import failed: ' Name: requests'
2021-09-13 10:23:05.775 Error: Python Plugin System: (Zonnepanelen) Error Line details not available.
What I tried:
- checked the pyhton paths and they are there
- updated the urllib3 package like suggested in this thread
- restarted domoticz service
- with and without station ID
Nothing resulted in a change of the error message. Still getting the same.
Someone knows what I can try ?
You should now also have the python module requests installed.
Should be done with
Haha, makes sense. I forgot to check that "requests" module... must be the monday morning
It works now ! Thanks.
And just an FYI: without station ID I get this error message:
2021-09-13 11:23:48.927 Error: Python Plugin System: (Zonnepanelen) No Power Station ID provided, exiting
So thats very clear.
And for me the interval works fine too.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 8:52
by bldewit
In my case, a new device is created, Inverter Input Test Power. I see data being collected in this new device. My old devices Inveerter Input Power and Inverter Output Power however, where all of my previous data is stored of course, are not being updated anymore.
Anyone recognize this?
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 9:10
by JanJaap
In my case, all devices work fine (provided the sun shines

).
I need some more info:
- do you see errors in the logging?
- how many input strings?
- which exact devices are not being updated?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 9:36
by bldewit
I now see that i do have errormessages:
2021-09-15 08:52:15.127 Error: (Goodwe direct) RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)
2021-09-15 08:52:26.334 Error: (Goodwe direct) RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)
2021-09-15 08:52:44.525 Error: (Goodwe direct) RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)
2021-09-15 08:53:09.292 Error: Goodwe direct hardware (14) thread seems to have ended unexpectedly
2021-09-15 08:53:11.540 Error: (Goodwe direct) Failed to request data: Failed to call GoodWe API (too many retries)
Powerstation ID is provided in settings...
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 9:41
by bldewit
bldewit wrote:I now see that i do have errormessages:
2021-09-15 08:52:15.127 Error: (Goodwe direct) RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)
2021-09-15 08:52:26.334 Error: (Goodwe direct) RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)
2021-09-15 08:52:44.525 Error: (Goodwe direct) RequestException: HTTPSConnectionPool(host='eu.semsportal.com', port=443): Read timed out. (read timeout=10)
2021-09-15 08:53:09.292 Error: Goodwe direct hardware (14) thread seems to have ended unexpectedly
2021-09-15 08:53:11.540 Error: (Goodwe direct) Failed to request data: Failed to call GoodWe API (too many retries)
Powerstation ID is provided in settings...
Verstuurd vanaf mijn SM-T590 met Tapatalk
Hold on, seems like i am starting to get data. Still don't understand the "test" device though... that was getting data sooner!
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 9:49
by bldewit
Actual power is the same for "Test" and "1"- device, daily power however is not....
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 9:51
by bldewit
Sorry, forgot the screenprint...
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 12:12
by JanJaap
OK, so some remarks here:
- the time-out errors are not really a problem. The data is fetched during the next pol, error can be ignored.
- the input devices only provide the power (in Watt), not the generated energy (in kWh). This information is not provided by SEMS
- the test device is a test for me to calculate the generated energy in kWh by multiplying the power by the elapsed time, so that I can resolve the previous point. However the multiplication is not correct (yet). It needs to take into account the missed polls, for example and then still it will be an estimate since the actual power is not averaged over the polled time. SEMS by default only updates the values once per 5 minutes, so a lot of clouds could be passing by in that time.
So all in all, your plugin works as how I expect it to work

Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 12:15
by bldewit
Errormessages seem to have stopped.
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 15 September 2021 12:18
by bldewit
JanJaap wrote:OK, so some remarks here:
- the time-out errors are not really a problem. The data is fetched during the next pol, error can be ignored.
- the input devices only provide the power (in Watt), not the generated energy (in kWh). This information is not provided by SEMS
- the test device is a test for me to calculate the generated energy in kWh by multiplying the power by the elapsed time, so that I can resolve the previous point. However the multiplication is not correct (yet). It needs to take into account the missed polls, for example and then still it will be an estimate since the actual power is not averaged over the polled time. SEMS by default only updates the values once per 5 minutes, so a lot of clouds could be passing by in that time.
So all in all, your plugin works as how I expect it to work

Thank god (and you)
Verstuurd vanaf mijn SM-T590 met Tapatalk
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Saturday 25 September 2021 11:50
by JanJaap
Dear all,
I just published version 2.0.7 of the plugin. It has the following improvements:
- The input strings now give an estimate of the generated energy in Wh (iso only logging the generated power in W)
- Reduced time out on the API calls to 5 seconds to avoid blocking the plugin framework, which leads to other plugins reporting "hardware thread seems to have ended unexpectedly"
Have fun

Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 02 January 2022 20:59
by Merlin1201
Is this plugin stil working?
pi@raspberrypi:~/domoticz/plugins $ git clone
[email protected]:janjaapko/domoticz-GoodWeSEMS.git
Cloning into 'domoticz-GoodWeSEMS'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 02 January 2022 21:20
by JanJaap
yes it does, I just think I typed something wrong at the clone command, let me check it
edit
I'm guessing you need a Git account to clone via SSH (the instructions work for me), so I added the instruction to do it with HTTP, needs no account
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 02 January 2022 22:10
by Merlin1201
Yes that works.
strange thing is that Domoticz is crashing after installing that plugin, it's the 2e time today I try installing this plugin and my web interface is gone.
after deleting the plugin manual system is online..