Frigate Mobile App Notifications 2.0

Got a templated format working for including a link to the live stream for the camera - just insert this in SgtBatten’s Blueprint in the selector options around line 200 and ‘View Stream’ will appear as an option in the 3rd button dropdown.

- label: View Stream
  value: "{{base_url}}/api/camera_proxy_stream/camera.{{trigger.payload_json['after']['camera']}}?token={{state_attr( 'camera.' ~ camera, 'access_token')}}"

@SgtBatten I was going to PR this to your blueprint but I’m not sure that’s possible on gists so tagging you here instead. Thanks for all the great work you’ve done!

Would be easier if this wasn’t a gist but an actual repo.

Very nice.

I have added this and all beta changes to the stable release now. Still seeking feedback from IOS users on custom sounds and all users on the preferred way of controlling time filters for critical notifications etc.

beta will be updated in the near future to test the android tv notifications but as of now, stable has the latest changes.

see this post for changelog and links to the blueprints.

1 Like

@SgtBatten, a suggestion for you: you can filter out all the “object-like” cameras from the dropdown when selecting the camera just like the integration does for its services. Just filter by device_class: camera.

1 Like

Thanks for pointing this out. I’d actually tried this before but vscode complains it isn’t a valid device class. It still complains, but you are right it indeed works.

I’ll update the gists tonight.

2 Likes

I’ve implemented the better entity filtering in both releases, Thanks.

I’ve added an optional notification Title and customisable notification colours to stable as well as previous beta features like icon customisation and time filters.

Beta contains new options for notifying android/Fire TV devices. I have not had success getting the image to display so far but text is working.

Link to blueprints

3 Likes

Using the beta version. Have this error:

2022-11-30 19:09:14.809 ERROR (MainThread) [homeassistant.components.automation] Blueprint Frigate Notification (0.11.0.8) - SgtB generated invalid automation with inputs OrderedDict([(‘color’, ‘grey’), (‘camera’, ‘camera.hall’), (‘notify_device’, ‘5a7d22a320c5fea67e4386550c269c59’), (‘update_thumbnail’, True)]): extra keys not allowed @ data[‘labels’]. Got None

Using Frigate 0.11 and HA 2022.11.4.

Any hints? I have added “- person” as label.

Thanks!

Could you please share the yaml of the config. Also that error appears to be from the stable version, please confirm?

I used the link to the beta version. Can try again.

Automation YAML:


alias: Notification Person Detected at Hall
description: ""
use_blueprint:
  path: SgtBatten/frigate_0.11_notification.yaml
  input:
    color: grey
    camera: camera.hall
    notify_device: 5a7d22a320c5fea67e4386550c269c59
    update_thumbnail: false
    message: Person detected on {{ camera_name }} camera.

Edit: Removing or Adding ‘- person’ results in the same error.

I am so far unable to reproduce. I will keep looking but if you can provide the expanded error from the logs or show me how you are entering the labels in the yaml view of the automation it might help.

Also please check this automation is the one with the issue and not another automation also using the blueprint? You said you clicked the beta link but the error refers to the stable blueprint.

1 Like

#1 I just installed this blueprint
#2 I don’t have any other automation related to frigate or this blueprint
#3 I did use the beta link (Frigate Notifications have moved · GitHub)
#4 That is the full error I have in HA Logs
#5 I tried also with no labels, as you could see in the previous post (that is the full automation YAML)
#6 As for the labels, I simply added “- person” via the UI in the automation pane

Hth,
anthonws.

I have downloaded a new copy from github and setup a new automation exactly the same as yours. it is working and i am unable to cause it to error by playing around with some incorrect ways of entering the person object.

When does the error occur?

And you might be correct but what i meant by the full error would require you to expand the full log and see if there is more to the message once you find it. Let me know if that’s the case.

I’ve removed everything (blueprint and automations). Even went to the automation.yaml file and confirmed that no traces of the automation were there.

Re-added the beta blueprint and create a brand new, super simple automation.

alias: New Automation
description: ""
use_blueprint:
  path: SgtBatten/frigate_0.11_notification.yaml
  input:
    color: grey
    camera: camera.hall
    notify_device: 5a7d22a320c5fea67e4386550c269c59

Frigate shows me events for person detection, but I don’t see the automation even being triggered (and therefore no notification)… I must be doing something wrong :S

Thanks,
anthonws.

Hello everyone…
I was wondering if i just dont see it or if it is actually not possible to have multiple trigger reasons for notifications…
I have it successful running that it just sends out phone notifications when my specified group is not home.
But i would love to add a time frame…
Like at night when we are sleeping and are home, i would like to get notifications as well so that i see it first thing in morning…
How can i set that up with this blueprint?
Thx in advance

The automation triggers any time a mqtt message is sent in the topic "{{ camera }}/new", in your case hall/new. Filters are subsequently applied, but you should see traces for each event.

If you are getting no traces at all, you’ll need to investigate home assistant is receiving the mqtt messages from frigate properly.

1 Like

Right now, only possible with two automations using a time filter on the night time one to stop it sending notifications when you are home during the day.

Firstly, really appreciate the work that has gone into this automation , it really is top notch.

I have been using it for the past 3 months, and the only issue I have is with “cooldown” period. It has no effect on my notifications.

EG. I have a camera pointing at my door. I will get 5-6 notifications in quick succession as they walk up to the door. EG Each frigate notification generates a discrete notification through the automation.

Am I misunderstanding how the cooldown option is meant to work, or is something broken?

Thx alot…will try that

Fantastic !

Thank you so much for this line 164 edit, which has now allowed my notifications to finally work !

1 Like

You should receive one notification per event but a notification can have multiple updates. So are you getting 5-6 notifications that can individually be viewed/swiped away or one notification and several updates?

The cooldown does generally work and stops new events {I.e new objects) triggering a notification inside of the time set.

I’d need to see details of consecutive traces that you think should be stopped by a cooldown including a screenshot from the phone and of frigate showing the event timestamps. If you’d like to do this it might be best via PM to avoid clogging this thread as it might take a bit of back and forth.

1 Like