So I have a few ESPHome devices, couple of smart plugs by localbytes and a smart wall switch by Sonoff. All flashed with the latest ESPHome and all work flawlessly with Home Assistant.
However even when these devices are working and accessible from HA, I cannot get ESPHome to see them unless I power cycle them and even then ESPHome can only find them for a short period of time < 3mins following the reboot.
My unqualified suspicion is that this is an mDNS issue somewhere but the problem is exclusive to ESPHome i.e. my Denon AV Receiver and HP printer both resolve consistently. Additionally I enabled the web_server on the devices and like HA this always works but only via the IP address of the device and never the mdns hostname.
How is it the ESPHome devices don’t have the .local suffix appended like my other devices?
My router is a Unifi Dream Machine SE, I’ve enabled mDNS on both networks I’ve configured. Network functions like Chromecast work fine between subnets so I’m not drawn to this being a router issue but happy to eat my words!
The avahi-resolve commands were run from my unraid server, both home assistant and esphome run as docker containers on this and both are in the same subnet.
This is nagging me though I admit with everything working I could just leave this alone but honestly it twitches my ocd so any help would be appreciated.
Then your device should be accessible by
localbytes-plug-pm-8ca2b3.local_domain.mine
(provided you configured local_domain.mine in your router (or any domain name you specify) )
I always have my router assign a fix IP address to each of my IOT devices. This then allows you to access the device via the IP address if mDNS or DNS isn’t working. I believe assigning fix address is also falls under best practices from a security perspective. It makes it easier to control the flow of traffic from your IOT devices to the outside world.
Thanks, agreed I could move this away from mDNS for sure, I just would have prefered to avoid this given the added admin overhead. However at this point that might be optimal given the time invested so far in tshooting this issue
Let’s try to guess something with no device YAML attached.
Answer: have no clue.
if not specified differently in YAML or overrided by DHCP, domain is .local:
domain (Optional, string): Set the domain of the node hostname used for uploading. For example, if it’s set to .local, all uploads will be sent to <HOSTNAME>.local. Defaults to .local.
For me it working for all 40+ devices with no exceptions.
HAOS installed on Raspberry Pi 4.
ESPHome installed twice: as add-on for HAOS and as standalone installation on Windows 10 PC.
So, have 2x ESPHome dashboards - on HAOS & Windows PC.
ESPHome devices images compiled & installed partly from HAOS, partly from Windows PC.
DNS domain/suffix not specified not in DHCP, nor in YAML’s, nor in PC/HAOS settings.
ESPHome mDNS issues had once: when used ESP-IDF framework on device.
Reverting back to Arduino solved the issue.