core icon indicating copy to clipboard operation
core copied to clipboard

GoodWe loses connection in the early morning

Open LarsMichelsen opened this issue 11 months ago • 37 comments

The problem

I have been using a GW15K-ET for a few weeks now. I have integrated the device via WLAN stick and connected it to my home automation via Homeassistant. The whole thing was quite easy to setup and works quite well most of the time. However, I have observed a rather fundamental problem since the beginning:

Every morning all values disappear from Homeassistant and the device device does not provide any information via WLAN anymore.

First I tried to solve the issue by resetting the WLAN stick, which sometimes seemed to fix the issue after a few minutes, but most of the times it did not help. Completely switching off the inverter and let it restart helped most of the times.

Now I observed that I can recover the situation way better by disabling the integration for a few minutes and enabling it then again. This constantly recovers the situation every day.

Anyone else with similar observations?

To gather more information, I have set up a ping monitoring in Home assistant. Every morning I can observe a pattern like you can see in the screenshot: The device is several times briefly not connected reachable via WLAN to then come shortly after again again. I don't understand yet what triggers this. Anyone have any ideas?

I suspect that something is out of step with these repeated connection attempts. Maybe the connection between the inverter and the WLAN module. I keep researching in this direction.

However, I think the integration should be able to recover any temporary network connection issue. Looking at the logs I recognized there is something like this, but it seems it does not help in my situation.

To get more data from the integration, I enabled the debug logging and see the same pattern every day, like you can see here:

2023-07-11 04:44:11.622 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3
2023-07-11 04:44:11.866 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7035a00020048000a00000001fff4ffc2ffc8ff7d01d6fc54f1faf0baf3e4138a0000000000000000fffffff4ffffffc2ffffffc8ffffff7d00000077000000b6000000a9000001d6ffffff87ffffff40ffffff42fffffe0800020005e6c0
2023-07-11 04:44:21.304 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7
2023-07-11 04:44:21.619 DEBUG (MainThread) [goodwe.protocol] Received: aa55f703fa17070b042a050740000800000000074000000000004e07de00060000000007de00000000000000000202090f0002138affffffff09060002138800000000091100001389ffffffff0001fffffffeffffff8b0000005a0000005c09020003138a000000000006090500031388000000000005090b00021389000000000007fffffffeffffffff00000000000000150000005e0001013f000000fc0000071a038e000000000000000000000004000200050000000000000000263a00000000000024c8000000aa00000000000b00000000162f0006000000000000000000000000000600000000000000000000000000000204004e000300002c001b25
2023-07-11 04:44:21.622 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3
2023-07-11 04:44:21.866 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7035a00020048000a00000001fff3ffc8ffcfff8901d1fbd2f3d0f5f6f6a013890000000000000000fffffff3ffffffc8ffffffcfffffff8900000077000000b0000000a9000001d1ffffff87ffffff4affffff42fffffe1200020005831b
2023-07-11 04:44:31.304 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7
2023-07-11 04:44:32.307 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:32.307 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #1/10
2023-07-11 04:44:33.309 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:33.309 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #2/10
2023-07-11 04:44:34.310 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:34.311 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #3/10
2023-07-11 04:44:35.312 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:35.312 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #4/10
2023-07-11 04:44:36.314 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:36.314 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #5/10
2023-07-11 04:44:37.316 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:37.317 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #6/10
2023-07-11 04:44:38.319 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:38.320 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #7/10
2023-07-11 04:44:39.322 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:39.323 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #8/10
2023-07-11 04:44:40.325 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:40.325 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #9/10
2023-07-11 04:44:41.326 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 04:44:41.326 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #10/10
2023-07-11 04:44:42.520 DEBUG (MainThread) [goodwe.protocol] Max number of retries (10) reached, request f703891c007d7ae7 failed.

It goes then on like this for hours.

But when I disable the integration and enable it again after a few minutes, it recovers. Then the log looks like this:

07:12:30 Disable integration
07:15:08 Enable integration again

