From 6f8ff7b02e46ef992e2468831ba85f08054d5c7f Mon Sep 17 00:00:00 2001 From: cschwinne Date: Wed, 21 Sep 2016 23:23:18 +0200 Subject: [PATCH] Basic HTTP OTA updater implemented --- TODO.txt | 6 ++++-- wled00/wled00.ino | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/TODO.txt b/TODO.txt index 782bf95a..af62682c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -4,12 +4,14 @@ additional color picker field change slider height to relative values improve firefox UI appearance implement all settings setters -implement OTA -implement OTA lock +implement OTA lock / security implement button implement HSB slider option change color submit from get to post, rewrite with args, requires no buffer change color submit from rgb to hex +svg icons in html +(get rid of spiffs, use progmem for html??) BUGS static ip disables mdns +XXX authentification for security relevant areas (/edit, /update (!!!), /list, /down, [/settings, /reset, /cleareeprom]) diff --git a/wled00/wled00.ino b/wled00/wled00.ino index b174c640..dd095232 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -38,6 +39,8 @@ int nopwrled = 1; char HTTP_req[150]; ESP8266WebServer server(80); +ESP8266HTTPUpdateServer httpUpdater; + File fsUploadFile; void down() @@ -703,6 +706,8 @@ void setup() { server.on("/down", HTTP_GET, down); //clear eeprom server.on("/cleareeprom", HTTP_GET, clearEEPROM); + //init ota page + httpUpdater.setup(&server); } //called when the url is not defined here, ajax-in; get-settings server.onNotFound([](){