Guide: Connecting Pi with Home Assistant OS to wifi (or other networking changes)

I too, like you, have a fairly integral knowledge of engineering in general (backend, networking, systems, etc.) and I think I just found the issue with a new router I purchased. I bought the Netgear CAX30 and it supports two classes of channels:

  • 36, 40, 44, 48
  • 149, 153, 157, 161

Whenever I chose the three digit class of channels I could no longer see or connect to my 5GHz banded WiFi. However if I chose the double digit class of channels I could see my 5GHz network SSID and connect to it. Since this post is about using a better shell environment than the official one we have some options to install some tools and inspect things a bit further. I chose to look into the iw tool to give me more information about these channels:

➜  ~ apk add iw
(1/2) Installing libnl3 (3.5.0-r0)
(2/2) Installing iw (5.9-r0)
Executing busybox-1.32.1-r5.trigger
OK: 283 MiB in 198 packages

➜  ~ iw list
...
		Frequencies:
			* 5170 MHz [34] (disabled)
			* 5180 MHz [36] (20.0 dBm)
			* 5190 MHz [38] (disabled)
			* 5200 MHz [40] (20.0 dBm)
			* 5210 MHz [42] (disabled)
			* 5220 MHz [44] (20.0 dBm)
			* 5230 MHz [46] (disabled)
			* 5240 MHz [48] (20.0 dBm)
...
			* 5720 MHz [144] (disabled)
			* 5745 MHz [149] (disabled)
			* 5765 MHz [153] (disabled)
			* 5785 MHz [157] (disabled)
			* 5805 MHz [161] (disabled)
			* 5825 MHz [165] (disabled)
...

As you can see the three digit class of channels are marked as disabled so therefore my 5GHz channels in this class were of no use. So I suggest anyone reading this that has followed the instructions to get the more advanced terminal to use apk to install the iw package and then iw list command to see the available frequencies and make sure that in there area they are able ot enable them. The channels can have interference with other military and weather services as I have read and some are called DFS (Dynamic Frequency Selection) which share the channel with these services and can have interference or apparently be disabled. At least that was what I was able to glean from these links:

Furthermore this also gets into picking the best channel for your router so that you maximize your usage and power and minimize interference. I will be looking into this further and updating this comment as I read more on this. Hope this helps someone having problems not seeing their 5GHz network SSID show up. It baffled me for over two days until I finally drilled down to this specific interesting case I am learning more about! Best of luck to everyone out there!

PS: Also of note is that NetworkManager (which is what HassIO usese under the hood for networking) does not support specifying locales while Raspbian and other Pi distributions do (a la wpa_supplicant.conf etc.). Somehow NetworkManager makes the right selection for the country or region you are in and sets you available channels to you accordingly. However, again, that is something I have to read more about to understand.

On Mac you can follow these instructions to find the best channel for your setup:

  1. Hold the Option key.
  2. While holding the Option key, press the WiFi icon in the menu bar.
  3. Click on the Open Wireless Diagnostics option.
  4. Input your admin password.
  5. Click on the Windows menu and select Utilities.
  6. In the bottom right corner, Wireless Diagnostics will display recommended channels.

My version of the above is:
If your router supports it you should select the channel and a way to find out which is the best channel you should maybe be on:

  • Hold down Option + Click the WiFi logo in the title bar
  • Goto “Open Wireless Diagnostics…”
  • Ignore the popup window
  • Click Window > Scan > Scan Now

On the left pane under “Summary” is the best channel your Laptop recommends for 2.4GHz and 5GHz if you can set those in your router

sources:

I have this same problem Pi 400, HA OS 5.13. HA Core 2021.5.5. Were you ever able to get this fixed? Or is the wifi just busted for Pi 400s?

Edit: Just updated to Core 2021.6.2. Still busted

Edit 2: Just updated OS to 6.0 and that fixed it