2023-07-11 07:12:10.089 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1
2023-07-11 07:12:11.095 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:11.096 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #1/10
2023-07-11 07:12:12.097 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:12.098 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #2/10
2023-07-11 07:12:13.099 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:13.100 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #3/10
2023-07-11 07:12:14.101 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:14.102 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #4/10
2023-07-11 07:12:15.103 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:15.104 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #5/10
2023-07-11 07:12:16.105 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:16.106 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #6/10
2023-07-11 07:12:17.107 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:17.107 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #7/10
2023-07-11 07:12:18.108 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:18.109 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #8/10
2023-07-11 07:12:19.110 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:19.110 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #9/10
2023-07-11 07:12:20.112 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f70388b800213ac1 in time (1s).
2023-07-11 07:12:20.113 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1 - retry #10/10
2023-07-11 07:12:21.115 DEBUG (MainThread) [goodwe.protocol] Max number of retries (10) reached, request f70388b800213ac1 failed.
2023-07-11 07:15:08.911 DEBUG (MainThread) [goodwe] Connecting to ET family inverter at 10.123.123.123.
2023-07-11 07:15:08.911 DEBUG (MainThread) [goodwe.inverter] Creating lock instance for current event loop.
2023-07-11 07:15:08.913 DEBUG (MainThread) [goodwe.protocol] Sending: f70388b800213ac1
2023-07-11 07:15:09.909 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7034200003a980001393031354b4554543233325730313933000000000000000000000000000000540000004700300034003000360032002d30323032302d30342d533031aa36
2023-07-11 07:15:09.910 DEBUG (MainThread) [goodwe] Connected to inverter ^@^@^@^@^@^@^@^@^@^@, S/N:2019KEDT239WG194.
2023-07-11 07:15:09.913 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7
2023-07-11 07:15:10.914 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 07:15:10.915 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #1/10
2023-07-11 07:15:11.122 DEBUG (MainThread) [goodwe.modbus] Response CRC-16 checksum does not match.
2023-07-11 07:15:11.122 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f703fa17070b070f0a0d07002e00000a190d070020000001380f44000d000000000f44000000000000000002020910002a1388000003c00904002b1388000003c8091a002c1386000003d5000100000b5d0000000000e27baffd58d0ac0e7573659aa6510716dc89430e6abc0e1839650948c1141dbffc389015e2f88111bd97b6854d20ad01599643369632023706b0f5d3fc6280ec99dd8442635ebaa857c239ad04c4a219abf8cd11909e0f7f3c9fd5ba04d5e2f84e1a548b71448b9afe093ee79fd7ab32053016be344c105d7b6c0111adec7520c4a61c44d80e3d37034d1a15433b8026c25c8bae67ee27fe9a10234108d634fd725b2bf817469dc3d9504f53544757000004e902450000393031354b45545432333257303139331707030f2f16000000000000000000001707030f2f161ecae672f2c9ec5a4175f401535057577aa71d3d4365e104f52b36651ecaefa57e7aa1bfe27baffd58d0ac0e7573659aa6510716dc89430e6abc0e1839650948c1141dbffc389015e2f88111bd97b6854d20ad01599643369632023706b0f5d3fc6280ec99dd8442635ebaa857c239ad04c4a219abf8cd11909e0f7f3c9fd5ba04d5e2f84e1a548b71448b9afe093ee79fd7ab32053016be344c105d7b6c0111adec7520c4a61c44d80e3d37034d1a15433b8026c25c8bae67ee27fe9a10234108d634fd725b2bf817469dc3d9e23b336a1443a3cc69ef89362514fe410cfb47e024b3e986a530b90a9189d2357203c13d829c44bec18de7457fce209cc3e1a36592e91b19e3c5fcbf42fc65aee8c7fcc889fefbdfbd24c6ddcb652750a1ac41d0354dc4ac03a05e11cf343311c80a4950f5270a88b53a5d32274fcadf57f6f2f1797b36e2806d359b1619df53bdf7374403b775d9a9ff71eeebce5f5bb80cf43f73dce7a31e711b838cf380da9f78fe3e35778f38cc9b8815e3cbacbd64de1298ad92c0768019c76936e4354405b84dce6063e1aa5ecf881b800e947cba45c2833d0f95699ac0bdb49c7396ecb13e837d5dc569db0f3fbced0a1fd04b8c32b9171224d3488b76d1b4ea50092a59f29befe6a48c067a321bc657403730e10e8164926526d9f581a7a00f4db80940b631faf10c7a4b3b24798f3e6792a483a1664d766a3efea08b9a9431b41c037ffe66dedce6e1fe67c9f5744fbb35a30a3346fc5526da7afb8d649e75d41a344fb336053f172833dfac9aabf1a6b0062defc1551ed62abbda58176d28bac903eed76be99ecf248a38e34650cd2a2a07c7772364154ba1e5aac4567f763e944445db2c8cd1e9e92c204e9b2faa638485f11988f4fb40db60b260f86183a54da55b84aede140d801653ff905d182b136a25886d483cdb1327d524951c4356dc7ed943acffc0806da1e47b29007749ab32ef9c7dbf67745270ee1be6c69432
2023-07-11 07:15:11.122 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #2/10
2023-07-11 07:15:11.916 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 07:15:11.917 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #3/10
2023-07-11 07:15:12.125 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f703891c007d7ae7 in time (1s).
2023-07-11 07:15:12.125 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7 - retry #4/10
2023-07-11 07:15:12.546 DEBUG (MainThread) [goodwe.protocol] Received: aa55f703fa17070b070f0b0d3d002e00000a290d3d001e000001380f86000d000000000f86000000000000000002020910002d1386000003c10902002c1385000003c9091a002d1386000003d8000100000b6200000aa20000032100000c2209080004138700000000000f08fd00031385000000000005091400041386000000000023000003e5000003e0000003f70000003800000088000101880000018600001d9e0ecf000000050000000000000000000200010000000000000000264f00000015000024dd000000ab00150000000b0000000016320009000000000000000000000000000600000000000000000000000000000204004e000300000100568d
2023-07-11 07:15:12.549 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3
2023-07-11 07:15:13.376 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 250, expected 90.
2023-07-11 07:15:13.376 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f703fa17070b070f0d0cef002e00000a290cef0020000001350f0d000d000000000f0d000000000000000002020910002d1384000003be0904002c1385000003c4091a002d1385000003d4000100000b5600000a7e000003a200000c2309080004138400000000001408ff0003138400000000000409150004138500000000001f000003db000003d9000003e400000036000000a2000101880000018600001da00ed0000000050000000000000000000200010000000000000000264f00000015000024dd000000ab00150000000b0000000016320009000000000000000000000000000600000000000000000000000000000204004e000300000100f490
2023-07-11 07:15:13.377 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3 - retry #1/10
2023-07-11 07:15:13.551 DEBUG (MainThread) [goodwe.protocol] Failed to receive response to f7038ca0002dbbf3 in time (1s).
2023-07-11 07:15:13.551 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3 - retry #2/10
2023-07-11 07:15:13.795 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 250, expected 90.
2023-07-11 07:15:13.795 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f703fa17070b070f0d0d20002e00000a290d20001f000001390f68000d000000000f68000000000000000002020911002c1386000003c30903002a1386000003cd091b002c1386000003d9000100000b6900000a9d0000031100000bc609090004138600000000001508fd0004138600000000000309150004138600000000001d000003d1000003be000003ca0000003900000093000101880000018600001dac0ed6000000050000000000000000000200010000000000000000264f00000015000024dd000000ab00150000000b0000000016320009000000000000000000000000000600000000000000000000000000000204004e00030000010062a2
2023-07-11 07:15:13.795 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3 - retry #3/10
2023-07-11 07:15:14.051 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7035a0002004a000a000000010399039a03a70adc00bb263e25c6260c260c13860000000000000000000003990000039a000003a700000adc000000110000006300000046000000bb000003ac000003b8000003c000000b250002000531e2
2023-07-11 07:15:14.058 DEBUG (MainThread) [goodwe.protocol] Sending: f703b090000337b0
2023-07-11 07:15:14.225 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 90, expected 6.
2023-07-11 07:15:14.225 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f7035a0002004a000a000000010398039703a50ad500b7263e25c6260c260c138600000000000000000000039800000397000003a500000ad50000000f0000006400000043000000b7000003a9000003b4000003bc00000b1a000200056221
2023-07-11 07:15:14.225 DEBUG (MainThread) [goodwe.protocol] Sending: f703b090000337b0 - retry #1/10
2023-07-11 07:15:14.395 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 90, expected 6.
2023-07-11 07:15:14.396 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f7035a0002004a000a0000000103920391039f0ac400ca263e25c6260c260c1386000000000000000000000392000003910000039f00000ac4000000140000006b0000004a000000ca000003a4000003b0000003b600000b0b00020005a7a6
2023-07-11 07:15:14.396 DEBUG (MainThread) [goodwe.protocol] Sending: f703b090000337b0 - retry #2/10
2023-07-11 07:15:14.567 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 90, expected 6.
2023-07-11 07:15:14.567 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f7035a0002004a000a0000000103980394039c0aca00c7263e25c6260c260c1386000000000000000000000398000003940000039c00000aca000000130000006a00000049000000c7000003a9000003b3000003b400000b12000200053b07
2023-07-11 07:15:14.567 DEBUG (MainThread) [goodwe.protocol] Sending: f703b090000337b0 - retry #3/10
2023-07-11 07:15:14.652 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7030617070b070f0e8fe7
2023-07-11 07:15:14.654 DEBUG (MainThread) [goodwe.protocol] Sending: f703b996000155ec
2023-07-11 07:15:14.692 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 6, expected 2.
2023-07-11 07:15:14.692 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f7030617070b070f0f4e27
2023-07-11 07:15:14.692 DEBUG (MainThread) [goodwe.protocol] Sending: f703b996000155ec - retry #1/10
2023-07-11 07:15:14.733 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 6, expected 2.
2023-07-11 07:15:14.734 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f7030617070b070f0f4e27
2023-07-11 07:15:14.734 DEBUG (MainThread) [goodwe.protocol] Sending: f703b996000155ec - retry #2/10
2023-07-11 07:15:14.770 DEBUG (MainThread) [goodwe.modbus] Response has unexpected length: 6, expected 2.
2023-07-11 07:15:14.770 DEBUG (MainThread) [goodwe.protocol] Received invalid response: aa55f7030617070b070f0f4e27
2023-07-11 07:15:14.771 DEBUG (MainThread) [goodwe.protocol] Sending: f703b996000155ec - retry #3/10
2023-07-11 07:15:14.813 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7030200007051
2023-07-11 07:15:14.815 DEBUG (MainThread) [goodwe.protocol] Sending: f703b798000136c7
2023-07-11 07:15:14.842 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7030200007051
2023-07-11 07:15:14.844 DEBUG (MainThread) [goodwe.protocol] Sending: f703b12c00017669
2023-07-11 07:15:14.879 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7030200007051
2023-07-11 07:15:24.447 DEBUG (MainThread) [goodwe.protocol] Sending: f703891c007d7ae7
2023-07-11 07:15:24.834 DEBUG (MainThread) [goodwe.protocol] Received: aa55f703fa17070b070f180d29002e00000a3c0d29001f0000015a0f2d000d000000000f2d000000000000000002020914002c1384000003c90904002a1389000003cd0918002a1385000003d8000100000b6e00000af4000002a400000b98090c0004138400000000001308ff0003138900000000000009120004138500000000001d000003d3000003b4000003c30000003700000043000101880000018600001d8e0ec7000000050000000000000000000200010000000000000000264f00000015000024dd000000ab00150000000b0000000016320009000000000000000000000000000600000000000000000000000000000204004e0003000001009416
2023-07-11 07:15:24.838 DEBUG (MainThread) [goodwe.protocol] Sending: f7038ca0002dbbf3
2023-07-11 07:15:25.090 DEBUG (MainThread) [goodwe.protocol] Received: aa55f7035a0002004a000a0000000103b8039b03a50af900db265225d02620261613860000000000000000000003b80000039b000003a500000af900000019000000730000004f000000db000003ca000003bb000003bd00000b4300020005d908

