From 608057b098ea0b2c0a8d95f08f17999923f8cdfe Mon Sep 17 00:00:00 2001 From: Tobias Blum Date: Sun, 5 Jun 2016 00:09:00 +0200 Subject: [PATCH] Added /reset_wlan REST webservice command. --- Arduino/McLighting/McLighting.ino | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index e7af936..757149d 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -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