diff --git a/Other Examples/ProgrammableHub2/ProgrammableHub2.ino b/Other Examples/ProgrammableHub2/ProgrammableHub2.ino index b5d0e37..08ab1eb 100644 --- a/Other Examples/ProgrammableHub2/ProgrammableHub2.ino +++ b/Other Examples/ProgrammableHub2/ProgrammableHub2.ino @@ -304,7 +304,9 @@ void setupWeb(){ response += ""; if(!openSlots) - response += "

Can't add any more Light Accessories. Max="+ String(MAX_LIGHTS) + "

"; + response += "

Can't add any more Light Accessories. Max="+ String(MAX_LIGHTS) + "

"; + + response += "

Press here to update the Home App when finished making changes:

"; response += ""; webServer.send(200, "text/html", response); @@ -316,7 +318,7 @@ void setupWeb(){ int index=atoi(webServer.arg(0).c_str()); String response = "HomeSpan Programmable Light Hub"; - response += "Deleted Light Accessory '" + String(lightData[index].name) + "'..."; + response += "Deleting Light Accessory '" + String(lightData[index].name) + "'..."; deleteAccessory(index); @@ -324,6 +326,21 @@ void setupWeb(){ }); + webServer.on("/update", []() { + + String response = "HomeSpan Programmable Light Hub"; + + if(homeSpan.updateDatabase()) + response += "Accessories Database updated. New configuration number broadcasted..."; + else + response += "Nothing to update - no changes were made..."; + + response += "..."; + + webServer.send(200, "text/html", response); + + }); + webServer.on("/addLight", []() { colorType_t colorType=NO_COLOR;