Another interesting observation: If I switch off the strings at the hardware switch of the inverter in the evening, this does not happen. As if the WR tries to do something at the first light. As long as the light is not sufficient, the attempt is aborted.

Do you think it might be worth to build a slow down in the recovery logic into the integration? Something like: After 10 tries failed, wait for X minutes to reconnect.

What version of Home Assistant Core has the issue?

2023.7.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

goodwe

Link to integration documentation on our website

https://www.home-assistant.io/integrations/goodwe/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

LarsMichelsen avatar Jul 14 '23 07:07 LarsMichelsen

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)

home-assistant[bot] avatar Jul 14 '23 07:07 home-assistant[bot]

The trouble is that there is nothing to "reconnect". The inverter communicates via UDP so there is no session to reconnect and every request is independent communication.

mletenay avatar Jul 14 '23 07:07 mletenay

Thanks for your fast response :1st_place_medal:

Understood. From the HA integration perspective we use UDP, and do continuous polling with the WLAN module of the inverter. However, to me it seems there is an internal state somewhere, which might be between the inverter and the WLAN module, because it helps to stop polling for some time and retry after a few minutes.

LarsMichelsen avatar Jul 14 '23 07:07 LarsMichelsen

Just wanted to let you know that I found a workaround for me in the meantime.

