[Edge Driver] UniFi Protect Sensors

Hi everyone! I’m Patrick (YouTube @pattetech).

​Today I am releasing the first public version of my Edge Driver for UniFi Protect.

My goal with this project was not just to create another “video viewer,” but to unlock real automation potential with UniFi cameras.

:rocket: Key Features

​This driver leverages the local UniFi API via WebSocket to deliver:

​Motion Detection: Standard motion sensor capability for basic automation triggers.

​Granular AI Detection: Separate sensors for Person, Vehicle, and Animal.

​Occupancy Timeout (Debounce): Configurable in each camera’s settings. You can set a custom delay to keep the presence sensor “active” even after detection stops. Perfect for keeping lights on while you are sitting still!

​Privacy Mode: A dedicated switch that disables both the Recording and the Microphone of the camera.

​Sound Detector: Currently generic, but I plan to separate the specific detection types available in Protect in the future.

​Status LED Control: Turn the camera’s status light on/off via automations.

:gear: How It Works

Local Execution: Requires a SmartThings Hub.

​Architecture: The driver creates a “Controller” (Parent) device where you enter the IP/Username/Password of your UniFi OS (Local user recommended).

​It automatically discovers all cameras as child devices.

:warning: Important Notes

​Focus on Sensors: This driver is designed for Automation Triggers. Video streaming is not the main focus due to current SmartThings platform limitations regarding local streams.

​Requirements: UDM-Pro, UDM-SE, UNVR, or CloudKey Gen2+ running UniFi Protect.

Tested Cameras:

​G5 Flex
​G5 Dome
​G5 Dome Ultra
​G5 PTZ (Privacy Mode not currently working on this model)

:link: Channel Invitation Link: LINK HERE


Update (01/16/26): Sound Detection Support & Improvements! :speaker_high_volume:

Hey everyone, I’ve just released an important update for the driver with some new features that were missing from the original post.

What’s New:

  • :white_check_mark: Sound Sensor Capability: Cameras now expose the sound sensor capability in SmartThings.
  • :white_check_mark: Advanced Audio Types: The driver now identifies and differentiates audio events detected by Unifi AI (Smoke, CO, Siren, Baby Cry, Glass Break, Car Alarm, and Aggression).
  • :white_check_mark: Enhanced Connection Status: The “Bridge” (Controller) now starts as Offline and switches to Online immediately after being correctly configured, making troubleshooting easier.

The updated version is already available on the channel, and your hubs should receive it automatically.

Update (02/07/26): Doorbell Support & ONVIF Discovery

Two highly requested features are now available in the driver!

:bell: Doorbell Support The driver now correctly identifies UniFi Doorbells.

  • Button Press Events: “Ring” events are captured and pushed to SmartThings as a button press (pushed), allowing you to trigger automations instantly.
  • Note: I have verified this functionality with the Doorbell Lite.

ONVIF Camera Support (Experimental) I’ve added a new preference in the Controller settings: “Show ONVIF Cameras”.

  • By default, the driver only discovers native UniFi Protect cameras.
  • Enabling this option allows the driver to discover third-party ONVIF cameras that are managed by Protect.
  • Use Case: This is primarily needed for users with the UniFi AI Port, allowing AI detections from bridged cameras to potentially be exposed to SmartThings.

Other Improvements:

  • UI Cleanup: Removed non-functional video controls to keep the interface clean and focused on automation capabilities.
  • General Fixes: Improved stability for connection and event reporting.

:warning: Important: If you encounter any bugs or have suggestions for improvements, please let me know by replying to this topic! Your feedback is essential for us to keep improving the driver.

4 Likes

1 Like

Your link gives a 403 forbidden error.

Hi Paul, sorry, I made the correction. Please test.

1 Like

Thanks, It is working now.

1 Like

Update: Sound Detection Support & Improvements! :speaker_high_volume:

Hey everyone, I’ve just released an important update for the driver with some new features that were missing from the original post.

What’s New:

  • :white_check_mark: Sound Sensor Capability: Cameras now expose the sound sensor capability in SmartThings.

  • :white_check_mark: Advanced Audio Types: The driver now identifies and differentiates audio events detected by Unifi AI (Smoke, CO, Siren, Baby Cry, Glass Break, Car Alarm, and Aggression).

  • :white_check_mark: Enhanced Connection Status: The “Bridge” (Controller) now starts as Offline and switches to Online immediately after being correctly configured, making troubleshooting easier.

The updated version is already available on the channel, and your hubs should receive it automatically.

:warning: Important: If you encounter any bugs or have suggestions for improvements, please let me know by replying to this topic! Your feedback is essential for us to keep improving the driver.

1 Like

Olá Patrick, tudo bem? Como adicionar as câmeras Onvif para que elas também apareçam no Smartthings? Eu tenho aqui um Unifi Ai port que adiciona recursos de AI nessas câmeras, mas elas não aparecem no Smartthings! Obrigado.

Marcelo,

You can try this: go to the bridge and update it by pulling down. If it doesn’t appear, you may need to reinstall the driver.

I added the UFP-UP-AI-Port type.

Hello Patrick, I reinstalled the driver and the ONVIF cameras still do not appear. Not even the AI Port shows up. One detail: when configured, the AI Port adds the AI events directly to the ONVIF cameras, not to itself. I believe the ideal approach would be to add the ONVIF cameras themselves. I remember that in your video you mentioned they were not enabled because they do not have such events.

Hi Marcelo, since I don’t have the product, it’s a little harder to understand, but I’ll look into it to figure out what’s going on.

New features. Updates in the first post.