--- title: "UniFi Network action in Link’nX: client, WLAN, restart and PoE" description: From a Link’nX scenario, block or reconnect a UniFi Network client, enable a WLAN, restart a device or power-cycle a PoE port with the right MAC target. canonical: https://wiki.can-nx.com/en/guides/link-unifi-network-actions/ language: en product: Link’nX audience: - administrateur - installateur context: "Link’nX web: Actions, UniFi Network type, controller declared in the project and gateway" --- # UniFi Network action in Link’nX: client, WLAN, restart and PoE Context: Link’nX web: Actions, UniFi Network type, controller declared in the project and gateway A UniFi Network action in Link’nX sends a command to the UniFi console: block, unblock or reconnect a client, enable or disable a WLAN, restart a device or cut then restore power on a PoE port. Added to a scenario, it runs with that scenario. Intended for administrators and installers. These commands can interrupt communications: prepare the exact target with the network manager and plan the operation in the authorized context. For commands sent from the KNX bus, follow the [UniFi Network presence and KNX table](https://wiki.can-nx.com/en/guides/link-unifi-network-presence-knx/). ## Before you start - The UniFi Network console is [declared in Link’nX](https://wiki.can-nx.com/en/guides/link-unifi-devices/). - You have the confirmed target for each command: MAC address of the client or device, PoE port number or exact WLAN name. ## Create the action 1. Select the project and the gateway, then open **Actions → Add → UniFi Network**. 2. Fill in **Name**, required. 3. Select **UniFi Network controller(s) to control**. The list accepts several controllers and offers **Select all**. The same target is used for each of them: choose only those it corresponds to. 4. In **Target (client MAC / device ID)**, enter the target suited to the command, according to the table below. 5. Choose **UniFi Network command**. These seven commands do not require a **Value** field. 6. Click the floppy disk at the bottom right, wait for **Success!**, then check the list. 7. If the command must be run by a scenario, add the action to the [appropriate scenario](https://wiki.can-nx.com/en/guides/link-scenario-save/) and save it. Saving prepares the action without running it. ## Choose the command and its target | Displayed command | Target to prepare | Requested effect | | --- | --- | --- | | **Block client** | Client MAC address | Block its network access | | **Unblock client** | Client MAC address | Lift this block | | **Reconnect (kick) client** | Client MAC address | Force its disconnection so that it reconnects; its return is not guaranteed | | **Restart device** | MAC address of the UniFi device | Request its restart | | **PoE power-cycle port** | Device MAC followed by `_` and the port number | Cut then restore PoE power on the port | | **Enable WLAN** | Exact WLAN/SSID name | Request that this WLAN be enabled | | **Disable WLAN** | Exact WLAN/SSID name | Request that it be disabled | Entirely fictitious examples: `02:00:00:00:00:01` for a MAC, `02:00:00:00:00:02_3` for PoE port 3 of a device, `Fictitious SSID` for a WLAN. Replace them with the values confirmed for your installation. The general label **Target** covers several formats: use the one for the chosen command rather than an IP, a friendly device name or another identifier. - WLAN: enter the exact name. If several WLANs have the same name, have the target confirmed by support before using this automation. - PoE port: use the positive number confirmed by the installer, without deducing the numbering from the example. ## Edit the action or return to the previous state To edit or duplicate the action, follow [the action editor](https://wiki.can-nx.com/en/guides/link-action-edit/). Review the name, the controllers, the target and the command before saving. Deleting an action leaves the network in its current state. To lift a block or re-enable a WLAN, create or use the reverse command, **Unblock client** or **Enable WLAN**, in the authorized context. ## Check the result 1. Reopen the action and review the controllers, the target and the command. 2. Check that it is in the right scenario and that this scenario is saved. 3. After execution, check the result in the console of the network concerned: client blocked or reconnected, WLAN, device or PoE port. ## Troubleshooting - **Please provide the UniFi Network target (client MAC / device ID)**: fill in the target, required even for a command without a **Value** field. - The action is saved but no effect is observed: check the controller and site of the declaration, the target suited to the command, then the association with the scenario and its execution. Do not restart the device several times to test the path. - The WLAN name has changed: confirm the new name in the console, then update the actions and mappings concerned. If these checks have already been done, write to support@can-nx.com with the command, the symptom, the time and the tests carried out. Do not attach any password. French labels: **Contrôleur(s) UniFi Network à contrôler**, **Cible (MAC du client / ID de l'équipement)**, **Commande UniFi Network**, **Bloquer le client**, **Débloquer le client**, **Reconnecter (kick) le client**, **Redémarrer l'équipement**, **Redémarrer le port PoE**, **Activer le WLAN** and **Désactiver le WLAN**.