"homeassistant refused to connect" on first installation

I am trying to install and configure HASS on a Raspberry Pi 4. I followed the tutorial here (Raspberry Pi - Home Assistant). The HASS OS 10.5 is installed on the Raspberry Pi 4 Model B. The Raspberry Pi is directly connected to a laptop running Windows 11 directly through an Ethernet cable.
Then I tried to connect to first homeassistant.local and then homeassistant as the tutorial suggested and got either " homeassistant.local refused to connect." or " homeassistant refused to connect.".
I tried both Chrome and Edge browser and none of them worked. I allowed inbound and outbound connections to TCP port 8123 in the Windows Defender Firewall. My Ethernet IP assignment and DNS server assignment are set to Automatic. I also tried reinstalling the HASS OS. None of the attempts made a difference.
I wonder what is likely the source of the problem? What should I do next to tackle it? Any suggestion are much appreciated!

I also tried ping homeassistant.local in the command prompt, and got

Pinging homeassistant [fe80::6cd7:3004:1304:d6b8%14] with 32 bytes of data:
Reply from fe80::6cd7:3004:1304:d6b8%14: time<1ms
Reply from fe80::6cd7:3004:1304:d6b8%14: time<1ms
Reply from fe80::6cd7:3004:1304:d6b8%14: time<1ms
Reply from fe80::6cd7:3004:1304:d6b8%14: time<1ms

Ping statistics for fe80::6cd7:3004:1304:d6b8%14:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

, which I think indicates that the connection is working. Therefore, it is more likely something with the Raspberry Pi side, right? I wonder if I need to modify the settings on Raspberry Pi?

Don’t you have a spare port in a switch or your router you can connect it to? Your windows laptop will probably not do switching / bridging automatically (been decades since I’ve tried so might be wrong)

Thank you for your comments. I don’t think it’s problem with the physical layer though, because I was able to ping the server, and if I disconnect the server, I got a different error that read ‘address not found’.
Now that the error is ‘refused to connect’, I think it is something with either the raspberry pi server or with the settings of my browser.

Alright, just saying that if you actually have a spare network port to plug it into that is way better than using a windows laptop to bridge a connection :slight_smile: Might save you some headaches.

1 Like

Thanks. I will try that!

I found that the problem seemed to be related to " failed to start Network Manager Wait Online". Probably as a result, there is no IPv4 addresses for wlan0 or eth0 shown on the Home Assistant command line welcome message.
I also noticed that while homeassistant.local:8123 is not reachable, the observer homeassistant.local:4357 is.
I wonder if someone could provide suggestions on how to fix this?

Put another WiFi Router between the laptop and the Raspberry Pi. Now seeing the Preparing page. Might have worked this time.

However, I still couldn’t understand what difference it maked by putting an additional router? Why it changes the behavior of network manager?

Additional? You are using two routers?

Found out that the problem is that the HASS OS needs Internet access to set up. Otherwise it got stuck with either Network Manager Wait Online or downloading some components. Thought they meant LAN when the tutorial said “network”.