diff --git a/esp8266-dsmr.ino b/esp8266-dsmr.ino index 5cc2151..78c4252 100644 --- a/esp8266-dsmr.ino +++ b/esp8266-dsmr.ino @@ -3,6 +3,7 @@ #include #include #include "MQTTPublisher.h" +#include #include "WifiConnector.h" #include "ESP8266mDNS.h" #include "Settings.h" @@ -81,6 +82,10 @@ void setup() // Setup MQTT mqttPublisher = MQTTPublisher(); mqttPublisher.start(); + + // Setup OTA + ArduinoOTA.setHostname(WIFI_HOSTNAME); + ArduinoOTA.begin(); } void loop() @@ -88,6 +93,8 @@ void loop() wifiConnector.handle(); yield(); + ArduinoOTA.handle(); + yield(); mqttPublisher.handle(); yield();