Frigate NVR
Frigate is an open-source NVR with real-time AI object detection. On the CM5, Frigate uses the Axelera Metis AX2520 AIPU as its detector backend, offloading inference from the CPU entirely and enabling low-latency detection across multiple camera streams.Axelera Metis setup
Configure the Metis M.2 AI accelerator before deploying Frigate.
Home Assistant integration
Connect Frigate events to Home Assistant via MQTT.
Prerequisites
/dev/axelera0present (created by the Axelera udev rule inmetis-setup.sh)frigateuser added to theaxeleragroup —metis-setup.shdoes this automatically/media/frigate/recordingsand/media/frigate/snapshotsdirectories created (the image script creates them under the@frigateBtrfs subvolume)- Mosquitto MQTT running at
127.0.0.1:1883(for Home Assistant event integration)
Configuration
Frigate’s configuration lives at/etc/frigate/config.yml. Below is the complete annotated configuration deployed by the image script.
/etc/frigate/config.yml
Configuration sections explained
mqtt
mqtt
Enables the MQTT integration so Frigate publishes detection events to the Mosquitto broker running on
127.0.0.1:1883. Home Assistant’s Frigate integration subscribes to these events for automations and notifications. Because both containers share host network, no port mapping is needed.detectors
detectors
Configures the Axelera Metis AX2520 as the inference backend via
type: axelera and device: /dev/axelera0. The CPU fallback detector is included but commented out — uncomment it only if Metis is not yet available. Using num_threads: 4 on the CPU fallback limits inference to four cores.database
database
SQLite database path on the
@frigate Btrfs subvolume. Storing it on the NVMe/SATA drive alongside recordings avoids hammering eMMC with write-heavy database operations.record
record
Continuous recording is enabled with a 3-day rolling retain window using
mode: motion — only segments containing motion are kept, reducing storage usage significantly. Detection events (clips of active objects) are retained for 14 days using mode: active_objects.snapshots
snapshots
JPEG snapshots of detected objects are enabled and retained for 14 days. Snapshots are written to
/media/frigate/snapshots, which is also exposed as a read-only Samba share (frigate-snapshots).objects
objects
Globally tracked object classes:
person, car, dog, cat, and package. Per-camera overrides can narrow or extend this list.cameras
cameras
Camera definitions are commented out in the default config. Add one block per camera, providing the RTSP stream URL and
detect/record roles. The Metis AIPU is fast enough to run detection at low fps (5 fps recommended as a starting point), keeping CPU overhead minimal.Adding a camera
Edit/etc/frigate/config.yml and add a camera block under cameras::
/etc/frigate/config.yml
Storage layout
| Path | Contents |
|---|---|
/media/frigate/recordings | Continuous recording segments (3-day rolling) |
/media/frigate/snapshots | Object detection snapshot JPEGs (14-day retain) |
/media/frigate/frigate.db | SQLite event database |
Both paths live on the
@frigate Btrfs subvolume mounted with nodatacow. Disabling copy-on-write is intentional — Frigate writes large sequential video files that do not benefit from CoW and perform better without it.Deployment
Frigate is deployed as a Podman quadlet unit. The quadlet file is placed in/etc/containers/systemd/ and picked up automatically by the systemd generator on daemon reload.
/etc/containers/systemd/frigate.container
docker-compose.yml
Ports
| Port | Protocol | Purpose |
|---|---|---|
5000 | HTTP | Frigate web UI |
8554 | RTSP | Restream proxy |
8555 | TCP/UDP | WebRTC live view |
Accessing the web UI
Openhttp://<cm5-ip>:5000 in a browser. The dashboard shows live camera feeds, recent detection events, and storage statistics.
Verifying Metis detection
Check that Frigate loaded the Axelera detector successfully:/dev/axelera0. If the device is missing, Frigate falls back to the CPU detector (if configured) or fails to start.