Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
Merge branch 'feature/ota' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
bram2202 committed Apr 29, 2021
2 parents b62ca1a + 983c61a commit 6b8cf22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions esp8266-dsmr.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <ESP8266HTTPClient.h>
#include <WiFiUdp.h>
#include "MQTTPublisher.h"
#include <ArduinoOTA.h>
#include "WifiConnector.h"
#include "ESP8266mDNS.h"
#include "Settings.h"
Expand Down Expand Up @@ -81,13 +82,19 @@ void setup()
// Setup MQTT
mqttPublisher = MQTTPublisher();
mqttPublisher.start();

// Setup OTA
ArduinoOTA.setHostname(WIFI_HOSTNAME);
ArduinoOTA.begin();
}

void loop()
{

wifiConnector.handle();
yield();
ArduinoOTA.handle();
yield();
mqttPublisher.handle();
yield();

Expand Down

0 comments on commit 6b8cf22

Please sign in to comment.