I’ve been using home assistant for a few months now and it’s amazing. I have a bunch of devices incorporated and I’ve setup a number of automations and monitoring of my home. Recently I’ve decided I am going to upgrade my home network to a UniFi system with a cloud gateway, switch, and APs. However I’m worried about how to migrate my home assistant setup over to the new network and not have it completely break.
My current setup is very janky. I have a modem/ router combo from Xfinity, and a Deco mesh system from TP link plugged into it, so the modem/ router is dictating the IP addresses. After having a lot of issues with my IOT devices on the mesh, I have them all using the Wifi network from the Xfinity router, which has been more stable. I’ve run Ethernet all over my home so the game assistant green and things like my synology NAS are all hardwired. I use the mesh WiFi for my tablets and phones since it is faster and has better coverage.
I’m not worried about my zigbee devices, but I am worried about all the WiFi devices I have incorporated into home assistant, mainly a ton of tp link Kasa or Tapo plugs that I use for remote operation/ automations/ energy monitoring. I also have some esp home/ beacons that I use for tracking what room I’m in, along with presence sensors throughout the house that use WiFi.
For my new network I want to do this the right way, setting the Xfinity modem to bridge mode, controlling everything through UniFi, and setting up VLANs to separate some of my devices.
My question is what is going to be the best way to migrate to this new network that will cause the fewest problems? If UniFi sets up everything with new IP addresses will home assistant lose all communication with them? If I reconnect them to the new WiFi/ vlans will my automations need to be completely re-written?
Read up on how to assign the same ip address space you’re using now to your unifi environment and set it up that way. Then we you cut over the IP addresses don’t have to change.
Thanks for the quick reply! I have seen this in a few of my google searches, but my question is how will it work with VLANs? Currently the xfinity router is giving every device a 10.0.0.X IP address on my network. My understanding (and I am new and learning all of this so my understanding could be completely wrong) is that if I setup separate VLANs for my IOT devices, a guest network, Cameras, etc. they will have different groups of IP addresses. Should I just keep my IOT VLAN as 10.0.0.X and make the other networks 10.0.1.X, 10.0.2.X, etc.? If I do that will my untagged devices such as my NAS and desktop be sharing the same VLAN as my IOT devices?
Thank you. I figured the ESPhome devices would be the more difficult ones since the network configuration is such a manual process. Hopefully my other wifi devices like the Kasa plugs will be easier to migrate.
Have you considered getting your own modem and separate router? I have Xfinity and don’t have any of their equipment. I use an Arris S33 Surfboard modem and Unifi Ultra Cloud Gateway along with Unifi APs and switches. It could get expensive going that route so I understand feeling to avoid.
Stephenn- yes I was considering this and if it will lead to a better setup I’ll spend the money. I already dropped a large amount on a Unifi Dream Machine Special Edition, a POE switch, and some APs, so getting my own modem isn’t completely out of the question. As I was thinking through this yesterday, since my modem rental is included in my plan from xfinity (I have the XB8 model), installing my own modem won’t save me any money on my monthly bill. So is there any functional difference between just switching the modem/ router they provided to Bridge mode vs installing my own modem? The modem from xfinity throughputs the max speeds of my plan with a 2.5 gbps ethernet port, so I don’t think I would see any speed differences
I would make all the IP’s static - even though it’s not the schema you want - only then cut over, with them still static, then set up the vlans and start changing the IP addresses one at a time, fixing things along the way.
Depending upon your pain tolerance you could also just cut over and make sure you live through the pain of having nothing work for a day or two while you spend hunting hours fixing it all… lol
Either way I would make a list of every single device and it’s mac address//ip address and PRINT it out or save to a spreadsheet. That way after you cut over you can make sure you don’t miss any devices and know what the full count should be when all is said and done -
Thanks Kruse. That may in the end be the best way to do it. I have started making a list of all the devices on my network. I was only writing down IP addresses, but I’ll add MAC as well.
One annoying thing about the xfinity modem/ router is that at least in the current configuration (not in bridge mode) they don’t let you reserve IP addresses, even when I log in as an admin through the web UI. I could try switching the modem to bridge mode now and setting up my deco mesh network as the router, but that has given me issues in the past.
Alot of those also do not allow you to do port forwarding and the like so it’s always better to have that option. I would consider also speaking with your provider to work out a new contract - I find they always jack up the prices after you have been with them a couolke of years so every year I spend a p[ainful hour on the phone with them renegotiating prices and getting onto a faster plan with the same or less cost if possible. Maybe it isa time for yuo to do that as well.
A few years back I ended up setting up a hybrid inexpensive setup that has served us well. I went to Direct TV which gives you a DVR that can record 16 channels at the same time and 2TB of (expandable) storage space. They also sub out to a local ISP (Optimum) for internet, but what I did was tell them to not bother I already will supply my own internet and then signed up with Verizon for 1Gig fiber - internet only access. Also when weather is bad the Direct TV now switches over to the internet connection for shows so we don’t lose our channels when there is a big storm like people used to. To each his own I was lucky top get a senior tech about to retire for the fiber install, the guy actually ran the fiber into the home and all the way to the rookm where we have our router, so the ONT (modem replacement - Optical Network Terminal) has a 6-inch Cat6 patch cord feeding the internet directly into the Router. We love this setup…
ESPHome works fine across subnets if you use a hardcoded IP under “wifi:” for your MCU and your router routes properly between subnets. Or you can install an mDNS reflector on your routes, and then you don’t need the static IP trick.
I stll prefer the static as I can add the devices into groups that then also can be directed with routing policies to onl;yu use vcertain VPN tunnels etc. Also as many devices have their own web interface for more granular control, I prefer tro use the IP in a browser shortcut to qwuickly access them directly for maintenance
If you hard-coded the IP addresses of the devices, yes.
The odds are everything will be discovered anew, and Home Assistant will create new entities (mostly with a _2 suffix). Automations using the new integrations will have to be edited to add the new _2 suffix to the “unavailable” integrations.
Op is moving in to unifi so they can do whatever they want in the end
First make the move. Setup unifi to replicate the existing network condition. If dhcp then yes setup dhcp serving the same segment then swap out the UniFi gateway for your router…
The network will keep going as if nothing happened if a device is dhcp it will attempt to re reserve at half its remaining time the available dhcp server will say no that’s not yours but it’s available want it? And the device will say yes. And continue as if nothing happened now renewing against the new dhcp server.
So now your IN.
Yu can do whatever you want now study the device and it’s capability including your ability to manage it and understand it.
I submit a well managed flat network you understand and can control is WAY MORE secure than a complex network that the driver doesn’t understand. So yes use those new tools on the UniFi gear but after you understand WHY you want to segment your network and if it makes sense.
(also after everyone renews dhcp with unifi you should see them as clients I. The console. To make sure they don’t change ip addresses just set them to reserved. You can also give each a fqdn on your network)
It does’t work on my setup. I use asus rt-ax88u pro with stock firmware as a gateway and gl-mt6000 as main local router with openwrt. Wifi roaming is working, batman-adv is working with 4 routers, vlan ssid also.
I tried to add another vlan ssid and put esphome devices in it but it didn’t went as planed. I tried to use static ip for esphome devices but it became unavailable. As i looked around people suggesting using mdns reflector in avahi or some firewall roules that have to be set up in cli. I don’t think that this is gonna work on stock firmware for now.
Maybe on asus merlin, but for know, as I know asus merlin firmware doesn’t allow creating vlans, at least not in gui.
Thanks everyone for the feedback. I’m going to document all my devices before the switch so I can be prepared to re-add them as needed.
Another question I had is regarding my Home Assistant Green. Under Network Settings it has options to configure network interfaces for ipv4 and ipv6. Right now they are both set to automatic, but there are options to set them to either static or disabled. Should I set the IP addresses on the Home Assistant Green itself to static so I know where to look for it when I hook it up to the new network? Or will that cause problems? If I am at home on my local network I usually use the homeassistant.local:8123 to work on home assistant, and if I’m remote I use the Nabu Casa home assistant cloud address.
Prior to migration, you should attempt to set as many devices as possible to static, and on top of that, set your router to give every device a fixed IP address (that matches the current address they already had) via DHCP. You’ll port the same DHCP configuration to your new router, and that will ensure zero network disruptions.
Edit: note that for IPv6 addresses, I have no clue. DHCP6 is mostly not a thing, to my knowledge.
I configured vlan for esphome devices using asus router as a gateway. In my case the problem was with mdns and firewall roules.
I found a way how to install custom scripts on stock asus firmware and that led to manually configure needed settings.
On how to add scripts on asus router with stock firmware you can find here.
Usb stick is a must have.
If someone using asus router stumble upon this, this is how i done it.
I created new file in /jffs/configs
avahi-daemon.conf.add
[reflector]
enable-reflector=yes
Restart mdns and devices on vlan ssid is visible using avahi-browser.
After restating firewall my testing esphome device became available in home assistant.
Both files should be exec, have +x permission.
The two things left to be done is to propagate vlan ssid over openwrt routers using batamn-adv and change ip address of esphoem devices.
I disagree. Static should only be used for things that absolutely cannot change, like routers and servers. (Home Assistant is a server). Everything else should use DHCP. Then it won’t matter what your new IP map looks like. For things that are hard-coded (a poor practice, but it happens), then reserve the IP on the router. When migrating to a new system, make a list of the clients with a reserved IP. Evaluate if the reserved IP is really needed - most of mine weren’t. (I did a migrate to a new router). DHCP made things go smoothly.
Your router reserves an IP address for a given MAC address. Static IP is set in the device or client.
IPv6 - Most, if not all of your devices and clients won’t have IPv6 supported anyway.