diff --git a/Arduino/McLighting/McLighting.ino b/Arduino/McLighting/McLighting.ino index e64a9a6..dcd44fd 100644 --- a/Arduino/McLighting/McLighting.ino +++ b/Arduino/McLighting/McLighting.ino @@ -42,6 +42,10 @@ ESP8266WebServer server(80); WebSocketsServer webSocket = WebSocketsServer(81); +#ifdef HTTP_OTA + #include + 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 -} +} diff --git a/Arduino/McLighting/definitions.h b/Arduino/McLighting/definitions.h index f9c1a54..e65dd62 100644 --- a/Arduino/McLighting/definitions.h +++ b/Arduino/McLighting/definitions.h @@ -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