Frigate Mobile App Notifications 2.0

Yep the issue is the int function not having a default, the simplest solution for most people was the or to else.

In my fork I consolidated the fps and fps value into a single line.

hi, yes it does seem to work for me in this form - (with name: added) but It might be better to see if other ios users see the same.

Ive always used the sound: / name: combination in ios notifications.

if critical is set to true - then I get critical sound at full volume irrespective of how this line is written.

1 Like

Hi SgtBatten,

Thanks for your blueprint. I have installed it last night but sadly no notifications are working.

The automation runs when Frigate detects an event in the zones specified.

For info the blueprint I was using before was working for me but it was missing around a quarter of the events that Frigate was detecting.

I am using the notify alldevices group which is working fine in the service test and with the original blueprint.

I am using Frigate version 0.11.1 running as a standalone container.

Some info from the trace.
Triggered by the mqtt topic frigate/events at 18 November 2022 at 13:52:36
Choose: Frigate Event executed
Finished at 18 November 2022 at 13:52:51 (runtime: 15.27 seconds)

Executed: 18 November 2022 at 13:52:36
Result:
result: true
entities: []

(Is that normal blank entities?)

If I flick back to the original disabled blueprint it works again.

Please let me know what info I could provide to help.

Thank you

Bit hard to tell much from your post sorry. That looks normal but i’ve no idea which step you were looking at for that.

The fact it ran for 15 seconds is positive, it suggests it must have been looping successfully. So perhaps the issue is only with the notification delivery. Can you share your automation configuration yaml.

Hi, after initially getting this work im now getting inconsistent notifications and seeing the same issues in traces.

heres an example of an automation that triggers but decides no action even though the conditions should allow it to work:

Executed: 18 November 2022 at 21:15:40
Result:
result: false
conditions/0
Executed: 18 November 2022 at 21:15:40
Result:
result: true
conditions/1
Executed: 18 November 2022 at 21:15:40
Result:
result: true
entities:
  - automation.frigate_front_blueprint_2
conditions/2
Executed: 18 November 2022 at 21:15:40
Result:
result: false
entities: []

Edited:

If i am correct about which step this is from, it was in the cooldown period.

Hi

yep i figured it out!

This may help others so I’ll explain best I can -

the blueprint is working perfectly - its my interpretation of cool down that was wrong.

the camera i’m using for this blueprint is forward facing and captures people coming towards my front door. But its also on a road with road traffic (one car every few mins)

whats happening is that the automation is triggering for every MQTT event - such as a car driving past, then the cooldown of 30 seconds is engaging.

the problem is, quite often a car will drive past, then a person will enter my target zone in quick succession.

So it’s just a config issue.

Ive set the cool down to 5 seconds, and created a separate cooldown automation which disables the automation for 30 seconds when the zone_person_occupancy sensor is triggered in frigate.

This is working so far.

TLDR - if your camera is capturing lots of events, such as cars on a street AND you are using zones, set the cooldown to a low number or even off, then deal with repeat notifications in another automation.

Apologies for the confusion.

1 Like

had the same problem, that fix made it work, ty

Nice solution. Yes the cooldown is based on the last triggered time of the automation which does not always correspond with notifications. It’s something I might take a look at in the future.

1 Like

I think I have fixed the critical templating issue in the latest beta. I’ve also updated the sound format to use the name field for the notifications in the loop (not the ones in the initial notification but let me know how it goes)

2 Likes

I’m not sure. I have 11.0.6d and fail to get notifications. Not entirely sure how to debug this.

thanks I’ll give it a test

The trace looks normal. It looks like it got to the point of sending one initial notification and you are using a notification group. After that the loop didn’t trigger any more notifications but that can be expected.

Could you share your automation configuration?

Standard config, even without notification groups it doesn’t work. That was a config copy from whatever version the frigate-nvidia was using.

And the config is just the default with the camera and phone device selected.

id: '1668964735122'
alias: Frigate Notification (0.11.0.6d) - SgtB
description: ''
use_blueprint:
  path: SgtBatten/frigate_0.11_notification.yaml
  input:
    notify_device: 5391cb9d49a7e05267c588c117cb9032
    camera: camera.front_porch
    cooldown: 30
    silence_timer: 30

That trace sent one notification and at least 1 update. Is it android or iOS?

android, nothing in the notification history for it

I assume other notifications have worked in the past?

The trace looks fine, the config looks fine. It seemingly not making it to your phone though.

Any errors in HA logs?
Have you hit the 500 limit for the API today?
Tried setting the notifications to critical in the automation config (true)

  1. Other automation notifications work fine
  2. There is this in logs 6 different times. Times correlate to trace times on the automation.

2022-11-20 13:38:29.507 ERROR (MainThread) [homeassistant.components.mobile_app.notify] data must only contain string values. This message is generated externally to Home Assistant.

  1. Not near the limit
  2. Doesn’t make a difference

Okay the error is where I’ll focus but I’m about to jump on a plane.

I beta d did involve some changes to the data blocks yesterday so I recommend you look at the revision history and go back to beta b (3 or 4 revisions ago, basically anything before yesterday) or use the stable one. We can then confirm it is the blueprint because it should be working.

If I remove lines 452 - 454 in the beta it works. The custom url button.

                              - action: URI
                                title: "{{button_2}}"
                                uri: "{{custom_url}}"
1 Like