Unifi Protect Event Manager

Unifi Protect Event Manager: Time-Shifted Event-Based Video Recording

Hello! I wanted to share a quick project I created that helps me record videos from Unifi Protect based on triggers in Home Assistant.

While the default recording feature of the Unifi Protect integration works fine for capturing video going forward, I initially assumed the lookback attribute would allow me to record video from the past. However, that’s not the case:

“Target lookback period (in seconds) to include in addition to duration. Only available if there is currently an active HLS stream. Default: 0.”

This means you must actively record the stream for the lookback to function.

To solve this, I used the awesome work done by danielfernau/unifi-protect-video-downloader to build a lightweight web service that triggers video recording back in time and forward in time from a given event.

You can check my project here:

Key Features:

  • Trigger recordings from Home Assistant (or any REST call)
  • Capture footage from before and after an event
  • Manage multiple concurrent recordings
  • Great for door openings, motion events, or “record this interaction that happened 5 minutes ago” buttons.

Feedback is welcome! It’s the first release, and it’s working great for me. If you need to capture video based on events from the past into the future, give it a try!

1 Like