https://github.com/trowaflo/frigate-event-manager
Home Assistant custom integration for Frigate NVR — rich, intelligent notifications via HA Companion.
https://github.com/trowaflo/frigate-event-manager
frigate hacs hacs-integration home-assistant integration mqtt nvr
Last synced: 4 months ago
JSON representation
Home Assistant custom integration for Frigate NVR — rich, intelligent notifications via HA Companion.
- Host: GitHub
- URL: https://github.com/trowaflo/frigate-event-manager
- Owner: trowaflo
- License: mit
- Created: 2026-03-06T20:02:38.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-03-23T13:21:13.000Z (4 months ago)
- Last Synced: 2026-03-23T16:37:49.720Z (4 months ago)
- Topics: frigate, hacs, hacs-integration, home-assistant, integration, mqtt, nvr
- Language: Python
- Homepage:
- Size: 348 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

[](https://github.com/trowaflo/frigate-event-manager/releases)
[](https://github.com/trowaflo/frigate-event-manager/actions/workflows/validation.yml)
[](https://codecov.io/gh/trowaflo/frigate-event-manager)
[](https://hacs.xyz)
[](https://github.com/trowaflo/frigate-event-manager/blob/main/LICENSE)
# Frigate Event Manager
Home Assistant integration that listens to [Frigate NVR](https://frigate.video) events via MQTT,
applies configurable filters, and sends rich notifications to the HA Companion app.
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=trowaflo&repository=frigate-event-manager&category=integration)
## Features
- **Per-camera configuration** — each camera is an independent config entry with its own filters, throttle and notification settings
- **Smart filtering** — filter by zone, object label, time of day and severity (`alert` / `detection`)
- **Anti-spam** — configurable cooldown (per camera) and debounce to group rapid detections
- **Rich notifications** — snapshot, clip and preview URLs (presigned HMAC-SHA256), action buttons, iOS critical alerts
- **Silent mode** — mute a camera for a configurable duration directly from the notification
- **Jinja2 templates** — fully customisable title, message and critical condition
## Prerequisites
- Home Assistant 2024.11+
- [Frigate NVR](https://frigate.video) with MQTT enabled
- MQTT broker integrated in Home Assistant (`Settings > Devices & Services > MQTT`)
- [HA Companion app](https://companion.home-assistant.io/) for mobile notifications (optional — `persistent_notification` is also supported)
## Installation
### Via HACS (recommended)
1. Click the button above, or open HACS → Integrations → ⋮ → Custom repositories
2. Add `https://github.com/trowaflo/frigate-event-manager` — type **Integration**
3. Install **Frigate Event Manager**
4. Restart Home Assistant
### Manual
Copy `custom_components/frigate_event_manager/` to your `/custom_components/` directory and restart.
## Configuration
Go to **Settings → Devices & Services → Add integration → Frigate Event Manager**.
The setup wizard has 5 steps:
| Step | What you configure |
| --- | --- |
| **Connection** | Frigate URL, notification target (`notify.mobile_app_xxx` or `persistent_notification`) |
| **Camera** | Camera to monitor, MQTT topic |
| **Filters** | Zones, object labels, disabled hours, severity (`alert` / `detection` / both) |
| **Behaviour** | Cooldown (s), debounce (s), silent duration (min), tap action, 3 action buttons |
| **Notifications** | Title template, message template, critical condition, sound and volume |
Repeat for each camera. Reconfiguration is available from the integration options at any time.
## Entities per camera
| Entity | Type | Description |
| --- | --- | --- |
| Notifications | `switch` | Enable / disable notifications for this camera |
| Motion | `binary_sensor` | `on` when a Frigate event is active |
| Active silence | `binary_sensor` | `on` while the camera is silenced |
| Silent mode | `button` | Activate silence for the configured duration |
| Cancel silence | `button` | Cancel an active silence immediately |
| Silence end | `sensor` | Timestamp when notifications will resume |
## Notification templates
Title, message and critical condition support [Jinja2 templates](https://www.home-assistant.io/docs/configuration/templating/).
Quick examples:
```jinja2
{# Title #}
{{ label | title }} — {{ camera | replace('_', ' ') | title }}
{# Message #}
{{ severity | upper }} at {{ start_time | timestamp_custom('%H:%M') }}{% if zones %} · {{ zones | join(', ') }}{% endif %}
{# Critical — alert only #}
{{ severity == 'alert' }}
```
Full variable reference and filter examples → [`docs/notifications.md`](docs/notifications.md)
## Action buttons
Up to 3 action buttons can be configured per camera:
| Value | Behaviour |
| --- | --- |
| `clip` | Opens the event clip (presigned URL) |
| `snapshot` | Opens the snapshot image |
| `preview` | Opens the animated preview |
| `silent_30min` | Silences the camera for 30 minutes |
| `silent_1h` | Silences the camera for 1 hour |
| `dismiss` | Dismisses the notification |
When all buttons are set to `none`, a default **Silence 30 min** button is added automatically.
## Media URLs (presigned proxy)
Notification media links (snapshot, clip, preview) are served through **HA's own HTTP server**, not directly from Frigate.
### How it works
When the integration starts, HA generates an ephemeral HMAC-SHA256 signing key (32 random bytes, in memory only, never stored). The key **rotates automatically every 24 hours** — no restart needed. Each media URL contains a slot ID (`kid`) so the correct key is used for verification:
```text
https:///api/frigate_em/media/api/events//snapshot.jpg?exp=&kid=&sig=
```
When the mobile app opens the link, HA verifies the signature and expiry, then proxies the request to Frigate internally. **Your mobile app never needs direct access to Frigate.**
URLs expire after a configurable TTL (default **1 hour**, adjustable in the connection step: 5 min → 24 h). All invalid or expired URLs return a generic `404` — no information about why the request failed is exposed to the caller.
When a URL with an **invalid or forged signature** is rejected, the integration automatically:
- Logs a `WARNING` in the HA logs (path + client IP)
- Fires a `frigate_em_security_event` event on the HA event bus
- Creates a **persistent notification** in the HA frontend
You can build an automation on this event to alert on suspicious activity:
```yaml
automation:
trigger:
platform: event
event_type: frigate_em_security_event
action:
service: notify.mobile_app_your_phone
data:
title: "Frigate EM — suspicious request"
message: "Invalid URL from {{ trigger.event.data.ip }}"
```
### Prerequisite
HA's URL must be configured in **Settings → System → Network**. The integration uses the external URL first, then the internal URL as a fallback.
- **External URL set** → works from anywhere
- **Internal URL only** → works only on your home network
- **Neither set** → presigned URLs are disabled entirely and no media links are included in notifications
### Why not use Frigate's native proxy?
The official Frigate HA integration links directly to Frigate URLs. This integration signs URLs through HA instead, so:
- Only HA needs to be reachable from outside (standard setup for remote push notifications)
- Frigate can stay fully isolated on your local network
- No Frigate credentials are exposed in notification payloads
## License
[MIT](LICENSE) — © 2026 trowaflo