From 9ed833ec5f61c30c3d9b2b64c60b827e16cb67b9 Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Sun, 4 May 2025 10:15:07 +0200 Subject: [PATCH] Matter and mDNS can be enabled at the same time (#23373) --- CHANGELOG.md | 1 + tasmota/tasmota_support/support_network.ino | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29975679c..dcae27917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. - Berry string literals containing NULL are truncated (#23312) - Berry `display.touch_update` wrongly applies resistive calibration (#23363) - NimBLE log_level definition conflict (#23366) +- Matter and mDNS can be enabled at the same time ### Removed diff --git a/tasmota/tasmota_support/support_network.ino b/tasmota/tasmota_support/support_network.ino index eb2739317..eb4f908c4 100644 --- a/tasmota/tasmota_support/support_network.ino +++ b/tasmota/tasmota_support/support_network.ino @@ -29,7 +29,9 @@ struct { void StartMdns(void) { if (Settings->flag3.mdns_enabled) { // SetOption55 - Control mDNS service if (!Mdns.begun) { +#ifdef ESP8266 // the following will break Matter support, MDNS.end() does not seem necessary for ESP32, but I prefer to keep it on ESP8266 because I can't test it (#23371) MDNS.end(); // close existing or MDNS.begin will fail +#endif // ESP8266 Mdns.begun = (uint8_t)MDNS.begin(TasmotaGlobal.hostname); AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_MDNS "%s '%s.local'"), (Mdns.begun) ? PSTR(D_INITIALIZED) : PSTR(D_FAILED), TasmotaGlobal.hostname); }