Thank you for the guide, although I experience the same issue as @mat44150, @titobustillo and wanaka: the WiFi connection installs fine without any error, but when the ethernet cable is disconnected it won’t work…
Did anyone come with a solution on that yet?

thanks!
tim

have the same issue. Did you solve it?

I didn’t… Anyone else in the room?!

cheers
tim

I’ve managed to get the WiFi set up properly with it on VLAN 10 and the Eth set up on VLAN 20 where it has always been.

As soon as the WiFi is connected; the web portal on port 8123 has stopped working on the Eth connection but is fully accessible on the WiFi connection. I would assume it was connected on both or at minimum the Eth connection and not the WiFi connection.

If I go into the Server configuration I can tick both of the boxes to ask it to work on both connections, however only the WiFi shows the web interface.

Did anyone have an issue with RPI 3B wifi not seeing any networks at all?

# nmcli device wifi rescan
# nmcli device wifi
IN-USE  BSSID  SSID  MODE  CHAN  RATE  SIGNAL  BARS  SECURITY
# nmcli radio all
WIFI-HW  WIFI     WWAN-HW  WWAN
enabled  enabled  enabled  enabled
# ha network scan wlan0
accesspoints: []

I’m on Home Assistant OS 6.2 32 bit

Same RPI works fine with Raspberry PI OS.

I had many issues with this mainly I think the password field was not being passed correctly giving me this error.

Error: Connection activation failed: (7) Secrets were required, but not provided.
using this command to create the connection and pasting the password worked

nmcli device wifi connect [YOUR-SSID] --ask

1 Like

How is the nmcli setup saved? I can connect to my solar inverter fine, but once I reboot the raspberry I have to re-connect manually to the access point!

i want to join the group of people getting no autoconnect to wifi on reboot. the method described at beginning of this post works for me the last years, but all of a sudden the wifi keeps disconnecting randomly and dont reconnecting.
i figured out that if i set the connection with nmcli im able to see it under system->general and can select it there beside the standard eth0 connection. But sometimes after reboot, not every reboot, i disappears there.
i cant get my head around that since a week or so - last idea i have is to upload a connection via usb…

Added my public key and worked on the first try. Very smooth process, thank you for the instructions.

This is a VERY Interesting article…and once I finally got the SSH & Terminal working… Now trying to get the rest of this working.

  1. I get into SSH Terminal, and I type nmcli radio I get the following:
    nmcli_radio

  2. I then type nmcli device wifi rescan I get the following:
    nmcli_device_wifi_rescan

---- Why am I getting NO Device Found, when the #1 shows that it is all enabled???

  1. So of course when I type nmcli device wifi I get nothing back:
    nmcli_device_wifi

I guess I need to figure out why I am not seeing any SSIDs in the [device rescan] process.

Curtis

Has anyone dealt with: Error: No Wi-Fi device found.?
I had a working version 2022.3, after updating to 2022.4 wifi stopped working and appears what @cigas4 and @bearhntr has.

What OS version are you on?

My mistake, it wasn’t the core update, it was the OS update that messed up.
Home Assistant OS 7.6 works fine, in 8.0rc1 it does not detect the wifi network card.

Ok, then yes the OS rc version does have this bug. https://github.com/home-assistant/operating-system/issues/1837

RC releases can be an adventure!

Hello, I have an HA configured with a WiFi connection. I want to add a second NIC to a second subnet. I configured everything but have some issues. When I try the command to view my new network card profile, it says that the profile does not exist. Can you help?

image

I mean your screenshot shows the list of interfaces and their names. “Supervisor” isn’t one of them. Do you mean “Supervisor enp3s0”? Or “my-network”? Or one of the others?

My mistake. For some reason I thought that “enp3s0” was a next column. Thank you.

1 Like

I just dont get it !

I have the community edition installed, I have configured everything, disabled protection mode & restarted the addon.

I can login using SSH and SFTP, but there is no command found nmcli - what am I missing ???

Screenshot 2022-06-09 at 11.42.01 AM