Frigate Mobile App Notifications

Hi,

does this blueprint needs updating given this deprecation?
https://github.com/home-assistant/core/pull/61078

I imported it quite a lot time ago hence my question

@hunterjm
Can you add an option to view the live feed?
I used the following for a link to the camera stream and it seems to work pretty well.

<HASS_URL>/api/camera_proxy_stream/camera.{{trigger.payload_json[“after”][“camera”]}}?token={{states.camera.frontdoor.attributes.access_token}}

I’d rather use a long-lived token but I’ve searched and haven’t found a way to do this.
This workaround uses the temporary token so it expires after a few minutes.

EDIT:

I tested with the following to add the stream and it works pretty well.
I copied your blueprint and updated the following section

                          actions:
                            - action: URI
                              title: View Clip
                              uri: "{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4"
                            - action: URI
                              title: View Snapshot
                              uri: "{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg"
                            - action: URI
                              title: Stream
                              uri: https://home.valdeswithans.com:23453/api/camera_proxy_stream/camera.{{trigger.payload_json["after"]["camera"]}}?token={{states.camera.office.attributes.access_token}}
                            - action: "silence-{{ camera }}"
                              title: Silence New Notifications
                              destructive: true

for the URL, I tried inserting {{camera}} instead of my actual camera name but the automation wouldn’t load

uri: https://your_URL/api/camera_proxy_stream/camera.{{trigger.payload_json[“after”][“camera”]}}?token={{states.camera.{{camera}}.attributes.access_token}}

it works fine if I use the actual camera name

uri: https://your_URL/api/camera_proxy_stream/camera.{{trigger.payload_json[“after”][“camera”]}}?token={{states.camera.office.attributes.access_token}}

Would it be possible to add a timeout for the notification? I.e have the notification automatically dismiss after a set amount of time?

Anyone else have issues with the cooldown not working? I have it set for 60 seconds, but still get spammed with notifications when someone walks by the camera.

Any idea why I can’t delete automations created with this blueprint through the UI? I had to manually remove them from my automation file.

For those on this thread that use my notification blueprint, I have updated it for the 0.10 release. You can import it below and try it out yourself.

:no_entry: Requirements

  • Frigate: 0.10 Beta 10+
  • Home Assistant: 2022.2+
  • Frigate Integration: v2.2.0+
  • iOS 15.0+ or Android with the latest Home Assistant Mobile App installed

:rocket: Features

  • Optionally send the notification as a critical alert (potentially faster delivery on android, noise maker on iOS)
  • Choose whether or not to update the notification when a better thumbnail becomes available.
  • Set a loitering timer to notify you of stationary objects that remain for a set period of time.

:beetle: Bugfixes

  • The old blueprint ran in single mode and only tracked a single object. With stationary objects in frame this means you were probably missing notifications. This version will send a notification for every tracked object. When they are stationary and start moving again it will send another notification.

:arrow_down: Import

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

2 Likes

I still cannot see the snapshots from this notification the address comes up unresolvable regardless of if I use nothing, nabu.casa external address or my own reverse proxy as the base url.

My own automation that takes camera snapshot on motion sensor trigger and sends it to telegram works with either address, but obviously I’d prefer to use this.

You are sure you have met all the requirements listed above and have the notification event proxy enabled in your integration configuration?

I believe so.

the checkmark is checked
frigate: 0.10.0-amd64
ha: 2022.2.9
frigate intergation: v2.2.2
android app: 2022.2.1-full

I had this issue also in previous version of the bp (Frigate Mobile App Notifications - #205 by C.G.B.Spender)

Excellent blueprint. Thanks so much.

The issue I have is that I always get notifications, even when the group is marked as ‘home’. The notification_device is a single Android device (not a group).

Below is my blueprint configuration:

id: '1646032015087'
alias: Frigate Notification (0.10.0)
description: ''
use_blueprint:
  path: hunterjm/frigate_0.10_notification.yaml
  input:
    notify_device: 7065cb5390285d75bda8cf8c724ef377
    update_thumbnail: true
    camera: front-yard
    cooldown: 60
    presence_filter: group.parents_group

Any ideas?

Same issue here

Same issue. I have zone filter enabled and the trigger zone and trigger object fields defined, but i get every motion (not only motion in the zone and of a specific object type). This use to work fine with the orginal version of the blueprint, but after the 0.10 updated version it stopped filtering the notifications appropriatly

Has anyone managed to get this working with Frigate running on a docker(Unraid), and HASS running on another device/environment(HASS Blue for myself).

Everything works fine, but no matter what I do I can not get the clips/snapshots to load.

I didn’t tested it (yet) but try to update your local blueprint and replace every url starting with

/api/frigate/notifications/

with

{{base_url}}/api/events/

the api is a little bit different when running via HASS or docker/standalone
check out HTTP API | Frigate

There was a bug in the new release for zone filters. I have updated it and hopefully the new logic works as intended.

Since Home Assistant doesn’t allow updating blueprints yet you may need to copy the contents of the gist yourself and replace it in the blueprints folder.

2 Likes

Thank you SO much, I knew it had to do something with that, or atleast I think I did as I sat there staring at the yaml file and the actual event link that frigate fires off from docker.

I appreciate the help, and hopefully others can learn from my issues as well. Your link helped tremendously for my other issues as well(dont know how I missed that under docs)

I updated my blueprint, however, it looks like it does not properly check for the condition of a group being home/away. If I change the Presence Filter to a person it works as expected.

Thanks again for this blueprint, its amazing!

Edit: Let me know if I can gather any debug info for you.
Edit 2: It looks like the presence filter does not work for “persons” either.

For me the presence filter does not work at all - for a person, group or device …

What logs can I provide to check what I’m doing wrong, or if there is a bug in the blueprint?

I started seeing this error in the logs:

Unable to read file /home/user/.homeassistant/blueprints/automation/hunterjm/._frigate_0.10_notification.yaml: 'utf-8' codec can't decode byte 0xb0 in position 37: invalid start byte

Any ideas? Thank you for this blueprint.

Can you show me what your blueprint configuration looks like? You can view as YAML by clicking the three dots in the top right and paste it here. The presence filter seems to work for me. Here is my configuration.

alias: Frigate 0.10 - Foyer
description: ''
use_blueprint:
  path: hunterjm/frigate_beta_notification.yaml
  input:
    camera: foyer
    presence_filter: group.family_presence
    cooldown: 90
    notify_group: ios_jk_phones