summaryrefslogtreecommitdiff
path: root/HouseControl.ino
diff options
context:
space:
mode:
Diffstat (limited to 'HouseControl.ino')
-rw-r--r--HouseControl.ino18
1 files changed, 18 insertions, 0 deletions
diff --git a/HouseControl.ino b/HouseControl.ino
index e8b0841..4a9c700 100644
--- a/HouseControl.ino
+++ b/HouseControl.ino
@@ -331,6 +331,22 @@ void configSetHandler(WebServer &server, WebServer::ConnectionType type, char *u
return;
}
+/*void debugHandler(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete) {
+ server.httpSuccess("text/plain");
+ if (type == WebServer::GET) {
+ sprintf((char*)buf1, "Time Now: %d/%d/%d %02d:%02d:%02d\n\0", day(time), month(time), year(time), hour(time), minute(time), second(time));
+ server.print((char*)buf1);
+ sprintf((char*)buf1, "Last NTP: %d/%d/%d %02d:%02d:%02d\n\nPacket:\n\0", day(lastNTPtime), month(lastNTPtime), year(lastNTPtime), hour(lastNTPtime), minute(lastNTPtime), second(lastNTPtime));
+ server.print((char*)buf1);
+
+ for (int i = 0; i < 48; i++) {
+ sprintf((char*)buf1, "%02X \0", pb[i]);
+ server.print((char*)buf1);
+ }
+ }
+}
+*/
+
/*********************************************************************************/
/* Miscellaneous functions */
@@ -407,6 +423,8 @@ void setup() {
httpServer.addCommand("config/get", &configGetHandler);
httpServer.addCommand("config/set", &configSetHandler);
+// httpServer.addCommand("debug", &debugHandler);
+
httpServer.begin();
setupDoor(&frontDoor, FDOOR_STRIKE, FDOOR_CLOSED, 255);