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

This whole post is an alternative to that. :slightly_smiling_face:

What you are referring to is the original method. The file you put on your CONFIG/network/the-file-on-your-USB-stick is the same file which gets imported to /etc/NetworkManager/system-connections/the-file-on-your-USB-stick

Using ' works for me when I create a password which contains !

image

ok, after a bit.
deleteing th con and connecting again did the trick
There must be something that went wrong the first times.

nmcli con delete “Grillnet”

and i made a variable of my pass
psw=‘Area5!**********!****3

and then added with
nmcli device wifi connect “Grillnet” password “$psw”

and it worked.

thanks everyone for making the community a eazyer place to find info.
Have a nice summer all. take care and be safe.

1 Like

I had some similar problem I think with a % in my wifi password. I tried all here except yours with the variable, I created the file which would have been imported from USB directly in folder /etc/NetworkManager/system-connection and rebootet. The connection was then defined but not coming up and I already suspected it is the password.

“nmcli connection show” was showing up the wifi setup not being connected to any device (“–”).
“nmcli device connect wlan0” gave me the feedback I needed:

Passwords or encryption keys are required to access the wireless network blablubb.
Warning: password for ‘802-11-wireless-security.psk’ not given in ‘passwd-file’ and nmcli cannot ask without ‘–ask’ option.
Error: Connection activation failed: (7) Secrets were required, but not provided.

Guess what: I ran the same command again with this option and then it asks interactively for the password and here it accepts the special signs. Now it is up! :slight_smile:

1 Like

I just tried to add this to the repository and it’s saying that the repository structure is non-compliant. Is there an updated version?

You tried adding what to where?

I actually got it to work last night. I learned sooo much in doing so. The dangers of learning more about Home Assistant.

Hi,
I am a newbie trying to run hassOS on raspberry Pi 4 , 4GB.
And this command nmcli is not working

Moreover, all the Linux commands that used to work on hassbian is not working on HassOS.
Example nano, apt-get install etc.

what am I missing here?

I don’t think you actually read the guide. (hint, you need a specific addon and other steps)

Also this is not hassbian or raspbian. There is no apt-get. You won’t be installing software without using addons. All addons are containers, including the ssh addons. They provide basic access to the mapped directories and access to the custom command line. Type “ha help” to see more.

Question
Where are you typing this command nmcli radio.
I guess it is the terminal window, but In my case this command is not working

Step 1 of this guide. You are using the wrong addon.

Sir, thank you very much. Finally an effective and not “fancy” way of setting up the network.
Thank you!

1 Like

I have the same issue, except that I don’t have any special character in my wifi password.
I tried the following command:

nmcli device wifi connect <SSID> --ask

It’s interactively asking for password, but I still end with Error: Connection activation failed: (7) Secrets were required, but not provided.

The add-on is indeed the community ssh and web terminal version, configured with password (temporarily, I will uninstall it when wifi is connected), and with protection mode disabled, followed by the add-on restart and even a homeassistant reboot (then add-on start).

What is the command you used exactly? Have you done any change in a file elsewhere?

1 Like

I did not do any change in any file additionally. The command I used was as far as I remember:
nmcli device connect wlan0 —ask

1 Like

That’s correct!

It worked with your command. I had to execute these 2 commands:

$ nmcli device wifi connect <SSID> password <PASSWORD>
$ nmcli device connect wlan0 --ask

Not sure why this is needed, nore if we can bypass the password option in the first command, but the combination is working fine. Thanks !

2 Likes

I tried to connect to the wifi with the nmcli device wifi connect "SSID" password "pw" command. But it says Error: No network with SSID 'SSID-Name' found.

The SSID of the wifi is not visible but there must be a way to connect to a network that is not visisble…

This is amazing, thank you.

It said 502: Bad Gateway
I can never run the Terminal :frowning:

The addon does take some time to get started. Are you waiting long enough? What do the add-on logs say?

I am an experienced embeded system C programmer but a complete novice at Raspberry Pi and open source code in general. That said, I was also having trouble getting wifi working with my Pi 4 model B and hassio. The 5GHz worked fine with Rasbian. After much serching and dead ends, I noticed the potential problem if the channel number was not < 10. When I looked at my router, 2.4 GHz supported channels 1-11 but 5 GHz only listed double digit or more channel numbers. Once I changed my configuation to the 2.4 GHz (seperate SSIDs) and insured the channel number was < 10, it is now working. Of course I can’t be sure the channel number is the problem but it seems to make sense.

1 Like

I was getting “Error: Connection activation failed: (7) Secrets were required, but not provided.” message driving me nuts. Finally I figured out what the issue was. So, this message is generated if MAC filtering is enabled on your AP. By default, this OS changes wlan0 MAC address every time it activates it, which I find very silly for a home automation controller. Would be perfectly fine for a mobile device connecting to the public WiFi networks, of course…

Anyway, "nmcli c modify wifi.cloned-mac-address will ensure that the same address is used every time, so you will be able to put it in your AP filter and get things in order.

NetworkManager.conf man page is very badly written when it comes to the description of some of the important parameters, like this one.