Added /reset_wlan REST webservice command.

This commit is contained in:
Tobias Blum 2016-06-05 00:09:00 +02:00
parent c1c82222b5
commit 608057b098

View file

@ -217,6 +217,14 @@ void setup() {
ESP.restart();
});
server.on("/reset_wlan", []() {
DBG_OUTPUT_PORT.printf("/reset_wlan:\n");
server.send(200, "text/plain", "Resetting WLAN and restarting..." );
WiFiManager wifiManager;
wifiManager.resetSettings();
ESP.restart();
});
// ***************************************************************************
// Setup: SPIFFS Webserver handler