srcfl / srcful-gateway

Sourceful Energy Gateway: Connect your solar inverter or Utility meters to earn tokens.
https://sourceful.energy/
MIT License
5 stars 2 forks source link

eGW regularly loses connection with Huawei inverters.... #49

Closed davmoz closed 12 months ago

davmoz commented 12 months ago

This has been a recurring problem with huawei inverters. They can be read fine the first n hours, then the connection closes for some unknown reason and the eGW enters a backoff behaviour and only tries to connect every 30 seconds (forever)...

image

Continues to read upon reconnecting to the inverter

image

h0bb3 commented 12 months ago

Maybe closing waiting for 1min (or more) and then open? Idk how it is done atm.

davmoz commented 12 months ago

Caught happening: image

davmoz commented 12 months ago

Possible fix in (https://github.com/srcfl/sourceful-gateway/commit/69721fc3b591157771226485478b6a93f39a09e5):

Balena commit: 4ae2ca3432fa0d725fefd270da88ff9b

Summary: Try to not close and open directly, instead wait ~5 minutes and attempt to reopen.

davmoz commented 12 months ago

Possible fix in (69721fc):

Balena commit: 4ae2ca3432fa0d725fefd270da88ff9b

Summary: Try to not close and open directly, instead wait ~5 minutes and attempt to reopen.

You wish... image

davmoz commented 12 months ago

It actually came back up again. I must have caught it during the first backoff. So it seems to be working 🥳

To prevent regular max-backoff occurrence, we should perhaps poll slower every time we end up timing out? Opening issue for that and closing this one.