Configure WiFi connection

Unfortunately this did not work…which makes no sense.

nmcli radio

shows that I have wifi adapter (shows Enabled), as do all 4 columns/settings (all show Enabled)

nmcli con show

shows an entry for wireless with a UUID – but the adapter has just – showing and it is White - whereas the Ethernet is Green.

I am dumbfounded and lost.

Curtis

This worked for me from an SSH terminal while device was still on eth0. You just invoke it as

ha network update ... (also removing the extra space before ipv6-method)

Launch a reboot, disconnect ethernet cable, and there she is on WiFi!

Hello. I’ve tried this method, and I get this on network info:
vlan: null
wifi: null

I’m using a mini PC. Any ideas of what’s happen?
Thanks in advance.

Thank you!! My desktop is MacOS, and it will not remount the flashed SD card without repairing the file system, which makes it unbootable. I was thrashing around with the CLI before reading this, works great! Thank you again!!

Thanks. This worked as expected and is way better way to set up WIFI than going through USB stick configuration file.

How can I delete previous WiFi connections & PSKs?

HA 2022.9.0b I have the WiFi set up and working on a Pi 4b. I use it as a connection to a sandboxed network however if the access point is not available it connects to previously connected AP. This is not desirable, but I see no way to “forget” previous connections.

Running HA 2022.9 on rpi3B, I can’t get make the switch from connected eth to wlan; I tried several things:

  • on UI (Settings->system->network) setting wlan IP4 fixed IO and ssid fails on save and all entered is forgotten.
  • above (@vctr) suggested HDMI connects fails; there is no HDMI signal; apparently not enabled on HA.
  • ssh (over eth) and ssh app are working, but above suggested nmcli command is not present
  • Suggested (HA doc on github) boot device file /CONFIG/network/my-network gets completely erased after booting the rpi, including the directories. Has boot changed since 2 years?
  • adding a network-config file to root of boot fat partition appears to be ignored, but I’m unsure as I cant see or log boot console output.

I have the impression that quite a lot has changed since past years, and solutions that did work, no longer do.
Any pointers to uptodate docs?

did you figure out a solution?

How to configure a wifi adaptor from the HA> CLI:-

This worked for me:

  1. Connect the raspberry pi or NUC or whatever to HDMI (to display the cli) and power on
  2. Wait for the Home Assistant OS to boot (you should see some loading things on the monitor)
  3. When launched one will see the CLI (with the prompt ha >), type in the following command: ‘network info’ and find your wifi interface name (mine was wlan0)
  4. Run the following command ‘network update <interface, for me was wlan0> --ipv4-method auto – ipv6-method auto --wifi-auth wpa-psk --wifi-mode infrastructure --wifi-ssid(space)then the SSID<wifi name, in quotes if there’re spaces> --wifi-psk(space)then the wifi password’

This allowed me to connect my NUC onboard wifi to my wifi network without going through the config file.

It’s worked for me twice now - however, make sure you put in everything above including the --'s and -'s and spaces.

Good luck…

6 Likes

Hi, thanks for this, it seems to have worked for me. Since it took a few tries, I thought I’d post the precise syntax as an example; names have been changed to protect the innocent.

ha network update wlan0 --ipv4-method auto --ipv6-method auto --wifi-auth wpa-psk --wifi-mode infrastructure --wifi-ssid MAGICBUS --wifi-psk OOMPAH
3 Likes

Thanks, this worked for me! Just defining the --wifi-ssid <wifi_name> and --wifi-psk <wifi_password> wouldn’t work - had to run the entire line in 4! :slight_smile:

nice concise , to the point answer that works !