diff --git a/examples/IRMQTTServer/IRMQTTServer.ino b/examples/IRMQTTServer/IRMQTTServer.ino index fcb5ea034..fefd743d8 100644 --- a/examples/IRMQTTServer/IRMQTTServer.ino +++ b/examples/IRMQTTServer/IRMQTTServer.ino @@ -2143,6 +2143,8 @@ void setup(void) { if (mdns.begin(Hostname)) { #endif // ESP8266 debug("MDNS responder started"); + // Announce http tcp service on kHttpPort + mdns.addService("http", "tcp", kHttpPort); } #endif // MDNS_ENABLE @@ -2591,6 +2593,9 @@ void sendMQTTDiscovery(const char *topic) { #endif // MQTT_ENABLE void loop(void) { +#if MDNS_ENABLE && defined(ESP8266) + mdns.update(); +#endif // MDNS_ENABLE and ESP8266 server.handleClient(); // Handle any web activity #if MQTT_ENABLE diff --git a/examples/IRServer/IRServer.ino b/examples/IRServer/IRServer.ino index c585847ad..d811c8ff1 100644 --- a/examples/IRServer/IRServer.ino +++ b/examples/IRServer/IRServer.ino @@ -132,6 +132,8 @@ void setup(void) { if (mdns.begin(HOSTNAME)) { #endif // ESP8266 Serial.println("MDNS responder started"); + // Announce http tcp service on port 80 + mdns.addService("http", "tcp", 80); } server.on("/", handleRoot); @@ -148,5 +150,8 @@ void setup(void) { } void loop(void) { +#if defined(ESP8266) + mdns.update(); +#endif server.handleClient(); }