Add ESP8266HTTPUpdateServer as alternative
This commit is contained in:
parent
9657b04ed9
commit
445e663ca0
2 changed files with 10 additions and 1 deletions
|
@ -42,6 +42,10 @@
|
|||
ESP8266WebServer server(80);
|
||||
WebSocketsServer webSocket = WebSocketsServer(81);
|
||||
|
||||
#ifdef HTTP_OTA
|
||||
#include <ESP8266HTTPUpdateServer.h>
|
||||
ESP8266HTTPUpdateServer httpUpdater;
|
||||
#endif
|
||||
|
||||
// ***************************************************************************
|
||||
// Load libraries / Instanciate WS2812FX library
|
||||
|
@ -571,6 +575,10 @@ void setup() {
|
|||
mode = SET_MODE;
|
||||
getStatusJSON();
|
||||
});
|
||||
|
||||
#ifdef HTTP_OTA
|
||||
httpUpdater.setup(&server,"/update");
|
||||
#endif
|
||||
|
||||
server.begin();
|
||||
|
||||
|
@ -688,4 +696,4 @@ void loop() {
|
|||
EEPROM.commit();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
const char HOSTNAME[] = "McLighting01"; // Friedly hostname
|
||||
|
||||
//#define HTTP_OTA // If defined, enable Added ESP8266HTTPUpdateServer
|
||||
#define ENABLE_OTA // If defined, enable Arduino OTA code.
|
||||
#define ENABLE_MQTT // If defined, enable MQTT client code, see: https://github.com/toblum/McLighting/wiki/MQTT-API
|
||||
#define ENABLE_HOMEASSISTANT // If defined, enable Homeassistant integration, ENABLE_MQTT must be active
|
||||
|
|
Loading…
Reference in a new issue