Changing Connectivity to Wifi via cli

Had a situation where a lightning strike took out my ethernet controller on my NUC unit running HAOS. I connected a keyboard and monitor and confirmed HA was starting up, but “Network Manager Wait Online” failed to start. This made it impossible for me to get in via ssh or the web interface. I then used a Ubuntu usb drive to boot the unit and confirmed the ethernet was unresponsive. However, I found the wifi was working properly. After many hours of searching, I used this process to change the access to wifi, and now all is well (except for my preference of using ethernet).

  1. Connect monitor and keyboard
  2. at the ha> prompt, enter: login
    (literally type in the word login, this will get you to a # prompt)
  3. To assure wifi is functioning, enter: nmcli radio
  4. Scan available wifi access enter: nmcli device wifi rescan
  5. List available wifi access enter: nmcli device wifi
  6. Connect to your wifi (incude quotes) enter: 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...."
  7. Show connections enter: nmcli con show
    There may be two separate ip addresses on your network: one for ethernet, one for wifi.
  8. Check the ip addresses enter: ip addr show
    Now connect to http(s)://your_wifi_ip:8123 in your browser.

At this point, I went in to the GUI to Settings>System>Network and changed the wifi address to the static ip address my ethernet had been using. That way, my Duckdns and Alexa connections all worked again.

Hope this helps some of you…4 or 5 hours of scrounging and trying. Huge thanks to this post were much of this came from:

13 Likes

You are awesome! I had no ETH on site, only WiFi and this got me going 100%!

Thank you!

Thanks for this… had a very similar situation where I lost functionality of my ethernet interface… your answer was exactly what I needed!

Exactly what I was looking for. Thank you so much. It worked.

thank you so much for such clear and easy infos!