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

open balena offline devices #32

Closed h0bb3 closed 12 months ago

h0bb3 commented 1 year ago

Eriks device was marked as offline by open balena after a router restart. However, it could connect ok to our backend during this time (ie production data was sent ok).

This is a case that could be tested locally for issues.

davmoz commented 1 year ago

Confirmed, reproduced by doing the following (Assuming Erik's device was connected to ethernet):

1. Power on the GW while connected to ethernet 2. Device comes online on obalena 3. Unplug the ethernet cable and wait ~3 minutes 4. Plug the ethernet cable back in 5. The device will not be shown as online when listed in balena-cli

The same behaviour should be expected when using WiFi too?

EDIT: Nope, just a coincidence. Tried the above again and the GW came back online. Only difference this time was that a different Raspberry Pi 4 was used (with an intact uSD card slot, unlike the previous).

davmoz commented 1 year ago

Tried to reproduce in the same balena fleet as Eriks fleet, without success.

The GWs still successfully re-connects to the backend after replugging the ethernet cable. OS-version is different though? perhaps something going on in the balenaOS 2.115.1+rev3 version ?

image

davmoz commented 1 year ago

Trying the following: image

  1. block from WiFi network
  2. Wait until it is offline on balena
  3. connect to ethernet

Outcome: Did not come online.. Continuing...

  1. Unblock from WiFi network
  2. Unplug and replug power
  3. Device comes back online (WiFi) with ethernet still connected...
h0bb3 commented 1 year ago

Erik made a router reboot 6th August, 15:36 the gw remained online after this.

...

davmoz commented 12 months ago

Erik made a router reboot 6th August, 15:36 the gw remained online after this.

...

good!