Automatically reconnects to last successful WiFi and Server URL, if available
Utilizing Preferences, detect successful WiFi connection, store to ssid preferences, and recall on reboot.
Same for server URL - storing under preference 'network'.
Note the potential risk, as it sits:
SSID/pw is stored in NVS, unencrypted. This should only be used with that in mind. I suggest something like a mobile hotspot/router that has credentials easily rotated in the event that your device goes missing.
Someone may want to take this and add-on to prevent storage to NVS... so make it a one-time connection again, or incorporate ESP32 encryption, which would require some additional work around keys/initialization.
Automatically reconnects to last successful WiFi and Server URL, if available Utilizing Preferences, detect successful WiFi connection, store to ssid preferences, and recall on reboot.
Same for server URL - storing under preference 'network'.
Note the potential risk, as it sits:
Someone may want to take this and add-on to prevent storage to NVS... so make it a one-time connection again, or incorporate ESP32 encryption, which would require some additional work around keys/initialization.