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

This guide should no longer be used and has edited and the post archived.

HAOS has its own network manager and using nmcli can cause conflicts, causing further issues.

WiFi should instead be configured using the documentation here: operating-system/Documentation/network.md at dev · home-assistant/operating-system · GitHub


79 Likes

In my case using a Raspberry Pi Zero W with Hassio image 2.10, my wifi access point or SSID was not showing up in the list created by nmcli device wifi.

A few google searches later, I found a raspberry pi forum post hinting that the SSID that you’re trying to connect to with your Hassio install and CONFIG USB method, must have a channel<=10 on your Router.

I reflashed my SD card, plugged in the CONFIG USB, booted up and waited around 2 min and was then able to connect to hassio.local:8123. This finally solved my wifi connection setup problem!

5 Likes

This guide won’t work on a pi zero w obviously, since it requires ethernet.
But you have shared some good info I hadn’t seen yet.

Also, Hassio on a pi zero w is going to be a miserable experience. I tried it out.

Doesn’t work for me. The first part with the add-on already. It just doesn’t start an ssh server. Here is what’s in the log after starting the add-on:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 10-hassio: applying... 
[fix-attrs.d] 10-hassio: exited 0.
[fix-attrs.d] 50-ssh: applying... 
[fix-attrs.d] 50-ssh: exited 0.
[fix-attrs.d] 51-sudoers: applying... 
[fix-attrs.d] 51-sudoers: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------

Any idea what could be the reason? The original ssh add-on was not installed.

That’s only the beginning of the log. Are you hitting refresh? Are you saying it hangs at that point?

I don’t understand your claim that it obviously won’t work on a Pi Zero W, because in my case I had no ethernet and still managed to connect to wifi and get up and running.

However, I think that my remark is more pointed towards people trying get wifi working from the start. But also to point out that your router settings are important (it can work by just adjusting that alone, without doing anything on the Pi or CONFIG USB).

Just to elaborate:

  • First had the 2.10 Pi Zero W Hassio image flashed to my SD card and setup the CONFIG USB stick (FAT32 formatted with diskpart, and followed the HassOS network manual, specifically the WPA/PSK).
  • Connected a monitor and booted the pi, waited but failed to connect via hassio.local.
  • Found out it didn’t even show up in my Router’s connections (which can also be checked with Fing on your smartphone by scanning the same wifi network the CONFIG USB is trying to connect to).
  • Plugged the USB CONFIG stick out, and inserted a keyboard in.
  • Pressed Enter to log into Hassio with root
  • Typed in login to enter the core-shell, from which I was able to perform your nmcli commands
  • From there on followed my original post.
1 Like

Ah, ok, sorry, didn’t know I could see more by pressing refresh. Ok, now I saw at the end of the log FATAL: You need to set a password! -

EDIT: ok nevermind, I forgot to set the password for the web terminal. And now it actually works - I probably had to wait longer for the startup. Thanks for the refresh hint!

I meant this guide in particular, the way I wrote it. Without any internet connection you wouldn’t be able to download and install addons in the first place.

On a pi zero, you could directly access the host and use nmcli using a keyboard and monitor of course.

2 Likes

Thank you for the guide, it worked!

excellent! :tada:

im getting error when i try to connect my SSID
error: connection activation failed: (7) Secrets were required, but not provided.

2 Likes

Not sure what that is about. Have you tried a full reboot?

yes also tried with different sd card i get same error

Worked like a charm. Great thanks
If you set up your system as recommended you have to disable the default SSH server that listens on the same port.

Anyone with a Pi 3B+ have luck getting 802.11ac enabled with HassOS ?

1 Like

Has anyone had any luck with getting their WIFI to reconnect for scenarios where the SSID went away for a few moments? The only solution I have so far is a reboot :frowning:

1 Like

Thank you this is heaps easier than using a USB import

3 Likes

Holy SHI******************** finally i got wifi working you’re a genius thanks!!!

2 Likes

Thanks for the guide :+1:t3:

THIS RIGHT HERE IS THE ANSWER!!!
WiFi channel must be 10 or under on your router. Thank you @Anymal

2 Likes