I added https://github.com/frenck/spook to my HA instance and now use this automation to automatically detect and recover the situation by restarting the integration. I still have a short downtime in the early morning, but that is not a big issue to me.

alias: Goodwe-Integration morgens neu starten
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.work_mode
    to: unavailable
    for:
      hours: 0
      minutes: 10
      seconds: 0
condition: []
action:
  - service: homeassistant.disable_config_entry
    data:
      config_entry_id: 63875102994a72b35fab7bd54bc24d52
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - service: homeassistant.enable_config_entry
    data:
      config_entry_id: 63875102994a72b35fab7bd54bc24d52
mode: single

If it's not only me, it might still be worth fixing this issue. But until someone else complains, we could also leave it as is.

LarsMichelsen avatar Jul 20 '23 18:07 LarsMichelsen

I do confirm, that I have the same exact issue @LarsMichelsen .

danriedl avatar Aug 04 '23 09:08 danriedl

+1 got same issue, created an automation for it which force reconnects it to my WiFi AP and then reload the integration.

Onandon11 avatar Aug 04 '23 10:08 Onandon11

I had the same issue as well. Each morning home assistant could not connect to my GoodWe inverter. However the issue wasn't caused by the integration but it was network related. My Unifi AP's were optimizing channels at 3 AM and BSS transition was enabled. Turning those options off (for the SSID the inverter used) fixed the issue.

