edit script to react on command
This commit is contained in:
@@ -184,6 +184,15 @@ void loadDataFromWeb() {
|
||||
int sleepTime = jsonContent["device"]["sleepTime"];
|
||||
String hostName = jsonContent["device"]["hostname"];
|
||||
String requestState = jsonContent["state"];
|
||||
String command = jsonContent["command"];
|
||||
|
||||
if (command == "reset"){
|
||||
ESP.reset();
|
||||
} else if (command == "config") {
|
||||
CleanEeprom();
|
||||
EEPROM.commit();
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
if (requestState != "succes") {
|
||||
unsuccessfulRounds++;
|
||||
|
Reference in New Issue
Block a user