Frigate Mobile App Notifications 2.0

Like the blueprint. It is really working well.

One question, for the notification colors, can you add “steelblue”? Which is default home assistant color. Maybe it is also interesting to set “steelblue” as default, because it is the default home assistant color.

Yes easy done. I didn’t know that was an available colour. Thanks

this might be beyond the scope of this blueprint… but when someone is walking around my house, as you could image, I get notifications from each camera in a short amount of time. Wonder if there’s a way to delay the next notification on all cameras entities. Just throwing this idea out there.

You could do it via a template entity and using the state filter. Just me thinking out loud but by creating a template sensor that looks at all your camera automations last triggered time and storing the latest one you could then check the time difference between it and now and if its less than x minutes use that to stop the automation from firing

wow that’s perfect, thanks! And thanks again for all the work you’ve done.

using this thread

i came up with this template

{% for state in (states.automation
  | selectattr('name', 'search', 'Frigate')
  | selectattr('attributes.last_triggered')
  | sort(attribute='attributes.last_triggered', reverse=true)) [0:1] -%}
  {% if (now() - state.attributes.last_triggered).total_seconds() < 120 %}
    {{true}}
  {% else %}
    {{false}}
  {% endif -%}
{% endfor %}

Which relies on my relevant automations having Frigate in the name and is set to 2 minutes (120 seconds). Hopefully a good starting point for you

1 Like

Is there any way to change the ‘label’ language? I’ve tried something similar to

{{ ‘is loitering’ if loitering else ‘was detected’ }}

or

{{ ‘Personne’ if label == ‘person’ else ‘Chien’ if label ==‘dog’ else ‘Chat’ if label == ‘cat’ else ‘Voiture’ if label == ‘car’ }} {{ ‘is loitering’ if loitering else ‘was detected’ }} sur la caméra {{ camera_name }}.

with no success. I’ve also tried to edit the blueprint and it did not work. Thank you.

Yes it should work. The only thing I’ve discovered is that if you start with a {{ you need to put the whole input in “quotes”

Thanks for the quick reply, I’ve just tried putting the input between quotes and the result gives me this:

Code in the ui:

“{{ ‘Personne’ if label == ‘person’ else ‘Chien’ if label ==‘dog’ else ‘Chat’ if label == ‘cat’ else ‘Voiture’ if label == ‘car’}} {{ ‘flane’ if loitering else ‘détecté’ }} sur la caméra {{ camera_name }}.”

Output in the automations.yaml

  message: '"{{ ''Personne'' if label == ''person'' else ''Chien'' if label ==''dog''
    else ''Chat'' if label == ''cat'' else ''Voiture'' if label == ''car''}} {{
    ''flane'' if loitering else ''détecté'' }} sur la caméra {{ camera_name }}."'

it’s weird since it’s changing a single ’ with a double ‘’ in the automations.yaml.

Am I doing something wrong? Thanks again

Yes sorry the label also needs a capital first letter.

So Person not person, Dog not dog etc

There is an example of this in the icon input if you want to compare. Select it and then check the yaml

1 Like

Hi, would you consider adding the following functionality? I know this only works for android however under “Action Buttons and URLs” > Tap Action;

Similar to ‘Open Reolink App’ etc. have an option for ‘Open Custom App’ and a field to be able to specify the app you want to open I.e “app://com.swannsecurity”

Just for a bit of flexibility in what the tap action can/will do.

That field already supports it. Anything in those action button dropdowns is just an example.

I’m using this push notification and am having some issues across one specific scenario.

When I receive a push notification on iOS through Frigate which is utilizing the go2rtc built-in re-stream, the clip gets pushed through OK but when I click the thumbnail to play the live stream, it ends up being a black box and doesn’t play. If I disable the go2rtc built-in re-stream and utilize the raw MJPEG URL from the camera, the thumbnail plays the live stream fine. Anyone know what the issue is? I think this is because iOS push notifications do not support playing live video unless its MJPEG. If that’s the case, how do we make Frigate re-encode it to MJPEG while utilizing the low latency of go2rtc?

Hmmmm not my area of expertise I’m afraid. Have you tried with it without a baseurl set

The problem persists even when sending a plain vanilla push notification with just the camera entity so dont think it is isolated to this blueprint. Let me try asking in the frigate / go2rtc threads.

One potential fix through this mobile app notification though… is it possible to use frigate for recorded clips/snapshots, but for the camera entity use a generic MJPEG camera in HA instead of frigate’s camera entity? The frigate one is pulling the go2rtc stream which is not MJPEG which is why the live streaming in the thumbnail/notification is not working.

Oh! Sorry, I didn’t notice that. Thank you for your work, this update to the blueprint is amazing.

1 Like

Yes i believe I have this working now. Expect a github update at some point.

I’m simply changing the true false toggle to an entity selector with all camera entities listed.

@SgtBatten Maybe this is why the thumbnails on iPhone stopped working in the last beta? They work on MacOS though.

Btw, I have it the “Open HA app” option selected for the notification but it just opens to the default lovelace dashboard instead of my custom Homekit Infused YAML dashboard. Anyway to set a custom page to open to fix this?

Not seeing reports of issues with thumbnails.

Yes, like most of those fields, just type in the custom address you want. e.g /lovelace/mycustomdashboard for in app or https://ha.mydomain.com/lovelace/mycustomdashboard for web browser.