--- title: "UniFi Protect: scenario commands and triggers in Link’nX" description: "Control UniFi Protect from a Link’nX scenario: recording, privacy, chime, LCD message, and doorbell, motion, person, vehicle, sensor or leak triggers." canonical: https://wiki.can-nx.com/en/guides/link-unifi-protect-automation/ language: en product: Link’nX audience: - administrateur - installateur context: "Link’nX web: Actions and Triggers, unifi_protect type, declared Protect device" --- # UniFi Protect: scenario commands and triggers in Link’nX Context: Link’nX web: Actions and Triggers, unifi_protect type, declared Protect device In Link’nX, a UniFi Protect action sets the recording or privacy of a camera, rings a chime, displays a message on a doorbell screen or controls a status light. A UniFi Protect trigger starts a scenario on a doorbell ring, a detected motion, person or vehicle, a sensor opening or closing, or a leak. Intended for authorized installers and administrators. For commands and feedback on the KNX bus, follow the [Protect gateway guide](https://wiki.can-nx.com/en/guides/link-unifi-protect-gateway/). ## Before you start - The device is [declared in Link’nX](https://wiki.can-nx.com/en/guides/link-camera-devices/), with the right controller, its identifier and its kind. - You know the model’s capabilities: the command list is the same for all devices, whether or not the model can execute each command. ## Create a UniFi Protect action 1. Open **Actions → Add**. In **Select an action type**, choose **unifi_protect**: this is the label displayed in this list. Then fill in **Name**. 2. In **UniFi Protect device**, select the relevant declared device. 3. In **Command**, choose the function and fill in **Value** if it is requested. | Command | Value and target to check | | --- | --- | | **Set recording mode** | For a camera: **Never**, **Always**, **On detections** or **On schedule**. The detections or the schedule must be configured in Protect according to the chosen mode. | | **Set privacy** | For a camera: **On** or **Off**. This setting concerns privacy; check the recording mode separately. | | **Play chime** | Select the declaration of the relevant **Chime**. No additional value. | | **Set LCD message** | For a doorbell equipped with a compatible screen: text in **Value**. Enter only the message intended for visitors. | | **Set status light** | For a compatible camera or light: **On** or **Off**. The status light and the main light are separate functions. | 4. After changing the command, review the target and the value. **Off** is a valid choice, different from an empty field. 5. Click the **floppy disk at the bottom right** and wait for **Success!**. 6. To automate it, [add the action to the intended scenario](https://wiki.can-nx.com/en/guides/link-compose-scenario/). To edit or duplicate it, follow the [actions guide](https://wiki.can-nx.com/en/guides/link-action-edit/), in particular the confirmation of affected scenarios. **Never** and **Always** are recording mode choices, separate from the privacy command. Enabling privacy does not necessarily stop recording: for a privacy need, check the actual result on the image and sound with the installer. ## Create a UniFi Protect trigger 1. Open **Triggers → Add**. In **Select a trigger type**, choose **unifi_protect**, then fill in **Name**. 2. Select **UniFi Protect device**. 3. Choose **Event** according to the goal and the hardware. | Choice | Hardware or function to check | | --- | --- | | **Doorbell ring** | Compatible doorbell declared as a camera | | **Motion detected** | Camera with motion detection configured | | **Person detected**, **Vehicle detected** | Camera and the corresponding smart detection | | **Sensor opened**, **Sensor closed** | Relevant contact sensor | | **Leak detected** | Sensor with leak detection | 4. Save with the floppy disk and wait for **Success!**. 5. [Associate the trigger with the relevant scenario](https://wiki.can-nx.com/en/guides/link-compose-scenario/), with the desired actions, and check its activation and its conditions. The form chooses a device and an event: it does not add the function to the hardware and does not configure the detection rules in Protect. Detections already present in the history before startup do not count as new events. ## Check the result 1. Reopen the action or the trigger to review the device, the command and its value, or the event. 2. Have the scenario run, or produce the real event, then watch the device with the installer. **Success!** confirms the save, not the execution of the command or the reception of the event. ## Troubleshooting - Saving does not go through: check **Name**, the target and the command or the event. **Issue with value field. You need to enter a value.** indicates a command with a parameter but no **Value**: choose or enter it. Leave this field empty only if it is not requested. - The command has no effect: check the controller, the identifier and the kind of the declaration, then the actual function of the model. For the chime, target its own declaration; for the LCD message, confirm the compatible screen. Do not change a device’s kind just to try a command. - The scenario does not react: check the device actually at the origin of the event and its configuration in Protect, then the association with the scenario, its activation and its conditions. For a person or a vehicle, confirm the relevant smart detection. A device that is declared or online may still not send this event. If these checks have already failed, or if the Protect configuration steps are not established for the model, write to support@can-nx.com with the context, the hardware, the expected function and the tests carried out. Do not send a password, a token, a private export or personal images. French labels: choice **unifi_protect**, **Appareil UniFi Protect**, **Commande**, **Valeur**, **Définir le mode d'enregistrement → Jamais / Toujours / Sur détections / Sur planning**, **Définir la confidentialité**, **Définir le voyant d'état → Activé / Désactivé**, **Jouer le carillon**, **Définir le message LCD**; **Évènement → Sonnerie de la sonnette / Mouvement détecté / Personne détectée / Véhicule détecté / Capteur ouvert / Capteur fermé / Fuite détectée**.