Dns problem after renaming esphhome device

Hi

After renaming my esphome esp32 cam module. Over the Air update fails, because the resolving of name.local fails.
e.g:
INFO Resolving IP address of hallcam.local
ERROR Error resolving IP address of hallcam.local. Is it connected to WiFi?

my Question who is resolving the .local addreses and how i can add/modfy the entrys?
I run Home Assistant OS 6.6

Thanks

Max

In esphome integration confifuration check option “status use ping” (supervisor->esphome->configuration->show unused config options). That way you’ll be connecting via IP address and not DNS. I found DNS very unreliable anyway.
Oh, and rather use static IP’s for these modules, so IP won’t change over time.

1 Like

Hi Parvel,

i switch to option “status use ping”. But still when i trigger a over the air update. The update try to resolve IP address of hallcam.local. Which fails after the name change.

My dhcp runs on a other server and assing static ip. But *local.hass.io will resolved localy.

Here the config of the local running coredns.

forward . dns://172.16.1.254 dns://127.0.0.1:5553 {
except local.hass.io
policy sequential
health_check 1m
}

but i don’t find the zone file for local.hass.io.

Cheers

Max

you can also use option “use_address” in esphome’s wifi settings (info). There insert your old domain. after succesfull update delete this line for future updates.
If you change IP or domain esphome will try to reach module on your new IP/domain, and of course it won’t find it. This line causes that OTA searches module at it’s old address and updates it with your new address.

When i switch back to the old name all work fine:

esphome:
name: cam3

cam3 was the name I used when flashing with serial. Ota update can resolve the name cam3 local.
if i change the name ota fails because the new name is not resolvable.
I know the ip of the esp but i don’t know how to point newname.local.hass.io to the ip addess of cam3.local.hass.io

to

like i said: in wifi config of ESPHome add line:

use_address: IP of your device

Then update. After update remove this line and you’re done.

1 Like

Thanks now the device is resovable with the new name.

1 Like

Great!
You must do this each time you change domain or IP address. The reason is quite simple and logical: when you enter NEW domain in ESPHome and click “update” then ESPHome tries to connect to this new domain. It doesn’t know old one, because you just deleted it and entered new one, right? And module is still acccessible on old domain. That’s why you must temporary insert “use_address” so that ESPHome knows where to connect. Once new FW is loaded then module will reply to this new domain.

1 Like