XanderF avatar Aug 08 '23 07:08 XanderF

I had the same issue as well. Each morning home assistant could not connect to my GoodWe inverter. However the issue wasn't caused by the integration but it was network related. My Unifi AP's were optimizing channels at 3 AM and BSS transition was enabled. Turning those options off (for the SSID the inverter used) fixed the issue.

I’m also using Unifi AP’s, but I disabled channel optimization because I tweaked it manually. What I’m trying to say; is the BSS option guilty of the inverter connection then?

Onandon11 avatar Aug 08 '23 07:08 Onandon11

I had the same issue as well. Each morning home assistant could not connect to my GoodWe inverter. However the issue wasn't caused by the integration but it was network related. My Unifi AP's were optimizing channels at 3 AM and BSS transition was enabled. Turning those options off (for the SSID the inverter used) fixed the issue.

I’m also using Unifi AP’s, but I disabled channel optimization because I tweaked it manually. What I’m trying to say; is the BSS option guilty of the inverter connection then?

Yes I think so. Disable BSS for IoT devices that do not change position. Like inverters, temp sensors, etc.

XanderF avatar Aug 08 '23 08:08 XanderF

I had the same issue as well. Each morning home assistant could not connect to my GoodWe inverter. However the issue wasn't caused by the integration but it was network related. My Unifi AP's were optimizing channels at 3 AM and BSS transition was enabled. Turning those options off (for the SSID the inverter used) fixed the issue.

