Changing Router for Home Assistant

Hi, I’m currently using TP link AC1200 router and it is dying. I’m thinking to change it to new Asus AC68U router. Currently, I have my HA, Sonoff, Broadlink, Xiaomi Gateway connected wirelessly to the TP link router.

I have few questions on switching the router,

  1. I notice the gateway is different for both routers. The TP link is using while Asus is using Can i change the gateway of the new Asus router to follow the TP link gateway? My HA and other smart devices are using the gatew

  2. I believe i can set the same wifi ssid and password as the TP link in the new Asus router, so that I don’t need to re-configure every device. Am I right?

  3. After doing the step 1 and 2 above, will HA works without having issue?

Thanks in advance.

i dont use tplink or asus products, but i believe you should be able to unplug the old router, plug in the new one, go into settings in the new one and set it up so everything is the same as the old one. as far as your router is concerned, home assistant is just another smart device that has it’s own ip address.

1 Like

The issue will be IP addresses.
If your configuration says your broadlink is at some IP then it will be an issue.

I would suggest you find out what all devices have as their IP before you switch and then try and set it up the same way in your new router with reserving IPs to devices.
It will probably be an hour’s work, but if you don’t do this it could probably be several hours of trying to find out why something isn’t working.

But I agree with 1 & 2. It should be possible.

1 Like

I second what @Hellis81 said.

I just bought a new router (Asus) and I changed the suffix of the IP address 192.168.1… first I had 192.168.178. Don’t ask me why, my ISP provider did. If you change everything according your first setup, it cost you only 1-2 hours of work.

To summarize shortly.

  1. Yes this is possible, Asus has deemed this possible in my case. Also using xiaomi gateway

  2. Yes tries this as well and worked. However, I changed a lot so therefore I wanted to start clean

  3. You will always have work to do when changing your router. But If you maintain step 1 and 2. The work that needs to be done is limited

1 Like

depending on devices you are using. Some of them can cache bssid of wifi radio. It’s mostly implemented in battery powered devices which tries to connect using bssid first.
If you change wifi access point, the connection process takes longer impacting battery life

1 Like

2.yes, turn off old router first
3.all IP must be same as previous router. You could set them to static on old router then, after initial connection on new router, set the correct static IP on new router

1 Like

Thanks everyone. I will proceed to get a new router.

Jesus DHCP and DNS were invented to fix these problems. Why hard code ip addresses?

because fixed appliances (which smart devices are) should have fixed ip addresses.

Also fixed IPs help un case of battery powered devices shortening connection time

I agree your HA instance should probably have a fixed IP. A light bulb should not need to.

Horses for courses I guess.

I have no opinionion about bulbs.
But relays/dimmers are devices I configure for fixed addresses.

the point is to get rid of all possible failure points in case of devices which must be as much reliable as possible

I just did the same over the weekend. There were several issues though, it might help people reading this in the future:

  • the new router did not accept “!” in the SSID, which was previously contained in my old router’s SSID
  • the new router (Asus) has a limited list of fixed IPs, it says only 24 are allowed
  • some devices do not see the new router at all, not with its new name (“dlink-XXXXX”). For this, I created a guest WLAN with the old name after most devices were migrated. There you can check pending devices.
  • to get around the “!” issue, I debugged the javascript in the browser and disabled the input field validation check
  • some devices might still try to connect to the old router if the new one restarts. This could be an issue if the guest WLAN comes up before the normal one. Devices on the guest WLAN cannot access the internal network.
  • esphome devices should have the fallback hotspot enabled to make router migration easier. Otherwise you have to recompile and reupload every time you change the router.

Other uses for fixed IPs - I have remote sockets that I can only access by IP, not hostname, they are not Tasmota-compatible. Some devices have an API key that is only usable if they are not registered into a new network. It’s much better for esphome and other embedded devices to connect to a fixed MQTT IP (of HA) instead of a hostname.
But, as said before, it’s much better for ESP-based devices to have static IPs, even though it’s a different thing than assigning a static DHCP table. A device-based static IP would be a lot faster and efficient for devices that run on battery, while a reouter-based one would make little difference.

that is why you can created IP reservations on a dhcp server, so a device will always obtain the same IP address :wink:

You can do that for HA server too but you don’t, do you?
For mission critical appliances you don’t want to rely on 3rd parties. If your network is down, or dhcp disconnected, you may lost lost all devices at once. They can set itself the same default IP causing network conflicts, or just switch to AP mode etc. I believe you don’t want that.
Mainanance is another reason: if you want to replace router/dhcp, you need to find export/import method otherwise you have to enter those records manually again.

DHCP is good for connecting of random devices: mobile phones, tablets, notebooks. Allocating IPs to MAC addresses seems to be comfortable but it is not for long run. Can be used for a few specific devices but not for whole network. I advice to consult some articles for that.

I have 53 DHCP IP reservations on my router and no fixed IP on any of my devices including Home Assistant, my 3 proxmox servers, NAS,… And it just works fine. But I have to say I never tried to use my network without my router.

yes i do…why wouldn’t I???
(and unless i start pulling long cables, my network wouldn’t work without the router’s switch & wifi anyway)

And yes, dhcp leases are backed up for exactly that reason :wink:

I had the same issue when I changed routers. I did the following and it worked. Go to Configuration then choose Add-ons, Backup & Supervisor option. On the Top choose System. There you have 3 sections - Core, Supervisor and Host. Go to the Host section and next to IP Address you’ll see a CHANGE Option. Choose IPv4 and there you will be able to change the IP Address [Of the device holding Home Assistant be it the Raspberry Pi or on your virtual Machine] and under that is the Gateway Address which will be the IP Address of the Router you want to connect your Home Assistant to. DNS Serve can be the same as that of the Gateway Address.

1 Like