diff --git a/LibreMetric.ino b/LibreMetric.ino index 3154f4a..cba4953 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -72,15 +72,6 @@ void setup() { hostname += String(ESP.getChipId(), HEX); WiFi.hostname(hostname); - 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 #endif @@ -115,6 +106,16 @@ void setup() { DEBUG_PRINTLN(F(" displays configurated...")); server.on("/", GetMessage); + 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); + + display_message(WiFi.localIP().toString()); message = "Bienvenue !";