Home Automation and IoTSensor and Camera AutomationIntermediate2-4 hoursLab

Build a Frigate to MQTT to Home Assistant Event Pipeline

Build one observable event path from a disposable camera/test stream through Frigate and MQTT into a Home Assistant automation, with pinned configuration and payload-level validation.

Last reviewed4/30/2026
Frigate event pipelinesMQTT utility nodespresence and door automation
Home AssistantFrigateMQTTPython

Expected Outcome

A controlled test event is detected by Frigate, published on the expected MQTT topic, consumed by Home Assistant, and triggers one harmless automation while each hop can be inspected independently.

Assumptions

  • A supported Frigate host with sufficient CPU/GPU for the chosen detector or a configuration intentionally sized for CPU-only testing

  • A disposable RTSP/test camera source with known credentials/URL

  • Authenticated MQTT broker reachable by Frigate and Home Assistant

  • Home Assistant with MQTT integration

  • Version-pinned Frigate image/config rather than latest

Bill of Materials

  • Raspberry Pi or server

  • USB camera or IP camera

  • PIR motion sensor

  • MQTT broker (e.g., Mosquitto)

  • Home Assistant installation

  • Frigate installation files

  • Wiring and connectors for sensors

Build Steps

  1. Draw the event path and choose one test event

    Use camera/test stream -> Frigate detection -> MQTT topic/payload -> Home Assistant entity/automation -> harmless notification. Do not add PIR GPIO or multiple sensor sources until this single path works.

  2. Deploy Frigate with a pinned version and minimal camera config

    Configure one RTSP source, detector mode appropriate to the hardware, MQTT host/user/password from secret storage, and only the object/event settings required for the test. Persist configuration and recordings only where needed.

  3. Verify the stream and Frigate event independently

    Confirm Frigate receives the camera stream and creates the expected detection/event before troubleshooting MQTT or Home Assistant. Record the event ID/time and relevant Frigate log line.

  4. Observe the MQTT event payload

    Subscribe with an authenticated test client to the documented Frigate event topic and capture one event payload. Identify the fields Home Assistant will actually use instead of assuming a topic string is sufficient.

  5. Create one Home Assistant automation from the observed payload

    Trigger on the actual topic/payload condition and perform a harmless action such as a persistent notification. Keep the automation narrow and label it as a lab rule.

  6. Run an end-to-end positive and negative test

    Generate the controlled event and trace its timestamp/event ID across Frigate, MQTT, and Home Assistant. Then present a non-matching event/condition and confirm the automation does not fire.

Validation

  • Frigate receives the test stream without continuous decoding errors

  • A controlled detection creates an identifiable Frigate event

  • The same event is visible on the expected authenticated MQTT topic

  • Home Assistant receives the event and executes the harmless automation once

  • A non-matching event does not trigger the automation

  • Versions, camera URL handling, and credentials are documented without committing secrets

Troubleshooting

  • No Frigate event: solve camera stream/detector configuration before MQTT

  • Frigate event exists but no MQTT payload: test broker auth/topic from Frigate host

  • MQTT payload exists but HA does not act: compare the real payload with automation condition/template

  • Avoid using latest tags or changing detector, MQTT, and HA configuration simultaneously

Cleanup or Rollback

  • Disable/remove the lab automation and test camera credentials

  • Stop the lab Frigate stack and remove disposable recordings/events

  • Retain sanitized config under version control if reused

Next Improvements

  • Explore additional Frigate features like object detection.

  • Integrate other sensors and devices into the pipeline.

  • Create more complex automations based on multiple events.

Keep Moving

Build on what you just completed

Continue with a related Lab or return to this build path for a different implementation.