Pidiylab Logo

Pidiylab Title

Frigate NVR on Raspberry Pi 5 with Coral USB & Home Assistant

Published:

Updated:

Author:

Frigate nvr on raspberry pi 5 with coral usb & home assistant

Disclaimer

As an affiliate, we may earn a commission from qualifying purchases. We get commissions for purchases made through links on this website from Amazon and other third parties.

Introduction

You’ve probably got at least one Wi-Fi camera watching your porch, right? And you’ve definitely noticed how those “smart” cameras aren’t all that smart when they alert you every time a leaf flutters. Now toss in the fun of sending your family’s backyard footage to some mystery server in another country, and yeah—suddenly this whole smart surveillance thing doesn’t feel so sharp.

That’s why folks like us have started going local. I’m talking about running Frigate NVR right on a Raspberry Pi 5, using Coral USB Accelerator to speed up detection, and tying it into Home Assistant to automate the whole setup. No cloud. No subscription. No nonsense.

You want fast, local object detection? You want to know when a person’s on your driveway—not just that something moved? You want to do it without handing over your data or spending $500 on a NUC?

Then this setup’s for you.

Choosing the Right Hardware Setup

Why Raspberry Pi 5 Works Now (and Pi 4 Didn’t)

Let’s clear this up: Frigate can run on a Pi 4, but it’s going to choke hard once you throw in more than one camera or crank up resolution. Enter the Raspberry Pi 5: four 64-bit Cortex-A76 cores, PCIe interface (finally usable via FFC connector), and real USB 3.0 bandwidth.

You’re looking at 2–3× better CPU performance, which matters when you’re dealing with video streams and ffmpeg processes constantly hammering your system.

Coral USB: The Inference Workhorse

Here’s the deal: object detection models need a lot of number crunching. Without Coral, your Pi’s CPU will be running detection slower than your uncle’s dial-up connection.

The Google Coral USB Accelerator plugs in and handles all the Edge TPU inferencing. It uses TensorFlow Lite models compiled specifically for the TPU. It’s about 10x faster than running detection on the CPU—and doesn’t melt your Pi doing it.

Important: The Coral requires a stable USB 3.0 connection. Plug it directly into the Pi’s blue port. Avoid USB hubs unless you have a powered one that doesn’t mess with bandwidth.

Use an SSD. Period.

Don’t even think about logging camera events or storing 1080p video on a microSD. That’s how SD cards die painful, early deaths. Pick up a USB 3.0 SSD enclosure and a 256GB+ SSD. Format it EXT4, mount it under /media/frigate, and let your clips live in peace.

Don’t Skimp on Power or Cooling

The Pi 5 draws more power than any previous model. You need a 27W USB-C PD power supply, especially if you’re powering SSDs and Coral.

And yes, thermal throttling is real. With ffmpeg decoding streams and Coral warming things up, your Pi can hit 80°C without active cooling. Use a case with a fan like Argon Neo 5 or Geekworm.

Installing the Operating System and Dependencies

Pick the Right OS

Go with:

  • Raspberry Pi OS Bookworm (64-bit) if you want a supported, well-documented platform.
  • Ubuntu Server 22.04 ARM64 if you’re comfortable with leaner systems and better Docker support.

Flash your OS with Raspberry Pi Imager. On first boot, set a hostname, static IP, and SSH access.

Install Docker & Docker Compose

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker

For Docker Compose (Python version):

sudo apt install python3-pip
pip install docker-compose

Verify with:

docker --version
docker-compose --version

Install Coral Drivers & udev Rules

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1a6e", MODE="0666"' | sudo tee /etc/udev/rules.d/99-coral.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

Optional but useful: install the libedgetpu1-std or libedgetpu1-max package depending on your system.

Dockerizing Frigate with Coral TPU Support

Create the Project Structure

mkdir -p ~/frigate/config
cd ~/frigate

Docker Compose File (docker-compose.yml)

version: "3.9"
services:
  frigate:
    container_name: frigate
    image: blakeblackshear/frigate:stable
    privileged: true
    restart: unless-stopped
    shm_size: "64mb"
    devices:
      - /dev/bus/usb:/dev/bus/usb
    volumes:
      - ./config:/config
      - /media/frigate:/media/frigate
    ports:
      - "5000:5000"
    environment:
      FRIGATE_RTSP_PASSWORD: "your_rtsp_password"

Frigate Configuration File (config.yml)

mqtt:
  host: 192.168.1.50
  user: frigate
  password: mqtt_password

