Ethernet to Wifi failover - wpa_supplicant

So I decided to bite the bullet and reboot my Openhab system to test out the Wifi Failover. I have a heck of a time getting my Openhab system to fully boot up (Zigbee and Zwave devices all active), so when it is up, I like to leave it that way (and so does my wife :slight_smile: )
Anyway, after I was able to reboot the Openhab with the WPA_Supplicant configured as:

# WiFi configuration generated by openHABian
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
# Network configuration was created by wpa_passphrase to ensure correct handling of special characters
network={
	ssid="My iPhone 11"
	#psk="mypassword"
	psk=xxxxx
	key_mgmt=WPA-PSK
	priority=2
}

network={
	ssid="My Xfinity LAN"
	#psk="xyzzy"
	psk=xxxxxx
	priority=1
}

I was able to confirm that Openhab (or really the Raspberry) correctly switches over to the “My iPhone 11” Network and I can then ssh into Openhab (or access it over http) with the same openhabian.local address.

Obviously, any services that are on the other subnet are inaccessible to Openhab until it comes back online, but the main thing I am trying to do is use my Telegram Binding to send a notification that the power failed and it is on UPS backup - that works great :slight_smile:

Normally, you would want the main LAN to be the highest priority (highest number) but for testing did it the other way around.

I confirmed that the Openhab was using a different subnet (provided by my iphone hotspot) and Openhab services like Telegram and Tailscale were accessible (i.e. I logged in remotely into the Openhab from another network).

So in summary, it doesn’t appear that you can cause the Raspberry to pick up a new WPA_Supplicant without rebooting, but the test was successful and the Openhab does indeed failover to the Wifi and get an address from the my iphone and is remotely accessible.

At some point I may also add a UPS to the xfinity wifi router which has obvious advantages, but this is a cheaper solution that accomplishes the task.