Page 6 of 13
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 22 June 2021 21:25
by JanJaap
So IK checked out the WiFi option. Turns out you need to have your firmware to a minimum level. Meaning, it can't be backward compatible so that would be a new plugin. Or an option in the current plugin (upside: you keep your historic data) but would complicate the plugin.
At this moment I'm focusing on another plugin so I'm not going to pursue the Wifi for now. Perhaps later.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 27 June 2021 20:16
by whoami
I get for months the following errors in domoticz:
What can I do about this?
2021-06-24 06:18:46.137 Error: (Zonnepanelen) ----> Line 163 in '/usr/local/domoticz/var/plugins/domoticz-GoodWeSEMS-master/plugin.py'
2021-06-26 21:00:53.794 Error: (Zonnepanelen): Async Secure Read Exception: 9, Bad file descriptor
2021-06-26 21:00:53.796 Error: (Zonnepanelen) 'onMessage' failed 'ValueError'.
2021-06-26 21:00:53.796 Error: (Zonnepanelen) ----> Line 353 in '/usr/local/domoticz/var/plugins/domoticz-GoodWeSEMS-master/plugin.py'
2021-06-26 21:00:53.796 Error: (Zonnepanelen) ----> Line 163 in '/usr/local/domoticz/var/plugins/domoticz-GoodWeSEMS-master/plugin.py'
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 02 August 2021 10:35
by JanJaap
Hi,
This error occurs once in a while (I haven't seen it for quite some time though). It looks like the response from the webserver is not formatted correctly. It is nothing to worry about, the values correct themselves in the next update. And I cannot do anything about it as it is a problem on the server side......
Regards Jan-Jaap
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Sunday 15 August 2021 16:34
by Wiljums
Since updating to Domoticz 2021.1 I have the strange issue that some of the device values do not reach InfluxDB, others still do.
Values that do reach InfluxDB: temperature, input 1 and 2 current power, inverter output power (usage)
Values that do not reach InfluxDB: inverter input 1 and 2 voltage, inverter output power (instant)
The domoticz log does say that the values are sent through influxLink.
I tried to delete the hardware and add it again. Also restored the database to before the update. No luck.
Does anyone know how to fix this?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 16 August 2021 10:07
by JanJaap
Hi,
This (normally) not any issue with the plugin, as the plugin writes data into the Domoticz database according to specifications. Apparently something changed between Domoticz and Influx, so I suggest to check the related topics of influx.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 16 August 2021 13:10
by waltervl
Wiljums wrote: ↑Sunday 15 August 2021 16:34
Since updating to Domoticz 2021.1 I have the strange issue that some of the device values do not reach InfluxDB, others still do.
Did you update to stable (build 13191) or to a beta 2021.1 (build > 13191)?
As there are things changing with regards to the Python Plugin framework in beta.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 16 August 2021 13:51
by Wiljums
waltervl wrote: ↑Monday 16 August 2021 13:10
Wiljums wrote: ↑Sunday 15 August 2021 16:34
Since updating to Domoticz 2021.1 I have the strange issue that some of the device values do not reach InfluxDB, others still do.
Did you update to stable (build 13191) or to a beta 2021.1 (build > 13191)?
As there are things changing with regards to the Python Plugin framework in beta.
I'm now on build 13360. But I think because of the issues, I tried the beta channel.
I've added the GoodWe hardware to my second Pi with Domoticz (stable 2021.1). Same result. The specific measures are not stored in InfluxDB.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Monday 16 August 2021 14:08
by waltervl
Wiljums wrote: ↑Monday 16 August 2021 13:51
I've added the GoodWe hardware to my second Pi with Domoticz (stable 2021.1). Same result. The specific measures are not stored in InfluxDB.
Can you try in your second Pi with stable to update one device with Domoticz http API call
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s
If these updates are sent to influxDB then there is something wrong with the plugin or more likely with the Plugin Framework.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 17 August 2021 10:07
by vinjon
Since this morning I got this error
2021-08-17 09:40:53.753 Error: (GoodWe PV) 'onMessage' failed 'KeyError'.
2021-08-17 09:40:53.754 Error: (GoodWe PV) ----> Line 353 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onMessage
2021-08-17 09:40:53.754 Error: (GoodWe PV) ----> Line 149 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onMessage
Installed the plugin on another PI, same result.
Inverter readings in Sems portal app are OK
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 17 August 2021 10:39
by JanJaap
Hi Vinjon,
I'm not seeing these errors here. Do they occur at every attempt to pol the Goodwe server (so every 5 minutes at the default update rate)?
Which server server do you connect to (I'm on 'Europe')?
If the problem persists, can you switch on debug log level and send me the complete logging so I can see what part of the return message is not working as expected?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 17 August 2021 11:06
by vinjon
JanJaap wrote: ↑Tuesday 17 August 2021 10:39
Hi Vinjon,
I'm not seeing these errors here. Do they occur at every attempt to pol the Goodwe server (so every 5 minutes at the default update rate)?
Which server server do you connect to (I'm on 'Europe')?
If the problem persists, can you switch on debug log level and send me the complete logging so I can see what part of the return message is not working as expected?
Error occurs only when I restart domoticz or disable/enable the hardware. Looks like no attempt to connect is made.
Loglevel is already on debug, this is all I get in the error log
I connect to Europe (but global gives the same result)
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Tuesday 17 August 2021 11:09
by JanJaap
OK, that provides some more info. And I can reproduce it. I'll try to fix this.
The plugin works such that it retrieves data on the stations from the web portal if not loaded locally. The API seems to have changed there...
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 18 August 2021 8:49
by SolarShed
vinjon wrote: ↑Tuesday 17 August 2021 11:06
JanJaap wrote: ↑Tuesday 17 August 2021 10:39
Hi Vinjon,
I'm not seeing these errors here. Do they occur at every attempt to pol the Goodwe server (so every 5 minutes at the default update rate)?
Which server server do you connect to (I'm on 'Europe')?
If the problem persists, can you switch on debug log level and send me the complete logging so I can see what part of the return message is not working as expected?
Error occurs only when I restart domoticz or disable/enable the hardware. Looks like no attempt to connect is made.
Loglevel is already on debug, this is all I get in the error log
I connect to Europe (but global gives the same result)
Same issue here, data retrieval from the sems portal stopped on 17-08. Same errors in the log.
2021-08-18 08:43:00.301 Error: Inverter: (Inverter) 'onMessage' failed 'KeyError'.
2021-08-18 08:43:00.301 Error: Inverter: (Inverter) ----> Line 353 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onMessage
2021-08-18 08:43:00.301 Error: Inverter: (Inverter) ----> Line 149 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onMessage
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 18 August 2021 9:02
by waltervl
JanJaap wrote: ↑Tuesday 17 August 2021 11:09
The plugin works such that it retrieves data on the stations from the web portal if not loaded locally. The API seems to have changed there...
I have no errors until now, everything works fine. Although I do not understand what this local loading would mean.
My Sems server is Europe.
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Wednesday 18 August 2021 11:15
by JanJaap
It is an odd situation indeed since I haven't seen an update to the goodwe app on my phone, which would be expected when they change the API.
The local storage remark was incorrect that applies to another plugin I maintain. In this plugin I just go through all API calls at every update, which may be redundant. I'll see if I can improve that later.....
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Thursday 19 August 2021 22:02
by loeknl
I have the same issues since 17-8. From the Domoticz errorlog:
Code: Select all
021-08-19 22:00:14.228 Error: Zonnepanelen: (Zonnepanelen) 'onConnect' failed 'KeyError'.
2021-08-19 22:00:14.228 Error: Zonnepanelen: (Zonnepanelen) ----> Line 304 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onConnect
2021-08-19 22:00:14.228 Error: Zonnepanelen: (Zonnepanelen) ----> Line 176 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onConnect
2021-08-19 22:00:14.228 Error: Zonnepanelen: (Zonnepanelen) ----> Line 158 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function startDeviceUpdate
2021-08-19 22:00:14.228 Error: Zonnepanelen: (Zonnepanelen) ----> Line 146 in '/home/pi/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function stationDataRequest
Any suggestions to solve this?
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Thursday 19 August 2021 22:33
by JanJaap
Yes, working on it. Seems that there is a couiple of things going on:
- I put some requests that are now not valid anymore
- I was querying for a list of stations but that endpoint seems not to work any more (was not used by others)
I'm close to a solution but need a bit more refactoring...
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Thursday 19 August 2021 23:01
by JanJaap
OK, It's working for me now, hope this fixes it for all you guys out there. i will publish a newer, cleaned up version after my holiday, since it is now doing quite some steps redundantly but don't want to break it now that it finally works again
Please pull latest version from
github.com/JanJaapKo/domoticz-GoodWeSEMS
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 20 August 2021 8:41
by vinjon
Got this errors now:
2021-08-20 07:50:15.014 Error: (GoodWe PV) 'onHeartbeat' failed 'TypeError':'string indices must be integers'.
2021-08-20 07:50:15.014 Error: (GoodWe PV) ----> Line 455 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onHeartbeat
2021-08-20 07:50:15.014 Error: (GoodWe PV) ----> Line 393 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function onHeartbeat
2021-08-20 07:50:15.014 Error: (GoodWe PV) ----> Line 132 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/plugin.py', function startDeviceUpdateV2
2021-08-20 07:50:15.014 Error: (GoodWe PV) ----> Line 293 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/GoodWe.py', function createStationV2
2021-08-20 07:50:15.014 Error: (GoodWe PV) ----> Line 209 in '/home/user/domoticz/plugins/domoticz-GoodWeSEMS/GoodWe.py', function __init__
Re: Python Plugin: GoodWe solar inverter via SEMS API
Posted: Friday 20 August 2021 9:54
by JanJaap
ok, did not check in detail but in the newest version you have to supply the station id (as I can't query for that anymore) which I presume you did not do. So I fixed that now by making this an explicit error. Plus I fixed the issue with token being expired (which I forgot last night). Please give it another try.