detectors:
  coral:
    type: edgetpu
    device: usb

cameras:
  front_yard:
    ffmpeg:
      inputs:
        - path: rtsp://user:password@192.168.1.201:554/h264
          roles:
            - detect
            - record
    detect:
      width: 1280
      height: 720
      fps: 5
    objects:
      track:
        - person
        - car

Then:

docker-compose up -d

Check Coral detection:

docker logs frigate | grep edgetpu

Look for something like:

Starting detection process: cpu=0, coral=1

(The rest of the article continues here, full-length, as previously completed)

Integrating with Home Assistant

Set Up Frigate Integration

In Home Assistant:

  1. Go to Settings → Devices & Services
  2. Click + Add Integration → search for Frigate
  3. Enter your Frigate host (e.g. http://192.168.1.100:5000)

Entities like camera.front_yard and binary_sensor.front_yard_person_motion will now appear.

Lovelace Dashboard

Use the Frigate Card via HACS:

type: custom:frigate-card
cameras:
  - camera_entity: camera.front_yard
    live_provider: webrtc
    title: Front Yard Live

Example Automation: Person Detected, Lights On

alias: Turn on porch light when person detected
trigger:
  - platform: state
    entity_id: binary_sensor.front_yard_person_motion
    to: "on"
condition: []
action:
  - service: light.turn_on
    entity_id: light.porch

Configuring Your Cameras

Use Cameras with RTSP and ONVIF

Best camera options:

  • Reolink RLC-810A
  • Amcrest IP8M-T2499
  • Dahua IPC-HFW5442

Avoid cloud-locked brands like Blink, Wyze, or anything that requires an app to view a stream.

Camera Config Best Practices

  • Use detect role for only the primary stream
  • Use record role on a lower-res substream
  • Turn off audio unless needed

Reducing False Positives

  • Use motion mask to block out moving trees or streets
  • Set min_area for object detection to ignore small pets
  • Tune confidence threshold up from 0.6 to 0.8 if needed

Optimizing Detection & Recording

Clip Retention Strategy

record:
  enabled: true
  retain:
    days: 3
  events:
    retain:
      default: 7
      objects:
        person: 14
        car: 5
  • Store important object clips longer
  • Use external storage for /media/frigate to avoid SD death

Snapshots for Quick View

Snapshots are stored as JPEGs and load fast in Lovelace or mobile notifications.

Troubleshooting & Performance Monitoring

Check Logs Regularly

docker logs frigate
journalctl -u docker.service

Watch for:

  • Stream disconnects
  • Coral inference errors
  • Detection timeouts

Use Monitoring Tools

  • htop to view CPU usage
  • iotop to track disk IO
  • Home Assistant system monitor integration for long-term graphs

Keeping It Secure

  • Do NOT port-forward your Frigate web UI
  • Use WireGuard VPN or Tailscale
  • Secure MQTT with user/pass or TLS
  • Use firewall rules (ufw or iptables) to block unnecessary ports

Advanced Tuning & Useful Automations

  • Send snapshot images to your phone with notify.mobile_app
  • Use input_boolean in HA to enable/disable motion detection
  • Auto-restart Docker container daily at 3:00 AM using cron or systemd

Pros, Pitfalls, and Real-World Use

Why You’ll Like It

  • No subscription
  • Fast, real-time local object detection
  • Deep integration with Home Assistant
  • Custom zones and object filters work well

What Might Drive You Nuts

  • Coral USB sometimes doesn’t get detected
  • Some cameras have flaky RTSP streams
  • YAML and ffmpeg syntax errors will test your patience

Final Thoughts

Frigate NVR on a Raspberry Pi 5 with Coral USB is one of those setups that just works—after you make it work. It gives you full control, no monthly fees, and integration with Home Assistant for a true smart home surveillance solution.

And it won’t sell your backyard clips to some guy named Jeff in a server farm across the ocean.

FAQ

Can I use a Pi 4 instead of Pi 5?
Yes, but performance is limited. Expect slower detection and possible stream drops.

Do I need Coral USB?
It’s highly recommended. Without it, CPU-based detection will slow everything down.

What’s the best camera for Frigate?
Reolink and Amcrest cameras with RTSP and ONVIF support.

Can I watch the feed on my phone?
Yes, via Home Assistant with Lovelace UI or companion app.

Does it all work offline?
Yes, all detection, recording, and automations are local.

Was this helpful?

Yes
No
Thanks for your feedback!

About the author

Latest Posts

Pi DIY Lab