brown-SSW / brown-solar-charger

This program monitors a solar power system and runs a physical and online dashboard.
https://brown-ssw.github.io/brown-solar-charger/
4 stars 1 forks source link

better wifi connection error handling #2

Closed joshua-8 closed 3 years ago

joshua-8 commented 3 years ago

Currently, the esp32 waits until it is connected to a wifi network before continuing to start, doing a full reboot if there's no connection after 10 seconds. That's fine for testing, but isn't a particularly good solution since not having a wifi network available could make the station completely non functional (a power outage shouldn't shut down a solar station!)

Test restarting just the wifi connection (calling Wifi.begin() again?) instead of a hard restart.

This does mean that every other piece of code that expects to have internet connection needs to be able to handle not actually having a connection. Make more issues as needed.

In general, since the esp32 may be responsible for keeping some parts of the station active (turning the inverter on and off, solar tracking) we should always try to keep the code running even if some components have issues.

joshua-8 commented 3 years ago

done, will be in upcoming pull request