From 3ba1dad51803cccaa49e295343b9132500be5d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien?= Date: Tue, 26 Dec 2017 07:23:13 +0100 Subject: [PATCH] Adding mDNS --- LibreMetric.ino | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/LibreMetric.ino b/LibreMetric.ino index b81c87e..47cc65a 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -5,6 +5,7 @@ //################# LIBRARIES ########################## #include #include +#include #include // https://github.com/tzapu/WiFiManager #include #include @@ -69,6 +70,14 @@ void setup() { WiFiManager wifiManager; // reset saved settings // wifiManager.resetSettings(); + if (!MDNS.begin("ESP8266")) { + DEBUG_PRINTLN("Error setting up MDNS responder!"); + while(1) { + delay(1000); + } + } + DEBUG_PRINTLN("mDNS responder started"); + MDNS.addService("http", "tcp", 80); #ifndef DEBUG_WifiM wifiManager.setDebugOutput(false); // no debug