diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index 8f3b1a69..b676fc6a 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -141,6 +141,13 @@ void settingsSetup() { ESP.restart(); }); + Embedis::command( F("ERASE.CONFIG"), [](Embedis* e) { + e->response(Embedis::OK); + customReset(CUSTOM_RESET_TERMINAL); + ESP.eraseConfig(); + *((int*) 0) = 0; // see https://github.com/esp8266/Arduino/issues/1494 + }); + #if NOFUSS_SUPPORT Embedis::command( F("NOFUSS"), [](Embedis* e) { e->response(Embedis::OK);