I’m also using Unifi AP’s, but I disabled channel optimization because I tweaked it manually. What I’m trying to say; is the BSS option guilty of the inverter connection then?

Yes I think so. Disable BSS for IoT devices that do not change position. Like inverters, temp sensors, etc.

I tried.. but no success. Still haveing random disconnects, mainly in the morning, but sometimes also couple of times during the day. I’m now looking into the Channel, also because the Inverter itself sends on fixed Channel 6. Don’t know why it should be a problem but I’m just trying…

Onandon11 avatar Aug 15 '23 16:08 Onandon11

Still no success... The image below shows an indication about the during-the-day behavior. Every gap in the line is the automation kicking in because the sensors go to unavailable for more than 10 minutes.

image

I even further decreased the polling frequency maybe that's causing the glitch (although I don't understand how you can "overload" and UDP stream, because the messages just come...)

Onandon11 avatar Aug 17 '23 13:08 Onandon11

Maybe it will help someone else, but I think I found a solution to the problem, or at least a workable solution.

I created a separate SSID for the inverter to connect to and I’m now running for 48 hours straight without any connection problems - also not in the morning.

I’m not sure what the problem is, but maybe it has to do something with the meshing op the AP’s which the inverter doesn’t like.

Onandon11 avatar Aug 20 '23 16:08 Onandon11

Running Unifi with 3 access points and having same connection issues as mentioned here. Created also a seperate ssid (ssid active on 1 and nearest AP) and have it running for one day without issues. Normally looses connection within 30 minutes after starting up.

(I have a goodwe 3600d-ns)

vanputten80 avatar Aug 23 '23 13:08 vanputten80

Interesting, I also have Unifi access points and my Goodwe inverter does not work every morning. Resting the WIFI link resolves the issue. My symptoms are a bit different though: https://github.com/home-assistant/core/issues/96527.

My Unifi APs do not do any nightly optimization and the inverter shuts down overnight anyway. I do notice that is connects-disconnects several times rapidly in the morning.

RobSmyth avatar Aug 30 '23 09:08 RobSmyth

Maybe it will help someone else, but I think I found a solution to the problem, or at least a workable solution.

I created a separate SSID for the inverter to connect to and I’m now running for 48 hours straight without any connection problems - also not in the morning.

I’m not sure what the problem is, but maybe it has to do something with the meshing op the AP’s which the inverter doesn’t like.

@RobSmyth See my previous comment, just make a specific SSID for the Inverter and expose it on a single (closest) AP. Resolved all my issues.

Onandon11 avatar Aug 30 '23 09:08 Onandon11

It's normal (at least for my Goodwe GW5-DT) that the inverter starts/stops in the early morning when it's not getting sufficient power to stay connected all the time (and the red fault triangle turns on and off).

After that there is a period (currently 20-30 min) when the inverters stays on (status=0) but not producing power yet.

I'm reading the values in HA both locally with the Goodwe Inverter interface and from cloud with Goodwe SEMS integration from HACS, both over LAN using Wi-Fi/LAN Kit GA10081-69- 00P.

And I set up a sensor in configuration.yaml to follow the status of the inverter from SEMS:

template: binary_sensor: - name: "Inverter GW5K-DT Status" device_class: "running" unique_id: "sensor.inverter_gw5k_dt.status" state: "{{ 'on' if states.sensor.inverter_gw5k_dt.attributes.status == 1 else 'off' }}" availability: "{{ 'on' if states.sensor.inverter_gw5k_dt.attributes.status >= 0 else 'off' }}" delay_on: "00:02:20" delay_off: "00:02:20"

