Page 13 of 13
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 12 December 2023 19:56
by JanJaap
Good news!
when you precede a command with sudo it is execute as admin.
What I normally do is:
cd domoticz
sudo chown pi "goodwe panelen.log" (fill in correct filename, "" needed due to space in filename)
After that you can either access it through notepad++ with FTP or using winscp transfer to windows PC
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 13 December 2023 19:19
by Zeil
Het is zeker goed nieuws!
I can see in Domoticz that it got its data from Sems portal, i guess it's working.
Also thanks for the little course on how to get admin om my Goodwe logfile in Domoticz,
and got it copied to my windows pc. (there is a lot of data in that file..)
Now beside my solarpanel Inverter, and Zigbee2MQTT (with some powermonitoring) data,
My smart home adventure needs only one thing more, and that is putting my
Mitsubitshi Heavy Industries Airco's in Domoticz, but that seems a hell of a job.
got the Mitsubishi Heatpump MQTT interface Plugin installed but cannot pull data from it..
(but this is another topic)
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 07 April 2024 13:13
by evb28
hello folks
I'm trying to setup the plugin to monitor my newly installed GoodWe inverter, but I'm getting the same error message right after posting data into the plugin's configuration:
2024-04-05 14:57:47,288 - INFO - plugin.py - starting plugin version 4.0.1
2024-04-05 14:57:47,288 - INFO - plugin.py - Starting version: 4.0.1
2024-04-05 14:57:47,288 - DEBUG - plugin.py - checking versions: current '4.0.1', config '4.0.1'
2024-04-05 14:57:47,289 - DEBUG - plugin.py - startDeviceUpdate, token availability: 'False'
2024-04-05 14:57:47,289 - DEBUG - GoodWe.py - build tokenRequest with UN: '
[email protected]', pwd: 'xxx'
2024-04-05 14:57:47,289 - DEBUG - GoodWe.py - build apiRequestHeaders with token: '{"client": "web", "version": "v3.1", "language": "en-GB"}'
2024-04-05 14:57:47,290 - ERROR - GoodWe.py - TokenRequestException: Failed to parse: https://www.semsportal.com/api/v2/Common/CrossLogin
The activated debug option doesn't help here since no extra data is available.
Can you please help and push me in the right direction when troubleshooting?
Thanks!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 07 April 2024 14:36
by waltervl
Do you have strange characters in your email or password? As that sometimes get parsed wrongly... (not knowing if this really is the case).
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 07 April 2024 15:36
by JanJaap
This could be the case indeed with special characters in the password. Can you give it a try with only alphanumeric characters in your password?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 07 April 2024 23:33
by evb28
yep, I've just changed the password to letters-and-numbers only (it was the case before, but it's more simplified now) and the error message is the same
2024-04-07 23:32:26,190 - INFO - plugin.py - starting plugin version 4.0.1
2024-04-07 23:32:26,190 - INFO - plugin.py - Starting version: 4.0.1
2024-04-07 23:32:26,207 - ERROR - GoodWe.py - TokenRequestException: Failed to parse:
https://www.semsportal.com/api/v2/Common/CrossLogin
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 08 April 2024 22:42
by JanJaap
Hey,
When looking at the first error you will see that changing the loglevel did indeed create additional loglines marked DEBUG which do help to find out where the exception is created (as this error is created in more than 1 place).
Now I did a couple of tests with entering an incorrect password which contained some special characters like !@%& and this was no issue: it correctly reported that I entered a wrong pwd.
Now I did see some (old.....) remarks on stackoverflow about requests lib and its base urllib3 being incompatible, so need some more info:
- what OS + version are you on?
- which python version? is shown in Domoticz log at startup or in the 'about' screen
- which version of requests?
- which version of urllib3?
I'm running python 3.9.2, requests 2.31.0 and urllib3 1.26.5
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 09 April 2024 9:57
by evb28
JanJaap wrote: ↑Monday 08 April 2024 22:42
Hey,
When looking at the first error you will see that changing the loglevel did indeed create additional loglines marked DEBUG which do help to find out where the exception is created (as this error is created in more than 1 place).
Now I did a couple of tests with entering an incorrect password which contained some special characters like !@%& and this was no issue: it correctly reported that I entered a wrong pwd.
Now I did see some (old.....) remarks on stackoverflow about requests lib and its base urllib3 being incompatible, so need some more info:
- what OS + version are you on?
- which python version? is shown in Domoticz log at startup or in the 'about' screen
- which version of requests?
- which version of urllib3?
I'm running python 3.9.2, requests 2.31.0 and urllib3 1.26.5
Hey, this is my setup
Debian 11.9
python3.9/oldstable,now 3.9.2-1 amd64 [installed,automatic]
python3-requests/oldstable,now 2.25.1+dfsg-2 all [installed,automatic]
python3-urllib3/oldstable,now 1.26.5-1~exp1 all [installed,automatic]
I see that the difference is only in the requests version (2.25.1 vs 2.31.0).
So after upgrading to Debian 12 - the issue has been resolved and the plugin works now.
Thanks for the hint!
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 26 January 2025 17:30
by azonneveld
I noticed that the log file grows very large, about 1 MB per day (in my case: goodwe Goodwe.log).
domo V2024.7
plugin 4.0.1
Raspbian Bookworm (32 bit)
RPI4
What is wrong?
Here's a snippet of the file
Code: Select all
2025-01-26 17:15:15,657 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:15:15,658 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:15:15,659 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:15:15,659 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:16:11,430 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:16:11,431 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:16:11,431 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:16:11,432 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:17:11,868 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:17:11,869 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:17:11,870 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:17:11,870 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:18:10,488 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:18:10,488 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:18:10,488 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:18:10,489 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:19:11,109 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:19:11,110 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:19:11,111 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:19:11,112 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:20:10,793 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:20:10,795 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:20:10,795 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:20:10,796 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:21:11,103 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:21:11,104 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:21:11,105 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:21:11,105 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:22:10,479 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:22:10,480 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:22:10,480 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:22:10,481 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:23:11,192 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:23:11,193 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:23:11,194 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:23:11,194 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:24:10,626 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:24:10,627 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:24:10,627 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:24:10,628 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
2025-01-26 17:25:10,908 - INFO - GoodWe.py - PowerStation created: 'b1193c2f-ad19-419c-bb41-xxxx'
2025-01-26 17:25:10,909 - INFO - plugin.py - creating units for device with serial number: 53000DSNxxxx
2025-01-26 17:25:10,909 - INFO - plugin.py - finished creating devices, current count: 18
2025-01-26 17:25:10,910 - INFO - plugin.py - Status of GoodWe inverter (SN: 53000DSNxxxx): '1 generating'
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 26 January 2025 19:36
by JanJaap
Well nothing changed. But my own file is also immense...... So I just pushed a change to log only 1 line per update as the other 3 didn't make much sense....
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 27 January 2025 15:36
by azonneveld
JanJaap wrote: ↑Sunday 26 January 2025 19:36
So I just pushed a change to log only 1 line per update as the other 3 didn't make much sense....
That already saves 66%, thanks!
Is there a way to disable the logging for 'info' status?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 27 January 2025 19:47
by waltervl
Disable the info logging for an hardware gateway (like a python plugin) is done in the hardware gateway settings. There are 3 setting switches available for showing info, status and/or error logging per gateway.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 27 January 2025 21:57
by JanJaap
Well it aint that simple Walter as I'm using the logging package to write to a dedicated logfile

But I guess I can move that last one to debug too as that is when it makes most sense anyway