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

This guide should no longer be used and has been edited and 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: Network configuration | Home Assistant Developer Docs


78 Likes
Hassio instalaltion Wifi configuration
How To: Set a Static IP on Hass.io/HassOS
Wifi issues on HassOS
PSA: HassOS does not use the SD card for wifi settings or authorized_keys. [UPDATE: Now it can!]
Wlan0: link is not ready
Initial WiFi Configuration
How to edit files / network config from hassio CLI?
WiFi on RPi 4
Configure WiFi connection
Install Home Assistant OS stuck
HassOS with multiple network cards
Wi-Fi configuration file - Spaces in SSID and PSK
Nmcli device wifi connect error
Hass.io SSH login
Wifi, what the hell?
HASSIO on Hyper-V with two network cards
How to change DNS setting in Hassio
Home assistant not connecting to mosquitto mqtt
Network update ignores interface name
HassOS 4.14 in RPI3, BT not working
CLI not starting on new install
Umm...“Post http://hassio/homeassistant/start: dial tcp 172.30.32.2:80: connect: connection refused”
Newbie WIFI connection on HA on VM
Configure WiFi connection
Several topics: Restart server? Configure WiFi? Change port?
Home Assistant Nuc Wifi
Installing WiFi adapters in HA on Odroid N2+
No eth0 after install generic x64 image
Installing Home Assistant OS on a Mini-PC
Integration Solar inverter huawei 2000L
How to change static IP address
HA Intel NUC install on HP t620 ThinClient - no WiFi or Bluetooth
Lost Access to HA - Change IP
Using WIFI with blue (ODroid N2)
WIFI definitions on HASSIO
Network settings failed - Can I login to adjust these from the server? Last ditch hope
Setup VLAN and HA tutorial
Changing Connectivity to Wifi via cli
Stuck on Home Assistant Command line
Raspberry Pi image for Home Automation - Wifi setup!
Can't access my SD card after flashing HASSOS
Bad link to WiFi configuration documentation
Network problem on raspberry pi 4
HA on Wifi
Support Raspberry Pi Zero 2 W
How to disable wifi and bluetooth on new hass.io installation?
Systemmonitor on hassio wifi - no stats
Please add a feature of changing the wifi credentials after the home assistant is installed on a Rasperry pi without uninstalling it
HASSIO on NUC - My Journey
Realtek RT8191SU drivers missing?
Nabu Casa is not able to renew let's encrypt certificate
Integration Solar inverter huawei 2000L
No valid repository for https://github.com/home-assistant/addons
Can't connect to homeassistant:8123
Raspberry Pi 4 and WIFI
Wifi setup with Hass.io on NUC?
How to change IP address in CLI
HassOS on SSD
HASSIO Installation Issue - Preparing Hass.io (this can take up to 20 minutes)
How to configure wifi/ethernet after finished install?
Problema WIFI
After WIFI setup with static IP, no connecltion without LAN cable
HASS.IO - Wifi setup config file
Does hassio have to be a fresh install to assign a static IP
Can't add a wifi configuration to a pi4b without a usb
Installing Home Assistant on a RPi 4b with SSD boot

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