CONTROL4 UNIFI: Setting Up UniFi Face Detection and LPR (Licence Plate) Detection on Unifi Protect
Preparation
- Ensure that our UniFi Protect Controller driver is configured
- Ensure That the UniFI Controller and driver is running the latest update
- Ensure that both API and Login Connection Status is OK
- Ensure that Display Diagnostics shows no connection errors
- The Cameras must support the appropriate AI capabilities. If LPR and Face Detection is not supported, you can use a device such as a AI Port to add support
- For Face Recognition to work correctly, ensure faces are correctly tagged in UniFi Protect. Licence plates do not require tagging
Programming Using Licence Plate Recognition
To Program for Licence Plate recognition, we offer a few different variables which can be programmed against:
- LAST_LPR_DETECTED: Shows the Last Licence plate number which has been detected. If the Plate has been tagged with a name in UniFi Protect, the name might be used instead
- LAST_LPR_DETECTED_DATE: Shows a human readable date for when the Licence Plate was detected
- LAST_LPR_DETECTED_LINK: Provides a web address to the event. Normally not needed
- LAST_LPR_DETECTED_TIMESTAMP: Computer readable timestamp for when licence plate is detected
It is recommended to use Variable agent (found under Agents) to display the contents of the variables during testing, to identify what to program off.
Some example programming is below using the LAST_LPR_DETECTED_TIMESTAMP as a trigger for the programming
Programming Using Face Recognition
Unlike LPR, Face detection requires that faces are tagged with a name in the UniFi Protect software
To Program for Face Recognition, we offer a few different variables which can be programmed against:
- LAST_FACE_DETECTED:
Shows the last face which has been detected. The face must be tagged in UniFi Protect
- LAST_FACE_DETECTED_DATE: Shows a human readable date for when the face was detected
- LAST_FACE_DETECTED_LINK: Provides a web address to the event. Normally not needed
- LAST_FACE_DETECTED_TIMESTAMP: Computer readable timestamp for when face is detected
It is recommended to use Variable agent (found under Agents) to display the contents of the
variables during testing, to identify what to program off.
'
An example of programming is below
For convenience, you can set the Auto Create Events for Faces to Automatic. This will create Events automatically for each tagged face as they are detected
Related Articles
Control4 UniFi - UNVR NVR Stacking Support
At this time, UNVR Stacking is not supported by the Chowmain driver, and is strongly discouraged by Ubiquiti. Initial investigations have determined that there is limited support for stacked NVR's within the official API which affects control, and ...
Control4 UniFi: Manual Setup of UniFi Protect Device
Control4 UniFi: Manual Setup of UniFi Protect Device It is strongly recommended to use Auto Setup to correctly configure and add new devices instead of Manual Setup Ensure that UniFi Protect Controller has been added to project and is correctly ...
CONTROL4 UNIFI: Setting up Local Account / Login for Authentication
It is strongly recommended to set up a local login for UniFi Control. Whilst the UniFi API Key cannot be shared between Access and Protect/Network, the UniFi Login can. We use a combination of both login and API key to provide the best combination of ...
CONTROL4 UNIFI: Setup API keys correctly to avoid Error 401 / Unauthorised Error
Important Notice UniFi Access doesn't use the same API Key as UniFi Protect/Network. Keys created for Protect / Network will not work. If the incorrect key is used, you will get a 401 / Unauthorised error in API Connection Status Setting Up UniFi ...
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: ...