Remove WiFI Connection after being setup in HA OS (HA reaching subnet from eth)

TL;DR: How to delete the WIFi password from HA to avoid it connecting to a WiFi network?

Hi,
I have Home Assistant OS installed on a raspberry pi4.
My home network is divided between main network with internet access, and a NAT-ted subnetwork for IoT stuff without Internet access. Each has its own set of ip ranges.
I originally thought it would be good idea to have my HA through ethernet to my internet network, and wifi connected to my subnetwork. However, I’ve since had too many problems with wireless dropping from time to time, which makes my devices go unavailable randomly.
Instead, I added routing on my main Router, which allows to properly go from main to subnetwork from ethernet.
Routing works fine as all my other devices in my main network work fine, but HA seems to have issues going that way.

In particular, my first issue is that my HA will a) always keep the WiFi connection Enabled.
image
I tried clicking disabled in that menu, but it immediately reconnects.
I guess is because I use Bluetooth in HA so the ‘wireless chip’ needs to be enabled. Fair enough.

But then my second problem is b) there’s no way to dissasociate my HA from the connected WiFi network.
I tried connecting to another WiFi with a wrong password to try to make it forget it, no result: it fallsback to the previous known valid network. I tried setting up a new temporary wifi with my phone, connect HA to it (success), and then removing the hotspot. same result: it falls back to the original wifi network.
I would like to avoid having to change the password from the IoT network, as I would need to change a lot of devices, but so far I’m unable to find a better solution.

  • Anyone knows how to achieve this? How to make HA OS ‘forget’ the known WiFi access point?

Thanks!

Bump with a TL;DR: How to delete the WIFi password from HA to avoid it connecting to a WiFi network?

Did you already try to delete the WiFi netwok profile via the command line?
You can access the CLI directly when you connect a display and keyboard to the RPi, but you can also access the CLI via the SSH & Web Terminal add-on.
A list with the currently defined network profiles will be shown when you type:

nmcli con show

In your case this probably will be an ethernet and a wifi profile.
You than should be able to delete the wifi profile by typing:

nmcli connection delete CONNECTION_NAME

(replacing CONNECTION_NAME with your wifi profile name).

1 Like

Thanks for the answer.

I tried exploring the nmcli connections, but I saw they were all refering to the ‘Supervisor’, as well as multiple wifi connections.
image
I wasn’t sure whether if I deleted the one with the device wlan0 from here, whether it would break something if, at some point, I wanted wifi back from the Network GUI tab in HA?
Or if because this is a HA OS installation, if wlan is only to be managed from another container or sub-system?

Thanks.

Why not simply disable in the GUI ?

image

Set IPV4 and IPV6 to disabled

It turns back on, not sure if only in my instance or not.
I have Bluetooth integration setup. If I click ‘disabled’ it will show like that, but if you do a quick F5/browser refresh it goes back to ‘automatic’. Also, through ssh-ing ‘ifconfig’ it is seen the interface is never down doing that.
Is the same behaviour for you?

“Supervisor” in the name is normal.
This is how it is for me:
nmcli_con_show_HAFOX_2_20230809
In my case only the ethernet profile is shown because I do not have a wireless connection.
I suppose that you are seeing those five wifi profiles due to your testing.
Probably the green one is the currently configured wifi connection.

Interesting.

I was confused first with nmcli, thinking it was modifying the network interfaces as in “ifconfig”, but now I understand that is the stored list of connections only. It truly is a “WTH?!” the fact that HA OS keeps an historical list of connections and its connection credentials stored, but those aren’t visible from the Network panel in HA GUI.

  1. So now I deleted all the ‘unused’ connections, and left only the active eth and wlan.
  2. Then I ‘disabled’ it from the HA OS GUI WLAN menu and… SUCCESS! The Wireless network remains disabled!. It disappeared from nmcli conn show, and ifconfig shows wlan0 without any connection details.

I did a full system reboot to validate and wlan remained disabled. So maybe this is a bug in HAOS (if more than one wlan connections are in the system, one of them still valid, then WiFi can’t be disabled from GUI)?

1 Like

nmcli” is the Debian version of the network manager command line interface, so it is similar to ifconfig.
See: NetworkManager and the nmcli man page NMCLI(1).

So in this case the command “con” is for the configured network connections.
From there you can show (list) the connections, but you can also modify, delete etc. So be careful!

But good that you did solve your problem :slightly_smiling_face:

1 Like