Works with

How it works
Every Frigate project here uses the same 2 inputs: an RTSP camera stream for Frigate to watch and an MQTT broker for Frigate to report on. You set them up once for all projects. Boxes like the ones in Figure 1 mean the stream and the detector both work.
With a real camera, Frigate reads the camera’s own RTSP address. Without one, a looped recording tests the full detection pipeline: a systemd service (a background program run by systemd, the Linux service manager) on a second computer plays the video in a loop with FFmpeg and publishes it through MediaMTX, the RTSP server in this setup.
- On the stream host, an FFmpeg feed service publishes the looped video to MediaMTX, which serves it over RTSP on port 8554.
- Frigate on the Raspberry Pi 5 reads the RTSP stream, and the DEEPX NPU runs the detection model.
- Whenever a tracked object appears, changes or ends, Frigate publishes a JSON message to
frigate/eventson the Mosquitto broker, port 1883. - Python listener services on the Raspberry Pi 5 subscribe to that topic, act on the events they care about and publish their own alerts.
Each project adds only its own pieces: a camera, sometimes a model or a zone, and sometimes a listener. Its config fragment is a small YAML file with those pieces, and a merge script folds each fragment into one shared config.yaml instead of keeping one file per project.
Requirements
Finish these pages first, in order: the AI HAT+ quickstart, then set up Frigate with the DEEPX NPU.
Hardware
- Raspberry Pi 5 with the Sixfab AI HAT+ (DEEPX DX-M1M)Runs Frigate and the listeners. Tested on a Raspberry Pi 5 (8 GB) with Raspberry Pi OS Trixie (64-bit); last tested October 5, 2026.Shop
- Camera inputAn RTSP camera or stream, at
[RTSP_URL]. Tested with a live IP camera over RTSP. - Stream hostOptionalOnly for test feeds: an always-on computer on your network that runs the feed services. Tested on an ALPON X4 edge computer on the same network.
- Broker hostAn always-on computer on your network that runs Mosquitto. Tested on the same ALPON X4 as the stream host, port 1883.
Software
- Mosquitto and its clients
mosquittoandmosquitto-clientsfrom the OS package repository; version not recorded. - MediaMTXv1.21.1, linux arm64 build; the archive ships with the project releases.
- FFmpegInstalled at
/usr/bin/ffmpeg; version not recorded. - Python 3 with
venvsupportThe listener installers putpaho-mqttinto a virtual environment withpip; version not recorded. - The project repository
git clone https://github.com/sixfab/sixfab-dx-frigate, then work from[REPO_DIR]. The feed units come from each project’s GitHub release.
DEEPX support is not in a stable Frigate release
DEEPX support was merged into Frigate’s dev branch on September 21, 2026 (PR #24336) and is not in a stable release yet; the latest stable release is v0.18.0 (September 12, 2026). Sixfab develops and maintains DEEPX support in Frigate (Frigate’s DEEPX NPU detector docs).
Use the image ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64 from GitHub Container Registry: Frigate’s own build of commit af0ba19 on the dev branch of the official Frigate repository, not a Sixfab-compiled image on Docker Hub. It is MIT licensed.
Install
Set up broker and RTSP server
Run on [STREAM_HOST], which in this setup is also [BROKER_HOST]. Mosquitto gives an MQTT broker on port 1883 and MediaMTX an RTSP server on port 8554.
-
Install Mosquitto
sudo apt-get update -qq && sudo apt-get install -y -qq mosquitto mosquitto-clients -
Create broker config
Save these 2 lines as
local.conf. The broker then listens on port 1883 on every interface and accepts anonymous clients:listener 1883 0.0.0.0 allow_anonymous true -
Install config and start Mosquitto
sudo mkdir -p /etc/mosquitto/conf.d sudo cp local.conf /etc/mosquitto/conf.d/local.conf sudo systemctl enable --now mosquitto sudo systemctl restart mosquittoThe broker has no password. Keep it on a trusted local network; see Privacy.
-
Install MediaMTX
Install the MediaMTX binary (v1.21.1, linux arm64 in the tested setup) and its
mediamtx.yml, then run it as amediamtxsystemd service and enable it. MediaMTX listens for RTSP on port 8554 (rtspAddress: :8554inmediamtx.yml).
Both services report active (running) and enabled (Figure 2). The mediamtx log lines show RTSP sessions opening, so the feed server is taking connections.

Choose camera input
An IP camera that streams RTSP can serve as a Frigate camera input; the projects were tested with a live IP camera over RTSP. Take its RTSP address from the camera’s manual and use it as [RTSP_URL] in the camera’s ffmpeg input. Many IP cameras need a user name and password in the RTSP address. Frigate accepts them there, but a camera with credentials was not tested.
A looped video served over RTSP replaces a camera for testing. Run on [STREAM_HOST]. Each feed is a systemd unit that runs FFmpeg and publishes to a MediaMTX path. This is the bird feed’s command:
/usr/bin/ffmpeg -nostdin -re -stream_loop -1 -i [VIDEO_FILE] \
-c:v libx264 -preset veryfast -tune zerolatency -pix_fmt yuv420p -g 50 \
-c:a aac -f rtsp -rtsp_transport tcp rtsp://127.0.0.1:8554/bird
-re reads the file at its native frame rate and -stream_loop -1 repeats it without end. The unit uses Requires=mediamtx.service, Restart=on-failure and RestartSec=5, and runs as the user in its User= line. The units in the releases use a fixed user name and fixed home-directory paths from the test hosts: change the user, the file path and the stream path to match your host, then install and enable the unit:
sudo cp [FEED_SERVICE].service /etc/systemd/system/[FEED_SERVICE].service
sudo systemctl daemon-reload
sudo systemctl enable --now [FEED_SERVICE].service
The project releases ship 3 feed units: bird-rtsp-feed (path bird), porch-rtsp-feed (path porch) and squirrel-rtsp-feed (path squirrel). The squirrel unit copies the video stream with -c:v copy instead of re-encoding it.
A USB webcam can feed Frigate if FFmpeg restreams it to rtsp://[STREAM_HOST]:8554/[STREAM_PATH]. The face recognition project used a Logitech C270 this way on a separate host. The repository has no unit for it, so there is no webcam command here: use the looped test stream unit as a model and point FFmpeg at your camera.
Check the stream from the Raspberry Pi 5 before you edit the Frigate config. If ffprobe reports the stream (Figure 3), Frigate can read the same address:
ffprobe [RTSP_URL]

ffprobe on the Raspberry Pi 5 reports an H.264 stream at 1920 × 1080 and 15 fps.Connect Frigate to broker
Run on the Raspberry Pi 5. Add one mqtt block to [FRIGATE_CONFIG_DIR]/config.yaml, once for all projects. The deployed config used these keys:
mqtt:
enabled: true
host: [BROKER_HOST]
port: 1883
topic_prefix: frigate
Add project’s camera to shared config
Run on the Raspberry Pi 5. Every project ships a config/fragment.yaml with its camera and, for projects with their own model, a models entry. Each listener is a Python script that subscribes to Frigate’s MQTT messages and keeps the broker address in a BROKER constant at the top of the script.
The project’s install.sh backs up config.yaml, merges the fragment with toolkit/merge_config.py and installs the listener:
- It reads
BROKER=[BROKER_HOST]from the environment and writes it into the installed copy of the listener script. WhenBROKERis unset, the Boss Detector and squirrel installers ask for the broker address, while the Porch Pirate installer defaults to127.0.0.1, which reaches no broker in the tested layout: run it withBROKER=[BROKER_HOST]. - It creates a virtual environment, installs
paho-mqttand installs the listener unit under~/.config/systemd/user/as a user-level systemd service, which runs under your own account instead of root. - The Boss Detector, Porch Pirate and squirrel installers also reload systemd and enable the unit with the 2 commands in Manual install.
Back up config.yaml, merge the fragment and replace the file:
cp [FRIGATE_CONFIG_DIR]/config.yaml [FRIGATE_CONFIG_DIR]/config.yaml.bak-$(date +%Y%m%d%H%M%S)
python3 [REPO_DIR]/toolkit/merge_config.py [FRIGATE_CONFIG_DIR]/config.yaml [REPO_DIR]/[PROJECT_PATH]/config/fragment.yaml [FRIGATE_CONFIG_DIR]/config.yaml.new
mv [FRIGATE_CONFIG_DIR]/config.yaml.new [FRIGATE_CONFIG_DIR]/config.yaml
For a listener, set its BROKER constant to [BROKER_HOST], install its unit under ~/.config/systemd/user/, then reload systemd and enable it:
systemctl --user daemon-reload
systemctl --user enable --now [LISTENER_SERVICE].service
The merge rules:
- Top-level settings from the fragment win, and nested dictionaries merge recursively.
modelsentries match bypath. The same path replaces the entry; a new path is appended, so a rerun adds no duplicates.camerasmerge key by key. A camera with the same name is replaced, and other cameras stay untouched.- The script rewrites
config.yamlwith a YAML library, which drops any comments in the file. Keep your own notes elsewhere.
Restart Frigate, then confirm a live image in the Frigate UI at https://[PI_IP]:8971:
docker restart frigate
User-level services stop at logout. To start the listener at boot without a login, run this once; it asks for your password:
sudo loginctl enable-linger $USER
Verify
Run each check on the host the table names. Open Frigate in a browser only at https://[PI_IP]:8971, the authenticated port: Frigate treats port 5000 as unauthenticated, admin-level access.
| # | Check | Run on | Command | Expected |
|---|---|---|---|---|
| 1 | Feed reachable | Raspberry Pi 5 | ffprobe [RTSP_URL] | Stream details for the feed |
| 2 | Broker running | [BROKER_HOST] | systemctl status mosquitto | active (running) |
| 3 | Feed service running | [STREAM_HOST] | systemctl status [FEED_SERVICE] | active (running) |
| 4 | Frigate stats | Raspberry Pi 5 | docker exec frigate curl -s http://localhost:5000/api/stats | A JSON stats response from Frigate |
| 5 | Frigate events | Any computer that reaches the broker | mosquitto_sub -h [BROKER_HOST] -t frigate/events -v | One JSON message each time Frigate tracks an object |
| 6 | Listener alerts | Any computer that reaches the broker | mosquitto_sub -h [BROKER_HOST] -t [ALERT_TOPIC] -v, with the topic from Listener alert topics | One JSON message each time the project’s listener fires |
For Porch Pirate, check 6 is:
mosquitto_sub -h [BROKER_HOST] -t porch_pirate/theft_alert -v

If no alert arrives, see Troubleshooting.
Details
Tested layout
In the tested setup the feed and the broker ran on a second computer:
Stream host (any RTSP source) Raspberry Pi 5 (Sixfab AI HAT+)
+------------------------------------+ +-----------------------------------+
| looped video -> FFmpeg (systemd) | | Frigate NVR |
| MediaMTX RTSP server, port 8554 |------>| cameras read rtsp://...:8554/.. |
| Mosquitto broker, port 1883 |<----->| publishes frigate/events |
| | | Listener services (Python) |
+------------------------------------+ +-----------------------------------+
Frigate event messages
Frigate publishes one JSON message on frigate/events for each change to a tracked object (Frigate MQTT docs), not one per detected object. The Boss Detector, squirrel and Porch Pirate listeners read these fields:
| Field | Used for |
|---|---|
type | new, update or end. Boss Detector acts on new and update, the squirrel listener acts on the first new, and Porch Pirate also watches end |
after.label | The object class, such as person |
after.camera | The Frigate camera name |
after.id | The tracked object ID, used by the squirrel and Porch Pirate listeners to follow one object |
after.top_score or after.score | The detection score, compared with a minimum |
Boss Detector and the squirrel listener add a per-camera cooldown, so a repeat sighting within the cooldown window does not fire again. Boss Detector’s cooldown is 5 s. The bird camera needs no listener: Frigate publishes one topic per species, frigate/birdfeeder/[SPECIES], and frigate/birdfeeder/all counts every bird in view.
To print events as formatted JSON (Figure 5), pipe the subscription through jq. Leave out -v: it adds the topic name in front of each message, and jq then cannot read it.
mosquitto_sub -h [BROKER_HOST] -t frigate/events | jq

Listener alert topics
Each listener publishes its own alert as JSON:
| Project | Topic | Fields | Published when |
|---|---|---|---|
| Boss Detector | boss_detector/alert | camera, score, timestamp | A person is detected, at most once every 5 s per camera |
| Squirrel sprinkler | squirrel_sprinkler/trigger | camera, score, timestamp | A squirrel is detected |
| Porch Pirate | porch_pirate/theft_alert | camera, box_id, suspect_person_id, dropped_by, dropped_score, timestamp | porch_watch.py suspects a theft: an unrelated person appeared before a package disappeared |
The Porch Pirate fields are the camera, the package ID, the suspect’s track ID, the track IDs of the people seen dropping the package, the score and a timestamp.
What each project adds to the shared config
All projects share one Frigate container, one broker and one NPU (the DEEPX DX-M1M on the Sixfab AI HAT+ in the tested setup). A project’s install adds its pieces to config.yaml and does not replace the file. A .dxnn file is a model compiled for the DEEPX NPU, and COCO-80 is the standard set of 80 COCO object classes that many pretrained YOLO models detect.
| Project | What its fragment adds |
|---|---|
| Boss Detector | A camera on the porch feed and the yolov8n-ppu-coco80.dxnn model in the indoor_thermal scene |
| Porch Pirate | The porchpirate camera, the people-and-cardboxes.dxnn model in the indoor scene and a zone polygon |
| Squirrel detection | The garden camera and the squirrel-detector-model.dxnn model in the outdoor scene |
| Face recognition | The frontdoor camera, a models entry in the all scene and face recognition settings. Upstream Frigate lists AVX support as a requirement for face recognition, but it ran effectively on the Raspberry Pi 5 |
| Bird camera species ID | The birdfeeder camera and the nabirds-new-model.dxnn model (555 species classes) in the outdoor_thermal scene |
- Frigate’s
scenesetting takes one of 5 values:all,indoor,outdoor,indoor_thermalandoutdoor_thermal. Boss Detector usesindoor_thermalwithout a thermal camera, because it only needs an unused slot. The Frigate setup page explains how one DEEPX NPU runs several cameras and models. - One RTSP feed can serve more than one Frigate camera: Boss Detector’s camera and Porch Pirate’s camera are both configured for the
porchpath. Running both at the same time was not recorded. - Porch Pirate’s listener does not filter by camera, and Boss Detector’s listener alerts for people on every camera. The face recognition and Porch Pirate fragments both define a zone named
frontdoor_zone, so if both projects share one Frigate, a person at the face camera can trigger a false theft alert. Rename one of the zones.
Terms
- RTSP (Real Time Streaming Protocol) is how a camera or video server streams video over the network, at an address such as
rtsp://[STREAM_HOST]:8554/[STREAM_PATH]. - MQTT is a publish and subscribe messaging protocol. Frigate’s MQTT messages carry its events to your scripts.
- A broker, such as Mosquitto, is the server that passes each message to the programs subscribed to it.
- A topic is a message’s address on the broker, such as
frigate/events. - The DEEPX NPU (neural processing unit) is the chip on the Sixfab AI HAT+ that runs the detection model.
Limitations
- The tested setup ran the feeds and the broker on a second computer, with the scripts written for that two-machine layout. A Raspberry Pi 5 as stream or broker host is untested.
- The Mosquitto broker has no password and no TLS; a password setup was not tested.
- A looped recording tests the pipeline, not detection on a live scene.
- The listeners store the broker address in the script, so they lose the broker if DHCP gives the broker host a new IP address.
- The Boss Detector and squirrel listeners publish a placeholder alert to MQTT and write a log line. The real action, such as a sound or a sprinkler valve, is not wired in.
- Home Assistant is not tested with these projects.
- Frigate chooses the DX-RT version its DEEPX detector uses. The tested build pins DX-RT v3.4.0, and this setup cannot change it.
Privacy
These cameras can record people, so treat the video and the messages as personal data. Point cameras only at property you control, and tell people who enter the view that they are recorded.
Any device on your network that can reach the feed host or the broker can read your streams and messages, because neither service in this setup asks for credentials:
- The Mosquitto config sets
allow_anonymous true, and the listeners connect without a username or password. - MediaMTX’s default config allows the user
any, with no password and no IP limit, to publish, read and play back every path. - Frigate’s own MQTT topics, including its command topics, are on the same anonymous broker, so anyone who can reach it can also publish to them.
- Neither the feed server nor the broker uses TLS. Keep both services on a trusted local network and do not forward ports 1883 or 8554 to the internet.
Troubleshooting
Cause
Frigate cannot read the stream.
Fix
Run ffprobe [RTSP_URL] on the Raspberry Pi 5. If it fails, run systemctl status [FEED_SERVICE] on [STREAM_HOST].
Cause
The Mosquitto broker is not running or not reachable. A listener that cannot connect logs MQTT connection error, rc=<code>.
Fix
Run systemctl status mosquitto on [BROKER_HOST].
Cause
The listener service has stopped, Frigate publishes no events, or nothing the listener watches is on camera.
Fix
Check that the listener runs. A running service reports active (running), and at start it logs Connected to broker ([BROKER_HOST]:1883), listening on frigate/events:
systemctl --user status [LISTENER_SERVICE] --no-pager -n 30
Then confirm that Frigate publishes with mosquitto_sub -h [BROKER_HOST] -t frigate/events -v, and that a person, squirrel or package is actually on camera.
Cause
The listener holds a stale broker address in the BROKER constant of its installed script. The repository scripts carry the comment “can change via DHCP, verify first”.
Fix
Re-run the project’s install.sh with BROKER=[BROKER_HOST] to write the current address, or edit the constant and restart the service.
Cause
User-level services stop at logout unless linger is on.
Fix
Run sudo loginctl enable-linger $USER once.
Cause
The merged config is invalid; Frigate reports it as Config Validation Errors.
Fix
The install scripts save a copy before each merge as config.yaml.bak-[TIMESTAMP]. Restore the latest backup and restart Frigate with docker restart frigate.
Cause
dxrtd, the DX-RT (DEEPX runtime) daemon, restarted under a running Frigate. The dxrt.service unit runs the daemon, so systemctl status dxrt.service shows when it restarted.
Fix
Run docker restart frigate.
Next steps
License and credits
This page uses Frigate NVR, Eclipse Mosquitto, MediaMTX, FFmpeg and paho-mqtt. Each is third-party software under its own license, so check it before you redistribute it. Loop only a test video you hold the rights to.