Frigate Mobile App Notifications 2.0

Thanks for the quick reply! My yaml for the automation

alias: Testing Frigate HA
description: “”
use_blueprint:
path: SgtBatten/Beta.yaml
input:
camera: camera.alfresco_cam
notify_device: 24625cc54ca23503d8f1ec4b85f422c9

Pretty sure camera name is correct

Any traces? Or the automation has not ever triggered at all?

You mentioned stable earlier but that indicates the beta. Can you check what version number it says at the top of the automation editing screen.

Cam name looks okay. Is it the same in frigate config?

No traces, other than when i initiate it manually using ‘run’ which just goes straight to the end.

Apologies, i mentioned stable, but out of desperation in my latest automation i tried beta.

Cam names are the same, i tried to remove the camera* prefix and just leave alfresco_cam, but that didnt work either.

image

Only clue ive got from HA:

So just checking frigate and ha are both connected to the same mqtt server?

Do you have a custom topic set in frigate config for mqtt?

Sorry still learning here. It only just occurred to me 5 minutes ago, that Mosquito Broker Add-On (which im running 6.2.1) is different to the Mosquito Broker Integration, which i just installed 5 minutes ago. Using the Listen to frigate/events, i can see events pop up within HA which is reassuring. Can you advise what i need to do to have a custom topic set up? (assuming thats what you are asking me to do?)

The credentials in the Mosquito ‘Integration’ were prefilled, and different to my Frigate config.yaml

That all looks good.

I can see you don’t have a custom topic in your image actually. Leave that as is.

You do need the integration yes, the add-on is an mqtt server but the integration is how HA can see the events. Mqtt explorer is different again.

So it might work now?

omg its working now. (had to reboot HA). Thank you so much @SgtBatten

1 Like

Hey Sgt, got a question for ya. Had all my notifications in Home Assistant working a treat for about 6 months now. I just upgraded to Frigate 0.12, and all my notifications stopped working. I DID download your updated blueprint in case I needed to do that, created a test one using that notification, but still nothing. What all is required to change in home assistant to get notifications working post frigate 0.12?
I see the notification triggers in HA, just nothing going out.

If it has traces can you look at the trace or post a screenshot of it so we can see where it stops?

If does have a trace, how can I get you the info that would be most helpful?

Screenshot the trace tree. Probably only need the top bit to see where it starts skipping big sections.

Edit I just saw your pm. Replied there

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