Frigate Mobile App Notifications 2.0

Preamble

In 2022, a home assistant release caused issues with the original blueprint. It seems @hunterjm has not visited that thread in some time. I have updated the blueprint and added dozens of new features. I am continuing to do so and the mods have split the thread here to make things simpler. Thank you very much Hunterjm for the foundational blueprint which has taught me a great deal and made this possible.

Please feel free to visit Github for the latest releases or use the import buttons below which will automatically stay up to date.

Frigate Notifications

STABLE
Import blueprint
BETA
Import blueprint

Please checkout GitHub for bug reports, feature requests and config support. I will also provide support in this thread.

image image

Requirements

  • Frigate 0.11 or newer (including 0.12)
  • Frigate integration (v3.00+ for 0.11 and v4.00+ for 0.12)
    • “Enable the unauthenticated notification event proxy” must be ticked during install/configuration
  • Home Assistant 2022.2 or newer
  • An MQTT broker such as the Mosquito Broker Addon connected to HA and Frigate

Features

This blueprint will send a notification to your device when a Frigate event for the selected camera is generated. The notification will include a thumbnail of the event which can be updated with better images as the event progresses. The notification also has customisable action buttons which you can use to view the saved clip/snapshot when available, or silence the notification for a configurable amount of time. You may also configure an action button to open frigate, or visit a webpage or even open an app on your phone.

With this blueprint, you may send the notification to multiple devices by creating a notification group or even an Android/Fire TV

Since this blueprint is used to create one automation per camera, you can specify filters limiting which zones and objects you want notifications for. You can disable notifications based on the state of another entity (a door locked or a person home (or not). You can also configure a cooldown which will limit the amount of back-to-back notifications you receive for that camera. Additionally, you can silence notifications for a particular camera for a predetermined and configurable amount of time.
There are really only two things you need to do to get started. Pick a camera and pick the device you are notifying. Every thing else is optional and most have good defaults and lots of examples for inspiration.

Features:

  • Easily select the camera entity or mobile device using a drop down menu.
  • Send notifications to an Android or IOS mobile device or a TV.
    • or a group containing any combination of the above.
  • Configure the title and message of the notification.
  • Dynamically handle things like object type, zones and face detection from doubletake.
  • Automatically handle some common errors like case matching and bad urls etc.
  • Optionally send the notification as a critical alert. (Critical)
  • Optionally limit the playing of audio for secondary notification updates, and on IOS, customise the sound. (Alert Once)
  • Choose whether or not to update the notification with new thumbnails as they become available.
  • Customise the notification colour and icon.
  • Optionally send a live view to IOS.
  • Configure custom notification channels on Android.
  • Specify which [zones][2] to be notified about. (Zone Filter)
    • Choose between enforcing all required zones simultaneously or any one zone
  • Specify what type of [objects][3] to be notified about. (Object Filter)
  • Disable notifications if a presence entity or group is “home”. (Presence Filter)
  • Limit notifications based on the state of another entity. (State Filter)
  • Limit notifications to certain hours of the day. (Time Filter)
  • Configure a cooldown for the camera to reduce the number of notifications when back-to-back events occur.
  • Silence future notifications for a defined amount of time through actionable notifications. This is helpful in situations where you know you will be triggering detections for an extended period of time. i.e. kids playing outside.
  • Set a loitering timer to notify you of stationary objects that remain for a set period of time.
  • Configure what happens when you tap the notification (Tap Action)
  • Configure 3 action buttons to open almost anything (defaults are: View Clip, View Snapshot and Silence New Notifications)
  • Configure the size, transparency, position and duration of TV notifications.
  • Debug option to help troubleshooting
  • Handle capitilisation in inputs properly
  • Handle trailing slash in base urls properly
  • Support for multiple Frigate instances by specifying the ClientID and MQTT topic

Beta Features:

  • Android options: Sticky and Channel

  • Add 10s delay to final notification update to ensure frigate has time to save snapshot edits (crop, bounding box etc) if update thumbnail is enabled.

screen-20230515-163348~6

Simplified Configuration

image image



58 Likes

Thank you for new version. I checked stable version and it works great

1 Like

Thanks, I’ve installed MQTT Explorer and can see the events messages coming through.

I can’t figure out how to publish the event back through Mosquitto broker?

Great thx a lot for your work !!!
I“ve changed the notification sound - …. Hardcoded in the blueprint . Maybe it“s possible to change it variable in blueprint?!

Greetz

1 Like

Yeah would be fairly easy to make anything customisable.

Can you pm me your current hardcode method and I’ll add it to the beta as a variable.

Edit, done. Customisable sounds for IOS. For android I think you can only do it on the phone per app

1 Like

This is working superbly! Thank you for working on this. I appreciate it.

On the right hand side of MQTT Explorer there is a publish panel.

Paste your message in there and press ‘publish’.

Alternatively, use the MQTT Integration in HA which also has listen and publish functions.

hey All,

im trying to get the latest motion detected pic of any camera into a generic camera so i can display as a log on the dashboard? any Ideas?

Could you explain a bit better?

The last detection snapshot of each camera is saved to the camera.(name).(object) entity

E.g camera.front_person

I want to store any camera detecting a person into 1 variable to show on my dashboard, instead of using conditions to display each camera. Hope that makes sense.

There’s probably a couple of ways to do it.

One idea is to intercept the mqtt messages and update the url of your custom entities entity_picture.

Another is using something like this loop to grab all the possible urls, was just tinkering, this still needs a tweak to have it select the most recent picture

{%-for state in states.camera if "Person" in state.name-%}
  {%-if loop.last-%}
    {%-if loop.index > 0-%}
      {%-for state in states.camera if "Person" in state.name -%} 
        {{state_attr("state", "entity_picture") }}
      {%-endfor-%}
    {%-endif-%}
  {%-endif-%}
{%-else-%}
  none
{%-endfor-%}

Thanks for the input, ill try it out and see how i go.

Thank you so much for this blueprint, really useful!
For now I have two different sets: one with critical notifications and one without.

  • During the day I want to be notified of someone at the door, but not alerted/woken up (night shifts);
  • During the night (or when not expecting anyone) I want to be fully alerted;

I think it could be merged in one single automation if you could add (pretty please!) an input_boolean as selector for critical notifications, so that I can automate it accordingly.

That is doable, but I wonder if your phones do not disturb or volume settings are not more easily manageable?

On android when I put my phone face down nothing makes a sound.

I did this with a sperate automation that just turns off the door notifications at night then enables them in the morning.

That’s what I have a the moment, it works, I just like the idea of only one automation.

I keep my iphone always on silent, definitely at work, that would allow me to know if something important is going on and ignore any other vibration as Home Assistant would be the only one having sound.

If it’s too much of a bother I shall keep my two automations, you have already done a lot!

1 Like

Is the issue that you can’t silence critical notifications on iPhone?

No there is no issue with that. It works as intended.
I use my phone on silent, so any email, text or random notification is a mere vibration. But Home Assistant (in the case of the alarm for example) I have it set to critical notification, so that it plays sound at high volume even when the iphone is muted/silenced.
Yes, I could turn off the sound to all other notifications, but the better solution is to have Home Assistant being critical rather than the “opposite”.

Okay so your use case is iphone on silent, critical notifications allow you to bypass the silent mode and have an audible alert which you want, but only at certain times.

Exactly! Sorry if I have expressed myself in a convoluted way.