Wifi dropping out

This is happening since january/february 2025 roughly: Home Assistant will loose its wifi connection and not reconnect.

I have an automation which will reboot the Raspberry Pi 4 when it cannot ping the WiFi IP anymore (RasPi has LAN and wifi both connected).

I want to put wifi in the guest wifi and LAN in the home lan network, so Home Assistant has a leg in each. But wifi is too unstable at the moment.

When I ssh into the host (not in to Home Assistant), the following command also fixes wifi immediately: nmcli connection up "Supervisor wlan0"

Hence, to me, it looks like the raspberry pi is not trying anymore to connect for some reason.

nmcli connection modify my-network connection.autoconnect-retries 0 did not help, unfortunately.

I’m putting this out there in case anyone figured out some other fix for wifi issues on raspberry pi 4.

I would also be interested in an automation able to run “nmcli connection up”, if that’s possible, as it’s significantly less nuclear than a reboot.

I’m been having exactly the same issues over the past couple of weeks with my Raspberry Pi losing wifi which it needs to connect to my SolarEdge solar panel system. The LAN connection to my other systems is unaffected. Rebooting the entire system fixes the issue.