Closed h0bb3 closed 3 months ago
The way to test this is to run in local dev and disable your wifi.... then see what happens in the log...
So the problem in this case was that the open inverter task failed as there was no netowork so the inverter was never started. E.g. as the inverted does not know that it suddenly has a network connection.
The same problem would occur even if the harvest is in progress. It would start failing backing off and then kill the inverter and try to reopen wich would then fail and there would be no inverter connection when the network is restored. We are talking about local network here...
So if we add a local network connection task that periodically checks for network and then checks if there is an inverter and if not try bootstrapping.
Checking for an active network is quite straight forward in a normal environment but basically impossible in a docker container without e.g. pinging some external service.... this would then rather indicate Internet connection than local connection. But maybe this is enough...
Another issue here is that the wifi scanning fails if wifi is disabled...
But the good news is that it seems possible to get the ip address using some dbus network manager magic even from within the container... very linux specific... but nontheless... need to test some more in balena os also... but promising... so far.
This actually seems to be working... need to clean up the code and remove all the not now needed bash stuff for the balena supervisor. Big win!
This should be fixed now, see #156 for comments.
Seems like the harvest transport crashes if there is no internet and this for some reason crashes the whole harvesting process. This should not be the case and this is not cool.