Control4 UniFi Protect / Access / Network: Receiving Custom Webhooks

Control4 UniFi Protect / Access / Network: Receiving Custom Webhooks

This guide describes how to trigger actions in control4 based on custom UniFi Webhooks. This can be used to perform actions based on advanced UniFi triggers which may not be handled directly. 

Procedure

Warning
The Chowmain UniFi Drivers must be 20251215 or later. Custom Webhooks requires a local UniFi Controller

  1. Ensure that the Primary Control4 Controller utilises a static IP, or a reserved DHCP address. If the Control4 IP address controller changes IP, the UniFi applications may be unable to trigger the custom webhooks. Ensure that the latest firmware is in use by UniFi
  2. Log into the UniFi Controller. Select the correct Application (Protect, Network or Access)
  3. Open Alarm Manager. Please note, on some controllers, this may be found in a different location. For the latest info, check UniFi's documentation  
  4. Create an Alarm 
  5. Set the Alarm Conditions and name as required 
  6. Using the Custom Webhook URL Property in the Controller driver in Control4, set the webhook action. Change <CUSTOM_WEBHOOK_NAME> to a reference name to use. Set Delivery Method to "POST". It is not recommended to have spaces in the Delivery URL. Press Create 

Using the Webhooks in Control4

  1. Control4 provides 2 variables you can program against. The webhook url is capitalised (as an example, for 192.168.1.1/custom/Arrival, LAST_CUSTOM_WEBHOOK_NAME will contain "ARRIVAL". For more info about the current state, use Variables Agent  
  2. As an alternative, events can be used instead. Set the "Auto Create Events For Custom Webhooks" Property to "Automatic", and events will be created as they are triggered 

Alert
Some webhooks may trigger rapidly, and require a debounce using a timer (via the timer agent), to block the event being fired multiple times in a second. Ensure you test all webhooks




    • Related Articles

    • CONTROL4 UNIFI PROTECT: Trigger Custom Webhooks

      The Unifi protect application allows Custom webhooks to be created which Control4 can trigger. This provides a deeper level of integration with Unifi for less common commands or command flows. Custom Webhooks can be used for commands such as: ...
    • Control4 UniFi: Unifi Access Quick Setup

      The UniFi access integration enables basic control of doors and intercoms. Install all of the drivers It is recommended to use Drivers => Add Or Update Driver or Agent to install the drivers Use Ctrl+A or use the mouse to install and update all C4z ...
    • Control4 UniFi: Setup Unifi Doorbells

      Integration of UniFi Protect Doorbells UniFi Protect Doorbells such as the G4 Doorbell do not provide SIP access and cannot directly integrate using the Intercom/2-way interface. UniFi Intercoms however do support the ability to make calls outgoing ...
    • Control4 UniFi: Manual Setup of UniFi Access V2 Intercom

      Control4 UniFi: Manual Setup of UniFi Access Intercom Device It is strongly recommended to use Auto Setup to correctly configure and add new devices instead of Manual Setup UniFi Protect Intercom V1 is Deprecated. Ensure you are using UniFi Access ...
    • Control4 Unifi Protect: Quick Setup Guide

      The UniFi Protect driver provides a custom interface for managing UniFi Protect Recordings, cameras, sensors, and viewports. Intercoms are also set up via UniFi Protect. PLEASE NOTE: THE UNIFI PROTECT INTERFACE TO VIEW RECORDINGS IS EXPERIMENTAL AND ...