Easiest method for Wifi (or setting Static IP) on HassOS
If you are having problems creating a working network keyfile or importing the keyfile, this alternate method might work for you.
It could also be that you have some other problem so this is not a “cure-all” for your wifi/network issues.
NOTE: This method assumes you already have a working ethernet connection. Also, wifi is much more unreliable than ethernet and not recommended at all, but if you have no other choice…
The short version:
- Install the SSH & Web Terminal Addon from the Community Repo (thanks, @frenck!)
- Turn off protected mode for the addon.
- Open a connection to it and use nmcli to connect to your SSID.
1. Install the SSH & Web Terminal Addon from the Community Repo (this will NOT work with the official SSH Server addon)
Set “Protection Mode” to off for the addon (you can set this back on when you are done using nmcli). You can also set “Show in sidebar” to on if you want a link to the web terminal in your side panel.
Create a good username and password or use a public and private key pair.
If you choose to use a username and password, save some time by coming up with something unique since the addon will check against the haveibeenpwned database. If your password choice is found you’ll have to come up with a new one.
The ssl option is set to “true” by default. Change it to “false” if you aren’t using ssl.
Save and start the addon. It can take a minute to get going. Watch the addons logs below for any errors.
Connect with your prefered ssh client or click on Open Web UI to use the web terminal.
2. Connect to wifi using nmcli instead of importing your own profile. If you only want to set a static ip for your current connection, skip to Setting Static IP further below.
First, confirm that your wifi is enabled using:
Now scan and list available wifi access:
nmcli device wifi rescan
nmcli device wifi
Connect to wifi:
Use quotes around your ssid and password:
nmcli device wifi connect "YOUR_SSID" password "YOUR_WIFI_PASSWORD"
This will try to connect to your SSID and will generate a network profile for you if successfull.
The output will be similar to
"Device 'wlan0' successfully activated with...."
Then check your connections again:
nmcli con show
You should be seeing at least two profiles and both green.
If you are seeing some profiles you’d like to get rid of you can remove them using:
nmcli connection delete CONNECTION_NAME
These may have two separate ip addresses on your network: one for ethernet, one for wifi.
You can check the ip addresses using:
ip addr show
Now connect to
http(s)://your_wifi_ip:8123 in your browser.
That’s it! Now you have two connections which are properly formatted. You can edit them interactively with further use of nmcli (for setting static ip, for example).
3. Set a Static IP with nmcli (optional) :
nmcli connection show to list your connections
nmcli con show "Your Connection Name" to list the current properties of that connection
nmcli con edit "Your Connection Name" to enter edit mode for that connection
nmcli> print ipv4 will show you the ipv4 properties of that connection
To add your static IP address (select ‘yes’ for manual method);
nmcli> set ipv4.addresses 192.168.1.10/24 Do you also want to set 'ipv4.method' to 'manual'? [yes]:
If you like, you can also edit set the dns server and local gateway while you’re here:
nmcli> set ipv4.dns 188.8.131.52 nmcli> set ipv4.gateway 192.168.1.1 nmcli> save nmcli> quit
Finally, you should follow this with a full reboot using
hassio ho reboot