Send commands to OpenWRT from another device


I have a network consisting mainly of Unifi AP's with unifi firmware. I also have one OpenWRT AP with the same ssid but not in mesh with the Unifi APs.

Whenever the Unifi APs goes down some devices pick the OpenWRT AP. Even though this is not a problem I would prefer to reconnect those devices to the Unifi AP as soon as it comes up.

I have a openHAB system where it's possible to detect if the AP's are up or down. openHAB allows me to send commands to Unifi but not to OpenWRT (there is no integration). But I can send http GET and POST commands from openHAB (equivalent to curl). Can this be used to send commands to openWRT ? How ?


Thanks. Tried to install but failed in 23.05.3. Apparently lua is not available (or changed name).

Install the luci-app-commands package. Create your own custom commands (or set the path to a script), enable public access and download the execution link.

It works using curl.