I decided to finally put all my IoT devices onto separate Wifi, with its own network, to isolate them from the local net.
I configured avahi on my pfSense router to reflect mDNS, so that those devices could still be found by their integrations in HA.
First came the ESPHome devices. No problem at all.
You can actually just replace the wifi configuration in the yaml file, and upload the new configuration while the device is still connected to the old one.
Of course, if the device does not have an USB connection, you might want to be more careful and establish a fallback AP.
Upon reboot, all devices were reachable by their mDNS (xxx.local) address under their new IP and were recognized in HA.
Now for the random devices with their custom Android Apps needed to configure their Wifi. These apps range from the bad to horrible, and the initial setup and change of Wifi is amazingly complicated. and requires any number of wifi reconnections on the mobile device. From bad to worst:
Nanoleaf. complicated, but it works and the instructions are clear
and the reconfigured device was recognized in HA.
Aqara FP2: never seemed to work right, but eventually the device was on the new network. I had to delete the old device and set up the new one, and hunt down all the automations that used it.
Broadlink IR blaster. I still don’t know how it eventually worked. Hit and Hope.
Why can’t all devices just put up a web server in their own Wifi network and allow configuration?
The Shellies are somewhere in between. The Shelly 1 devices use mDNS, and you can simply change the Wifi settings in their web server, and HA will pick it up.
The ShellyPlus1PM doesn’t seem to use mDNS, and its IP address was baked right into the HA integration configuration. There is a “reconfigure” menu item that allowed me to change its IP address. But hard coding IP addresses of devices that get their IP from dhcp is not a good idea. I might have to give those a fixed IP.
I feel your pain - just went through the same exercise
The Tapo cameras were the worst for me because you have to delete and re-add them in the app, but they are in places where they’re not easily accessible if something goes wrong.
Same experience with the ESPHome devices: just changed the SSID and password in the secrets.yaml and pushed the new config.
this fragment might or should rise several questions. As for example:
is relying on dhcp a correct way for persistent devices? IMO it’s not. Especially knowing dhcp protocol.
is letting HA be dependent on your networking config a good idea? IMO it’s bad design when a server needs to know all its clients.
It all designed to be quick to configure. But does it provide expected reliability? Unfortunately, it happens that once something in this chain of dependencies fails, it’s like snow-ball and everything breaks apart.
Let me tell you how I moved all my shelly devices to vlan. besides vlan and wifi preps I just call each of them with http request, changing their ipaddres, gateway and wifi creds. that’s all. HA didn’t even know about this change. Why should it?
ahh forgot to say: I don’t use shelly integration.
If only for the Wifi, yes. But I also wanted to move the devices into their own new subnet, so that I can properly isolate them in my firewall/router. So it required an IP change anyway.
Giving all those devices fixed IP is quite a hassle, isn’t it?
I just notice that those devices/integrations that work with mDNS (*.local) are those the posed the least amount of problems.
Other than that I agree: HA shouldn’t contain IP addresses in its config files.
Not at all. A have it all scripted.
It might looks complicated and obviously it’s not worth for 5 devices. But for almost 100 it just require ls different approach to be maintained efficiently.