Basic HTTP OTA updater implemented
This commit is contained in:
parent
ed2381ec70
commit
6f8ff7b02e
6
TODO.txt
6
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])
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include <Arduino.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESP8266WebServer.h>
|
||||
#include <ESP8266HTTPUpdateServer.h>
|
||||
#include <ESP8266mDNS.h>
|
||||
#include <EEPROM.h>
|
||||
#include <Hash.h>
|
||||
@ -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([](){
|
||||
|
Loading…
Reference in New Issue
Block a user