I have an issue with one (only at this point), of my EspHome Devices.
It’s an ESP32 connected to a Eastron SDM-220 meter.
While it’s reporting fine, the EspHome Add-on is showing it as off-line & not able to be updated.
Strange thing is it was On-line at a point last week & I could look at the debug from the Add-on.
I can see the EspHome is looking for it at eastron-sdm220.local but can’t resolve the Host Name.
What I do know is that the Esp32 has a DHCP Reservation setup for 192.168.59.91.
I Can Ping that IP address from both the HA Pi & my Desktop PC.
Neither can ping eastron-sdm220.local, but when I look at my DNS server, what it’s registering to that IP is:-
eastron-sdm220.inverellit.local
That I can Ping.
Not sure where to address this, as Home Assistant has the correct DNS record, but it’s EspHome that has the wrong DNS name for my device.
Obviously I run a Windows Domain Controller here, so all my devices are getting a .inverellit.local DNS Suffix.
Home Assistant seem to know about this as it’s having no issues reading this device,
but the Add-on has it registered without the full DNS Sufix.
Final point I’ve just discovered is that my has instance has a DNS name of hass.local, NOT hass.inverellit.local.
It also has a DHCP Reservation & hass.local Resolves to 192.168.59.50.
1- Fix your mDNS in your router…
2- Use a fixed IP
3- Add your local domain name to both your router and esphome device
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.
Apparently, your router added the domain name inverellit.local somewhere along the line.
my first try would be to add
domain: .inverellit.local
to the wifi section in your esphome yaml.
ps: the esphome addon has nothing to do with an esphome functioning within HA; it is only used for programming the device, and not used anymore after that
Not the Router, DHCP is managed by a Windows Domain Controller & I do have it added as a suffix there.
I’ve gone off Fixed Ip’s over the years.
I manage networks with circa 100+ devices & prefer to have the majority of the devices on DHCP with Reservations assigned to MAC addresses.
I do still have a few static devices, typically routers & switches, but even with them I create a DHCP reservation on the server as it help keep the entire pool of IP addresses documented in one place.
That seems a good suggestion but not sure where to add it.
(To the EspHome Device that is; I have determined it needs inverellit.local).
Is it safe to edit:- /config/esphome/.esphome/{}eastron-sdm220.yaml.?
(I don’t know what the Cury Braces Signify)…
But I can see it in Studio Code Server; Line 8 has the DNS Name that is not valid.
Also not sure why only a few devices don’t register with the DNS Suffix.
In Particular it seem to be the Pi’s; Linux Devices.
Not sure what applies to the couple of Linux (Ubuntu) PC’s as they are turn off most of the time.
Did you fix it? All of mine now show offline and ESPHome won’t connect to them, tho they otherwise work and are online in HA and My Network Controller(s)
Did have the issue reappear last Week when I migrated from the Pi to a Nuc.
Initially the Nuc had a Host Name of Hass & Static IP of 192.168.59.5.
DNS Registered it as Hass.local & that could not see my ESP’s.MyDomain.Local.
Changed it to DHCP with the same address applied to it’s MAC & with the Suffix for MyDomain.Local appended & it all worked again.