From 709706c2d1f62a884dd9aca2fadec305dc851937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien?= Date: Tue, 26 Dec 2017 07:26:17 +0100 Subject: [PATCH] Setting unique hostname with chipID --- LibreMetric.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/LibreMetric.ino b/LibreMetric.ino index 47cc65a..24f48ad 100644 --- a/LibreMetric.ino +++ b/LibreMetric.ino @@ -17,6 +17,7 @@ #include "d_helper.h" #include "FS.h" +#define HOSTNAME "LibreMetric-" //################# DISPLAY CONNECTIONS ################ // LED Matrix Pin -> ESP8266 Pin @@ -66,10 +67,11 @@ void setup() { } display_message("Wi-Fi"); - WiFiManager wifiManager; - // reset saved settings - // wifiManager.resetSettings(); + String hostname(HOSTNAME); + hostname += String(ESP.getChipId(), HEX); + WiFi.hostname(hostname); + if (!MDNS.begin("ESP8266")) { DEBUG_PRINTLN("Error setting up MDNS responder!"); while(1) {