I have 14 RPIs connected to my Router (Fritzbox 6591). 12 of them can connect with 5 GHz. But when I have a power loss or a reboot of my router, they all reconnect with 2.4 GHz after rebooting.
A second reboot of the RPIs brought them back to 5GHz but this interrupted my applications on these RPIs.
After quite some time of research in forums I found a solution to reconnect to my WLAN on the 5GHz network without rebooting. It only needs 2 nodes.
In few cases you have to run it twice
[{"id":"d93a61053c3c1138","type":"inject","z":"b0bb63dea1066d9a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":400,"wires":[["58724090944c5d8b"]]},{"id":"58724090944c5d8b","type":"function","z":"b0bb63dea1066d9a","name":"reconnect WiFi","func":"msg.payload = \"sudo ip link set wlan0 down && sleep 1 && sudo ip link set wlan0 up\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":420,"wires":[["22f1b275fb4fa70a"]]},{"id":"22f1b275fb4fa70a","type":"exec","z":"b0bb63dea1066d9a","command":"sudo","addpay":"payload","append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":570,"y":420,"wires":[[],[],[]]}]