Cannot connect to home assistant with ip address

Hello,

I’m having issues connecting to home assistant (installed on a raspberry pi 2).
What works: connect to “http://homeassistant.local:8123/” in web-browser (windows, google chrome).

What does NOT work:

  1. connect to “http://192.168.0.10:8123” in web-browser

  2. use the android app. The android app detects the right IP, but it cannot connect.

Is this a network issue? The raspberry pi has a fixed IP and is connected with an ethernet cable. My windows machine can connect to homeassistant.local with wifi and ethernet, but not with the IP address.

Can anyone help. I am just starting out. The main goal is to connect to the installation with my android phone.

I think the IP of the RPI difference from HA IP
Check your router for the right IP
Or check in HA itself at your supervisor:

Try to ping homeassistant.local and see if the right IP comes up and if you get a reply too.

Thanks for the tip.
It appears that the ip I am using is correct:

Thank you, I did not know that is it is possible to ping homeassistant.local.

I tested pinging homeassistant.local.
It gives back an IPV6 address.
Is it possible that I need to disable ipv6 somewhere so that it defaults to ipv4?

Thank you I missed that setting,

Now I cannot connect to it at all. It does confirm that it all worked on ipv6. And that the ipv4 link did not work.

I am checking network settings now. Unfortunately, the interface of the router (from the internet provider) is quite limiting.

I fixed it.

For others with this problem:
It was the fixed ip-address that was problematic for the router (why that is is still unclear for me)

how to reset IP from the command line (raspberry pi hooked up to a monitor and keyboard):

– login
– mcli con show
– mcl

I believe that should be nmcli

Reserve the IP address in your router’s DHCP server instead of setting a fixed IP in Home Assistant.

You have a network mask of /32… if you set the address to 192.168.0.10/24 instead, it will be able to communicate with the entire 192.168.0 subnet… (you need to verify the netmask in your router)

Also- when you set a static address, make sure you use an address outside of the dhcp range. If you don’t, you will get problems with two nodes
Using the same address…

Correct! Sorry for the typo.

That would be ideal. However my isp router does not allow this.

Your router has absolutely no way of knowing what netmask a node is using.

If your router is the nornal type with one wan port, a number of lan ports and possibly wifi, sll the lan ports and the wifi is on the same ip subnet, using a netmask of 255.255.255.0 (ie /24). The local subnet in your case seems to be 192.168.0.0/24, uding the address range of 192.168.0.1-192.168.0.255. All devices on this subnet must use the same netmask, otherwise they cannot talk to each other, as the traffic within the subnet isn’t routed.

It is quite possible, that the router from your isp won’t let you change the netmask on the local subnet but that is another thing.

If you are back to using dhcp on you ha node, what does the network settning in the configuration screen say? I am using an rpi4 and for me it states “auto configure. Detected wlan0 (192.168.1.22/23)” (yes i am using a 512 node subnet, hence /23)

If I were to change the ip to a static one, i would have to look in my router to see what addresses the dhcp server controls and choose one ip address outside that range but I still have to set the netmask to /23. If I don’t do both, things will break sooner or later.

For me, the setup is
Fiber into my home, this goes into a “media converter” (ie a switch). The switch has one fiber port and four rj45 ports labeled internet, tv, ip telephony and the ksstbone is unlabeled. The three labeled ports are on three different vlans, and all get their oen external addresses with /32 as netmask (i get only one address). The internet port us then connected to my router, which will acquire an external ip address with the /32 netmask on its wan port, and route the external traffic from the local 192.168.0.0/23 subnet to the wan port.

Thank you for the info!

Are you you sure the subnet mask is /32???
Because that is not a valid subnet,
A /32 subnet mask will only contain 1 IP address, but a subnet require at least 4.

  • one IP will be the network address
  • one IP will be the broadcast address
  • one IP will be the router
    And then at least. One client address.
    This means /30 will be the smallest subnet mask possible for a routed network.

/31 and /32 subnet mask notations are usually used in filters/ACLs

Bless the interweb. It has been working for years… I got a new wifi 6 router and could not connect with IPV4 It would work with http://hassio which when I pinged hassio it came back with IPV6 numbers

No clue where 32 came from as I have no clue what it means. It must have been the default for static. Changed to /24 and all is well.

The number after the slash is a way of writing you netmask.
8 = 255.0.0.0
16 = 255.255.0.0
24 = 255.255.255.0
32 = 255.255.255.255 (this means there is only one address and no network)

Values like 30,29,28 and so on exist too.
31 does not exist as such, since 31 would mean a network with 2 addresses, but a network should have an address for the network and an address for the broadcast, so with only 2 addresses, then there are no addresses available for hosts and router and the like.

Thanks,
so, I have always wondered if I had more than 252 or 54 whatever the limit is could I do 255.255.0.0
and 192,168.1.x also see 192.168.2.x stuff?

yes, some “Mesh” routers use 255.255.0.0 by default

yes.
your netmask 255.255.0.0 actually have to be written in binary and then it becomes 11111111.11111111.00000000.00000000

Your IP address also have to be written in binary and 192.168.1.1 then becomes 11000000.10101000.00000001.00000001

If you then arrange them with IP address at the top and netmask at bottom with a non-propertional font then it looks like this.

11000000.10101000.00000001.00000001
11111111.11111111.00000000.00000000

Any IP address that has the same digits in the place where there is a one in the netmask is in the local network. If we then add 192.168.2.1 on top then it looks like this.

11000000.10101000.00000010.00000001
11000000.10101000.00000001.00000001
11111111.11111111.00000000.00000000

As you can see they are the same where the ones are in the netmask, so they are in the same network.

Had you netmask been 255.255.255.0 instead, then it would be converted to 11111111.11111111.11111111.00000000 and then the compare would have been like this.

11000000.10101000.00000010.00000001
11000000.10101000.00000001.00000001
11111111.11111111.11111111.00000000

Since the digits are not the same in all the spots where there is ones in the netmask the IP addresses are now in different networks.