Replies: 3 comments 2 replies
-
The line below should mean that it is uses the default device name or the one set by the user: if (MDNS.begin(config.getDeviceName())) { The current default should be xyclock but it used to be xy-clock (so I'm not sure why it would now be xy-clock): if (!config.getDeviceName()) {
config.setDeviceName("XYClock");
} |
Beta Was this translation helpful? Give feedback.
-
I found the OTA code had a recommended line that sets the name to be used in Arduino and I figured why not use the config's Device Name but it wouldn't compile unless converted to a c string... what a mess of brackets! ArduinoOTA.setHostname((config.getDeviceName()).c_str()) And that's the line that can set the mDNS name for real! Weird. But works. I added restart code to the Website for changing the Device Name as well. And there's almost no delay for a ping to the mDNS name after a reboot. It does respond to the old name for a bit. |
Beta Was this translation helpful? Give feedback.
-
Just thought I'd put here that my mDNS on Windows 11 was acting weird, even for my ESPHome devices so I installed Apple Bonjour from here: https://support.apple.com/kb/dl999?locale=en_US -- supposedly this is the easiest way to resolve a known issue with Windows... |
Beta Was this translation helpful? Give feedback.
-
In the older version it still used xyclock.local and with the update it uses xy-clock.local consistently. That seems to indicate that it is not using the variables pulled from the config file during the setup phase. There's nothing to do about that, is there?
In some way, that explains to me why Tasmota never used mDNS but ESPHome devices can... The name needs to be compiled in doesn't it?
Beta Was this translation helpful? Give feedback.
All reactions