image

image

lindsand avatar Sep 05 '23 15:09 lindsand

It's normal (at least for my Goodwe GW5-DT) that the inverter starts/stops in the early morning when it's not getting sufficient power to stay connected all the time (and the red fault triangle turns on and off).

After that there is a period (currently 20-30 min) when the inverters stays on (status=0) but not producing power yet.

I'm reading the values in HA both locally with the Goodwe Inverter interface and from cloud with Goodwe SEMS integration from HACS, both over LAN using Wi-Fi/LAN Kit GA10081-69- 00P.

And I set up a sensor in configuration.yaml to follow the status of the inverter from SEMS:

template:

binary_sensor:

  - name: "Inverter GW5K-DT Status"

    device_class: "running"

    unique_id: "sensor.inverter_gw5k_dt.status"

    state: "{{ 'on' if states.sensor.inverter_gw5k_dt.attributes.status == 1 else 'off' }}"

    availability: "{{ 'on' if states.sensor.inverter_gw5k_dt.attributes.status >= 0 else 'off' }}"

    delay_on: "00:02:20"

    delay_off: "00:02:20"

image

image

Yes it is. But I’m referring to a loss of connection which does not get established anymore after the inverter produces power (and the other outages during a day).

Onandon11 avatar Sep 05 '23 15:09 Onandon11

I had the same problem with my old LAN-connection (GA10081-37-00P), sometimes stuck and occasionally I had to power off/on the inverter to get the interface up and running again. But I got rid of that power off/on problem after replacing the dongle with the newer Wi-Fi/LAN Kit GA10081-69- 00P.

I can't comment different WLAN-sticks but they can behave in the same way.

Goodwe dongles.pdf

After that I had to adjust the polling interval, default 10 turned out to be too fast for me to keep both HA core interface and SEMS up and running. Even 30 s and 1 min were too fast, I'm currently using 4 min without problems. And I'm not polling in night-time when inverter status is unavailable, it's just filling the log with retry errors.

https://www.home-assistant.io/integrations/goodwe

image

lindsand avatar Sep 05 '23 16:09 lindsand

I had the same problem with my old LAN-connection (GA10081-37-00P), sometimes stuck and occasionally I had to power off/on the inverter to get the interface up and running again. But I got rid of that power off/on problem after replacing the dongle with the newer Wi-Fi/LAN Kit GA10081-69- 00P.

After that I had to adjust the polling interval, default 10 turned out to be too fast for me to keep both HA core interface and SEMS up and running. Even 30 s and 1 min were too fast, I'm currently using 4 min without problems. And I'm not polling in night-time when inverter status is unavailable, it's just filling the log with retry errors.

Thank you. That has filled in a few gaps. Over the next week I will give this a go and post back.

RobSmyth avatar Sep 07 '23 09:09 RobSmyth

I am having the same issue. Every morning just after the GW25K-ET switches from "Wait Mode" to "Check Mode", it becomes unavailable. I have to reload the integration every day and wait for severeal minutes, so the integration eventually succeeds initializing after some retries. This is very frustrating!

garv3 avatar Dec 05 '23 08:12 garv3

An update since I last posted 3 months ago ... the problem persists. Every morning the GoodWe inverter connects and reconnects several times over a few minutes. About every forth day HA is unable to read all data and my Energy metrics are wrong. It can always be fixed by resetting the WiFi link (Unifi AP), that is - force it to reconnect. Sometimes it fails during the day. I've tried locking it to the one AP and made sure it using the one MAC (it sometimes connects with a 2nd MAC casing the system to report issues).

So a few days ago I finally took @Onandon11 's suggestion and created a VLAN just for the inverter with its own SSID. Inconclusive but it has worked without fault the last few days. Try to let you know how it is going in a week or so.

Be aware that the GoodWe inverter and SmartMeter both always broadcast an 2.4HGz AP giving access to their settings with username 'admin' and no prizes for the password. They both can connect with multiple MAC addresses making IP assignment and/or identification interesting.

