Renaming Hostnames in ESPHome

I’ve been a bit annoyed by the default esphome-web names that many of my devices have. I haven’t tried renaming many of them, which seems to be simpler now than when I first renamed a few of them years ago. I also have a secondary issue in my ESPHome dashboard, devices showing as offline, but that are online in Home Assistant.

These devices that are showing as offline, are also refusing to update, but when I check on them in home assistant, everything is working just fine. I feel like it’s an issue with my VLANs but I haven’t changed anything with those settings since I got them working, so I’m not sure why it stopped working.

This really came to be a problem when I was working on my catomater, as I could see a good ping it in the dashboard, but I couldn’t use the rename hostname function as it would fail to OTA update the device claiming it was “offline”. Other OTA updates would occasionally fail for the catomater, but not all of them.

I think this may help with VLANs

I first went into the home assistant network adapter settings. I found the configuration would let me select a network adapter for use with multicast traffic. I decided to select both VLAN adapters and rebooted home assistant for those settings to take.

The second thing that I tried helped significantly. If I went and found the device IP (I found it in my unifi dashboard), and added it as a use_ip entry in the WiFi settings of the ESPHome device. ESPHome builder would then find the device and it would start pinging successfully, and OTA updates would work.

After that I could use the rename hostname function in ESPHome Builder successfully.

Rename Hostname
Pick a New Name
Good to Go!

Finally all my ESPHome devices have meaningful hostnames, and are pinging successfully in the ESPHome builder. I no longer have issues with OTA updates, so now I can continue working on some of my odd little ESPHome projects without blockers.