Can't access home assistant after changing router

Hello,

I have just changed internet provider from Vodafone to Virgin and I’m now using Virgin’s router; in the old one the internal ips were 192.168.1.x; now, on the new router the ips are 192.168.0.x; I can see that the pi gets assigned an ip (192.168.0.21) but I cannot access this via browser as I used to do

I remember when configuring hassio there was only a range of ips from which connections were allowed and it was set to 192.168.1.x;

{
  "username": "admin",
  "password": "YOUR_PASSWORD_WITH_QUOTES",
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "ssl": false,
  "allowed_networks": [
    "192.168.1.0/16"
  ],
  "banned_ips": [
    "8.8.8.8"
  ],
  "banlimit": 0,
  "ignore_pattern": [
    "__pycache__"
  ],
  "dirsfirst": false
}

unfortunately my router doesn’t allow me to change the third digit from 0 to 1 to match the old configuration

What options do I have, apart from getting a new router?

If you have Samba installed, access configuration.yaml and change the trusted networks. Restart HA.
If you can connect a console to your HA server, restarting may be easier.

SSH access may work too.

I haven’t got SSH neither Samba set upunfortunately; I managed to access the sd card file (including the config file) by inserting the sdcard into my laptop booted with ubuntu, but I can only open files in read only mode…

I’ve just realised the config file was already set to
192.168.0.0/16

I’ve backed up my configuration.yaml and automations.yaml and reflashed the sd card

Trying to connect to 192.168.0.21:8123 and I cannot reach the page (I should be able to see the ‘prepring hassio’ screen)

Are you sure your browser is using http instead of https? Try with a different browser using http.

1 Like

Did you edit the network/my-network on the card or did you just boot normally?
Check for the new IP on your router or use some app like fing on your mobile to find it.

I’m supposing you are using ethernet while booting right? Did you have Ethernet before or did you set up the same SSID to your new router for the pi to connect?

1 Like

I didn’t edit my-network on the card; is this needed?

I used fing to find the right address

I’m using ethernet and I was using ethernet before (I have never set up wifi)

just realised I had flashed image 2.10, which gave me problems last time; I’ll try with an older one I have (1.31)

As it’s a new installation, make sure you have http:// or that https:// is not forced by your browser as @anon34565116 mentioned.

Nah, it should work automatically with ethernet and dhcp on your router (make sure you have no mac bound to ip)

I can now see the ‘configuring hassio’ page but it has been stuck on it for 2 days…

so now the problem was that I had to remove the mouse receiver before booting for the first time; it worked for 1 day on the ip assigned by the router (192.168.0.21) then I changed the dhcp reservation to give it 192.168.0.15, restarted the router, couldn’t connect, restarted the pi, couldn’t connect; change dhcp back to other ip (192.168.0.21), restarted the router and the pi, I still can’t connect…

I have the same issue, but I dont have anything in my configuration that says allowed ip.

My router assigned this ip: 192.168.0.38/24.
I moved from one router to anohter, in that router maybe it was with another ip.

but I have this:

Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
    base_url: xxxx.duckdns.org added:8123
    ssl_certificate: /ssl/fullchain.pem
    ssl_key: /ssl/privkey.pem

In case anyone else has this problem. I may not have changed my router, but I did a factory reset on my old router and then put in my old router information (ID/Password)

Even though I had a duckdns prior to reset I still needed to go to: https://homeassistant.local:8123/config and log in with my old credentials (old being pre-factory reset on my router). Once this was done I was successfully logged in.

I should note that I had previously backed up my router’s settings, which included a static IP of my HA Odroid N2+ (not sure if this made any difference with that)

To restore your DuckDNS, after a factory reset of the router, you need to make sure that you have port forwarding properly set up. Everything Smart Home (on YouTube) provides solid direction on completing this (https://www.youtube.com/watch?v=AK5E2T5tWyM).

2 Likes

I had the same problem, and could not for the life of me work out how to access HA again after making sure everything was setup and port forwarded correctly etc.

Going to https://homeassistant.local:8123/config was what fixed it for me.

Crazy, why is that the fix?

Would it not have been far easier to change the ip range in the router or am I missing something basic?