[SYS] Fix for build error with MDNS_SD (#2239)

* Fix for build error with MDNS_SD

* Update environments.ini
This commit is contained in:
Northern Man
2025-09-16 06:38:43 -04:00
committed by GitHub
parent 226297ba5b
commit 382fa5e9f2
2 changed files with 2 additions and 1 deletions

View File

@@ -257,6 +257,7 @@ build_flags =
'-DMQTT_USER=""'
'-DMQTT_PASS=""'
'-DMQTT_PORT="1883"'
'-DMDNS_SD=true'
'-DDEEP_SLEEP_IN_US=120000000' ; Deep sleep for a period of time to conserve battery
'-DESP32_EXT0_WAKE_PIN=GPIO_NUM_14' ;Should a water leak be detected immediatly wake the ESP32 and report the problem
'-DESP32_EXT0_WAKE_PIN_STATE=0' ;Should a water leak be detected immediatly wake the ESP32 and report the problem, sensor state to look for wakeup

View File

@@ -936,7 +936,7 @@ std::pair<String, uint16_t> discoverMQTTbroker() {
}
if (n == 1) {
THEENGS_LOG_TRACE(F("One MQTT server found setting parameters" CR));
return {MDNS.IP(0).toString(), uint16_t(MDNS.port(0))};
return {MDNS.hostname(0).c_str(), uint16_t(MDNS.port(0))};
} else {
THEENGS_LOG_WARNING(F("Several MQTT servers found, please deactivate mDNS and set your default server" CR));
}