Detecting deer and sending a push notification using Frigate and Home Assistant

Detecting deer and sending a push notification using Frigate and Home Assistant
Photo by Steve Adams / Unsplash

Winter brings unexpected visitors to my property - deer wandering through the landscape. While catching a glimpse of the deer used to be a rare treat, I've found a way to rarely miss their appearances. By using Frigate and smart home automation, I can now track and get instant notifications whenever deer pass by my cameras.

In this guide, I'll walk you through creating an automation that:

  • Detects deer movement using object detection
  • Sends real-time notifications to your phone
  • Includes a video clip of the deer
  • Identifies which camera captured the wildlife moment

This tutorial is designed for those who already have Frigate set up and integrated with MQTT, providing a seamless way to capture and enjoy wildlife sightings from the comfort of your home.

I use the MQTT trigger to have Home Assistant watch for any changes to the topic where Frigate posts reviews.

trigger: mqtt
topic: frigate/reviews

Trigger (when)

I then check that the Frigate review object array contains a deer.

{{ 'deer' in trigger.payload_json['after']['data']['objects']}}

Condition (and if)

Then I setup a push notification to my phone which has the Home Assitant app installed.

action: notify.mobile_app_dt_pixel_7_pro
data:
  data:
    video: >-
      https://frigate.home.shymoose.com/api/review/{{trigger.payload_json["after"]["id"]}}/preview?format=MP4
  message: Look outside, there's a deer!

Action (Then do)

And to avoid frequently retriggers, I have a 15 minute delay which acts as a cooldown for this automation.

delay:
  hours: 0
  minutes: 15
  seconds: 0
  milliseconds: 0

With this simple automation in place, I’ve turned my home into a wildlife observation post, ensuring I never miss a deer sighting again. By leveraging Frigate’s object detection capabilities, Home Assistant’s robust automation features, I’ve created a seamless system to capture and enjoy these moments. Whether you're a nature enthusiast or just curious about the wildlife around your property, this guide offers an exciting way to stay connected to the natural world—one notification at a time.

0:00
/2:02