core
core copied to clipboard
adding goodwe to homeassistant breaks SEMS portal
The problem
hi, once i add the goodwe inverter do the homeassistant it breaks the SEMS portal, it stops updating SEMS portal, i tried to update interval in only 2 minutes but even like this it breaks, as soon as i add the homeassistant integration SEMS stop working. any workaround or im the only one facing this problem?
What version of Home Assistant Core has the issue?
2023.10.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Goodwe
Link to integration documentation on our website
No response
Diagnostics information
if i remove Goodwe integration, SEMS start working.
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @mletenay, @starkillerog, mind taking a look at this issue as it has been labeled with an integration (goodwe
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of goodwe
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign goodwe
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
goodwe documentation goodwe source (message by IssueLinks)
INVERTER: GW15K-ET
Facing the same issue, tried different polling intervals from 30 seconds to 5 minutes.
The green COM LED on the inverter blinks, signaling "Server error".
Only disabling the home assistant updates and restarting the inverter (or it's WiFi module) restores connectivity with the SEMS portal.
Same here.
yup, confirming the issue, inverter is offline in SEMS portal after last HA update
EDIT:
I tried changing the default DNS and the inverter returned online again. This can be done from either the app, connected to the inverter ap or the web interface via the inverter ip address. hope it helps someone
same here.
I installed a GoodWe 3600-SBP-20 inverter some days ago.
I added the goodwe integration this evening at around 19:12 immediately stopped all communication to the SEMS portal.
Disabling the integration an restarting the inverter did fix the SEMS connection (but of corse no data in homeassistant.
yup, confirming the issue, inverter is offline in SEMS portal after last HA update
EDIT:
I tried changing the default DNS and the inverter returned online again. This can be done from either the app, connected to the inverter ap or the web interface via the inverter ip address. hope it helps someone
Didn't work for me, portal is still not receiving data while integration to HA is enabled.
yup, confirming the issue, inverter is offline in SEMS portal after last HA update
EDIT:
I tried changing the default DNS and the inverter returned online again. This can be done from either the app, connected to the inverter ap or the web interface via the inverter ip address. hope it helps someone
Where did you change the default DNS? What did you change it to?
yup, confirming the issue, inverter is offline in SEMS portal after last HA update
EDIT:
I tried changing the default DNS and the inverter returned online again. This can be done from either the app, connected to the inverter ap or the web interface via the inverter ip address. hope it helps someone
Where did you change the default DNS? What did you change it to?
In the web ui, changed it to 8.8.4.4.
Where did you change the default DNS? What did you change it to?
find the ip address, open it in a web browser, click on advanced, I set up a static ip address and changed the DNS server (as lordjson said previously, you can use 8.8.4.4 or 8.8.8.8
Where did you change the default DNS? What did you change it to?
find the ip address, open it in a web browser, click on advanced, I set up a static ip address and changed the DNS server (as lordjson said previously, you can use 8.8.4.4 or 8.8.8.8
That's what I did but didn't work.
try your router address
Thanks for the explanation. Unfortunately it didn't work. So far the only work around is to reduce the polling frequency of HA to 10 minutes or more. Better than nothing. Sadly, such low frequency does not allow for any interesting active control automations.
I'm sure you did it, did you restart inverter wifi module and integration? Just checking
Yes, both restarted, even restarted home assistant for good measure.
It seems like the WiFi module is not programmed to receive Modbus UDP packets while sending to the SEMS portal. With increased poll frequency, the higher the likelihood of sending a request while the sending process is ongoing, corrupting or interrupting the inverter's response.
I have started debugging the goodwe
python package that is used by this extension. On some cases Modbus read requests are ignored completely (and timeout) or, more interestingly, an invalid response (100s of bytes instead of the 19 expected) is returned. As if a read request ends up intercepting the packet that the inverter had prepared for the SEMS portal.
try your router address
Doesn't work either. Everything was restarted.
No change after upgrading HA to 2023.10.5.
The connection from the inverter to the SEMS portal immediately terminates after activating the Goodwe integration.
This does not happen when using the command line tool https://pypi.org/project/goodwe/
HA integration is using that goodwe library. Does the command line works (does not break SEMS) even when executed in those regular intervals ?
HA integration is using that goodwe library. Does the command line works (does not break SEMS) even when executed in those regular intervals ?
well, this was a very good hint and may point us to the root cause of problem!
I first just played around with the example code:
import asyncio
import goodwe
async def get_runtime_data():
ip_address = '192.168.1.14'
inverter = await goodwe.connect(ip_address)
runtime_data = await inverter.read_runtime_data()
for sensor in inverter.sensors():
if sensor.id_ in runtime_data:
print(f"{sensor.id_}: \t\t {sensor.name} = {runtime_data[sensor.id_]} {sensor.unit}")
asyncio.run(get_runtime_data())
if you run this python script more even more often, it does not look to cause a probllem.
Then in modified it to automate some more stress, and repeat the get_runtime_data() more often without leaving the process to
repeat = 0
while repeat < int(sys.argv[1]):
asyncio.run(get_runtime_data())
print(f'#{repeat}: {datetime.datetime.now()}')
repeat += 1
time.sleep(int(sys.argv[2]))
A rerun of the script with repeat number of 100 and a sleep time of 3 seconds the script crashed with following exception:
meter_apparent_power_total: Meter Apparent Power Total = -801 VA
meter_type: Meter Type = 2
meter_sw_version: Meter Software Version = 5
#64: 2023-10-24 12:29:50.103678
Traceback (most recent call last):
File "/home/peter/nextcloud/dev/GoodWe/Modbustest/modbustest.py", line 20, in <module>
asyncio.run(get_runtime_data())
File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/peter/nextcloud/dev/GoodWe/Modbustest/modbustest.py", line 11, in get_runtime_data
inverter = await goodwe.connect(ip_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peter/bin/python3p/lib/python3.11/site-packages/goodwe/__init__.py", line 52, in connect
return await discover(host, timeout, retries)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/peter/bin/python3p/lib/python3.11/site-packages/goodwe/__init__.py", line 106, in discover
raise InverterError(
goodwe.exceptions.InverterError: Unable to connect to the inverter at host=192.168.221.222, or your inverter is not supported yet.
Failures=[MaxRetriesException(), RequestFailedException('No valid response received even after 3 retries', 1), RequestFailedException('No valid response received even after 3 retries', 1), RequestFailedException('No valid response received even after 3 retries', 1)]
The exception is the same when I restart the inverter using the web-interface. Maybe it indicates a crash of the controler of the inverter?
But after this error I need to restart the inverter manually (via web-interface) in order to get it back to SEMS. But today I have the problem, that the SoC Curve keeps "0" even the right value is signaled in the Battery Symbol.
Hours later the inverter updates SEMS with statistics data and the SoC Line is showing the right results. Very strange
Yes, it seems that "too frequent" requests to inverter cause it to fail and probably disconnect from network. The major issue is that this behavior is not that common, most of the inverters seem to behave properly and do not fail. And so far nobody was able to identify if it is inverter or firmware or local network specific issue.
well, "too frequent" updates. But what is too frequent? 1 minute?
In the integration documentation I already found this hint, disabled the automatical update and implemented the sugested automation triggering the update of the goodwe entities every 1 minute.
It does not last 10 minutes until the com-LED of the inverter starts blinking which indicates that the connection to sems is lost.
Network issues are very unlikely, the inverter is located with a distance of less than one meter to the WLAN router, the signal qualitiy is very good.
I was able to sniff the network traffic of the inverter.
we can see that the inverter is re-establishing the network connection. (DhCP-Calls to the router) and after that re-connecting to tcp.goodwe-power.com.
I have the same issue with the following goodwe devices:
- GW15K-ET
- GW5K-DT
even if I reduce the poll rate to 2 Minutes the connection breaks within about 20 minutes.
At the moment I have the impression, that as soon a regular SEMS-Communication sequence is mixed/interrupted by a modbus-udp call the trouble starts. As soon as you stop the modbus-udp calls for 5 minutes the inverter is connecting back to the SEMS portal and is uploading statistic data from the timespan it was not connected to the portal. Looks very much as a firmware issue of the inverter.
At the moment I am testing following:
trigger the poll interval via an automation - you can vary the time between polls. another automation running every hour stopping the poll automation for 5 minutes.
I suspect it is firmware specific but have no proof/explanation. The default polling is 30s. There are more than 1100 installations out there and I believe most work just fine. I have 10K-ET inverter and I am running it with 10s polling for 3 years without any problem :-(
I have a GW8K-DT and I am experiencing this problem. I have tried to change the polling interval without success, and if I start poll locally it will not establish a working connection to SEMS until the inverter is restarted even-though I stop the polling.
I suspect that this is a quite common problem but that there are users like me that thinks that it is more important to fetch the data locally in HA, and they never use the SEMS app/portal. But I still think that it would be good if both interfaces works in parallel.
I've got what looks to be the same issue, started only a few days ago. The inverter GW5000 is disconnecting from my WLAN.
If I reset the W/L interface via the panel on the front then it reconnects and starts providing data for a short period of time before it drops off the network again.
I've also tried resetting the WLAN interface via the buttons on the inverter which temporarily fixes it before failing again.
I've found that if I block internet access for the inverter then data resumes flowing through to HA but instead of failing within minutes it continues for up to 2 hours.
I have a backup from 2 months ago so will restore to it and see if it corrects the problem.
Same issue here Goodwe GW8K-ET
I've solved my problem, it appears it wasn't related to this issue although the symptoms were similar.
I have a Ubiquiti Amplifi HD router at the far end of the house with a satellite meshpoint closer to the inverter.
It turned out the setting a setting on the router was enabled to direct all traffic to the main router.
In the morning my inverter would turn on and connect to the wifi via the meshpoint, it was then directed to connect to the router, this would initially be successful however some time later the connection would drop. Possibly this was due to wifi congestion from other devices or neighbours.
Once the wifi connection dropped it wouldn't re-establish unless I used the 'wifi reset' option on the inverter or restarted the whole inverter.
As soon as I disabled the router steering option on my Amplifi HD router and restarted the inverter the issue dissapeared.
I'm unsure if this option was enabled automatically during a firmware update on my router, but it's possible.
Tested it with the lastest FW on GW15K-ET, still the same issue. After some minutes, SEMS connection is lost.
even if I reduce the poll rate to 2 Minutes the connection breaks within about 20 minutes.
At the moment I have the impression, that as soon a regular SEMS-Communication sequence is mixed/interrupted by a modbus-udp call the trouble starts. As soon as you stop the modbus-udp calls for 5 minutes the inverter is connecting back to the SEMS portal and is uploading statistic data from the timespan it was not connected to the portal. Looks very much as a firmware issue of the inverter.
At the moment I am testing following:
trigger the poll interval via an automation - you can vary the time between polls. another automation running every hour stopping the poll automation for 5 minutes.
@Ventusfahrer did this work for you?