RobSmyth avatar Dec 05 '23 09:12 RobSmyth

Great that it seems to work for you now!

For me, I don't think it is a network issue here, because the problem can also always be fixed by just reloading the integration. I can remember I did also fix it by resetting the WiFi module at least once but since then I always did just restart the integration.

Anyways, I might set up a seperate VLAN and SSID for the inverter and lock it to one AP. Maybe later today but I am not sure if this can help. I will report.

garv3 avatar Dec 05 '23 09:12 garv3

Great that it seems to work for you now!

For me, I don't think it is a network issue here, because the problem can also always be fixed by just reloading the integration. I can remember I did also fix it by resetting the WiFi module at least once but since then I always did just restart the integration.

Anyways, I might set up a seperate VLAN and SSID for the inverter and lock it to one AP. Maybe later today but I am not sure if this can help. I will report.

Not sure but I think both work. I just reset the link as it a bit easier for me. I have no idea which component is defective.

Let me know how you go.

RobSmyth avatar Dec 06 '23 05:12 RobSmyth

Today it actually came back to life on its own. Was unavailable for 30 minutes and then became available again. Not sure why. I will observe it for some more days. Maybe the inverterr needs some Level of PV power before it allows to reconnect. 🤷‍♂️

garv3 avatar Dec 06 '23 08:12 garv3

Today it actually came back to life on its own. Was unavailable for 30 minutes and then became available again. Not sure why. I will observe it for some more days. Maybe the inverterr needs some Level of PV power before it allows to reconnect. 🤷‍♂️

Interesting. I've not seen that. If it fails for me, and I do nothing, it only comes back the next morning.

Did that happen very early/late in the day?

RobSmyth avatar Dec 07 '23 10:12 RobSmyth

It happens always in the morning. At night, the inverter is in "Wait Mode" and in the morning it switches to "Check Mode". Shortly after it does always become unavailable. This morning it did not come back online on it's own. I forced it to reconnect to the wifi by resetting the connection on the AP, which did not help. But - as usual - reloading the integration within Home Assistant eventually brought it back to life after several retries.

So these methods did or did not work for me in the past:

  • Reset the WiFi module using the "Reload" button: I am not sure. Did this once but I can't remember if I did reload the integration after doing so.
  • Force a reconnect of the WiFi connection from the AP: Did not help.
  • Reload the integration in Home Assistan: Always fixes the issue after a couple of minutes. The integration tries to reload several times and eventually succeds.

So in my case it seems to be a problem of the integration.

garv3 avatar Dec 07 '23 10:12 garv3

Nice to see people coming together trying to help each other. And by now, at least to me it seems that this is something which could at least be handled better by the integration.

If you haven't recognized it, I'd like to highlight the workaround I posted above https://github.com/home-assistant/core/issues/96527#issuecomment-1644373354. With this approach, I haven't had to do anything manually anymore since July. After a short hick up each morning, which I don't recognize except when I look at the measurements, the device is connected with HA the whole time.

LarsMichelsen avatar Dec 07 '23 19:12 LarsMichelsen

Thanks for pointing this out. I must have missed that. It's not a real solution but probably a workaround for the meantime until we get a fix.

garv3 avatar Dec 08 '23 10:12 garv3

I'm thinking there are 3 issues here. What do people think of this?

HA Goodwe fault finding

RobSmyth avatar Dec 16 '23 23:12 RobSmyth

HI there,

I also have a similar problem, this is my setup:

  • Separate Unifi AP network on 2.4Ghz only (without Internet access)
  • Goodwe 4K-DT (Is working 100%)
  • Goodwe 3600DNS30 (is having trouble)

I have noticed that if I restart my HA during the night, (when the Goodwe has no power) it will come up in the morning without problems.

Does any of you have the same results? Or am I a special case? (again ;-)

PS: I will try restarting the GoodWe integration for some minutes next week.... Regards....

ewaldslms avatar Dec 17 '23 08:12 ewaldslms