Frigate Mobile App Notifications 2.0

Hi,
I’d like to trigger notification when person is detected for extended period of time. I live in an apartment complex in city district where break-ins happens on a daily basis, so if somebody spend more than 1minute in front of my door (neighbours take less than 30seconds to pass my door so I’d like to ignore short events) then it would be adequate to assume that person might try to tamper with the door lock. Would it be possible to trigger notification under those circumstances with this blueprint?

I think this should cover that scenario:

Loitering Notifications (Optional)

Sends new loitering notification if a stationary object is detected for longer than the specified time. 0 is off and will not send notifications.

The loitering notification is not the solution, it’s just another update trigger.

You can do it by creating your own template sensor to determine the duration of an event and turning true at an appropriate time. This can then be used in the state filter input field

I am having an issue with notifications.
I have 2 zones in my camera config (sidewalk and driveway )
Sidewalk only detects cars while driveway only detects person.
If someone walks(or at night a car’s headlights shine) in the sidewalk zone while the car is stationary in the driveway zone, I get a notification on my phone.
If I look at the automation trace it shows the last run a while ago (not the time of the notification)
I have debug enabled, the logbook entries start at the first run and continues all the way until the last notification (a large number)
Example last trace 9:43 PM, I have notifications until 11:01 PM like this

Frigate Notification DEBUG (in loop): Info: Last Zones: ['sidewalk'], Current zones: ['sidewalk'], sublabel: None, IOS sound: yes due critical notifications, Android Sound: disabled by alert once, Triggers: New Snapshot: False, Presence Changed: False, stationary moved: False, entered zones changed: False, sublabel changed: False, Conditions: Loitering: 0 or Presence Entity not home: OFF - PASS, zone filter TEST: ON - PASS, multi-zone filter: OFF - PASS, state filter TEST: OFF - PASS image: "/api/frigate/notifications/1686706934.382342-aztbxe/thumbnail.jpg?format=android" triggered by automation Car alert mqtt topic frigate/events

My question is why is the automation still running and why is the last run time is different.

My response is more general but the answer is almost certainly because you still have an event going for the car.

It is recommended by frigates docs to set the driveway zone up in a way that captures the car coming and going but not parked.

Let me know if you need more info.

This is how I set it up, I have 2 zones (sidewalk and driveway). The sidewalk is only for cars while the driveway is only for person.

The car stopped in the driveway zone means the event will never end (even though the car exited the sidewalk zone and entered the driveway zone). See the discussion on Frigate issue

This still doesn’t answer the question of why the last run for the automation was at the time of the first event and no update to the time even when I am receiving notifications.

The Devs of frigate seem to be giving you the same info I would.

There is an option on the beta blueprint at the very bottom to set the max number of times the automation can loop. Though I don’t know if this would make things worse or better in your case. You could try it.

I stopped tracking stationary cars a long time ago due to probably similar nuisance notifications. I note only do it on cams where my car’s go in and out of sight.

This is how HA works. The last triggered time is the last time the action was started. Your action is continuing for hours but the start time isn’t different

1 Like

Just wanted to clarify a few things:

  1. Frigate is designed to have an ongoing event the entire time the car (or any tracked object) is visible in the frame. This would also result in a stationary mqtt message every 60 seconds with stationary: True and the recommendation is to have an option to ignore those messages (I am not sure if the blueprint currently offers this)
  2. Another issue in 0.12 and previous frigate versions is that the car would get switched with a different car due to Frigate’s basic tracker which would lead to multiple car events while your car is parked the whole time. This has been addressed in 0.13 with a new tracker among other changes.
5 Likes

Might be a simple / silly question but is there any way to know when a new version (beta or stable) is released, assuming the best way to upgrade is copy paste the yaml file?

Unfortunately no good way unless I release very single beta change formally on GitHub.

For updating, yes that is a good way to do it.

I would love to know if the blueprint implements this feature as I think this is my issue now.

I heard from the devs about that change in v 0.13 and I am waiting for it.

Is there a way to set a duration for a state filter?

I want to turn off notifications on my doorbell camera if my door has been open within the last 3 minutes so I don’t get a notification every day when I walk out the front door and pass by my camera.

I have only been able to get it to shut off the notification when the door is physically open.

I know I could just turn off the doorbell camera for three minutes with an automation when the door opens but I don’t want to stop recording in case some event would occur while I’m getting in my car.

1 Like

I get around this to only get me a notification when i’am not home, using the tracker from my phone.

Currently you would have to create a template sensor that is true within 3 minutes of the door opening and false otherwise. And use that in the state filter.

I will look at adding an open template filter option.

Currently an increase in the position changes counter triggers an update. I can look at instead checking if frigate changes from stationary true to stationary false. Though I don’t know what is more of less sensitive.

Not sure if you are aware but you can select the phone in the presence filter and it looks for any state other than home.

Hi everyone.

I’ll have a new baby in the house any day now. Please consider raising feature request in GitHub as an easier way to track them when I have time. Better yet, raise a pull request with the changes to the beta blueprint which I can just review and approve. All of the above suggestions are quite simple and I will.get to them as I can, but it may be a little while.

6 Likes

Yes, I use this essential presence feature in many of my notifications. When the last person in my family group gets 100 meters from the house, we go on “lockdown, low energy consumption and high alert”. Unfortunately (or fortunately), my phone still registers as “home” when I am at the front door. Also, my wife being at home when I leave would break the logic, even if I knew how to get my phone to go into the “away” state the moment my foot crossed the threshold.

Hello all. Any experts that can help or advise.

My Frigate 12.1 is setup in HA with the HACS integration + 3 cameras. With the recent HA update, I have added network storage for my frigate data with my SD card nor being that big.

All seems to be ok apart from the notifications. I can see they open up in safari on my iPhone yet I have the HA app on my phone and the Nuba casa link to my HA.

The browser windows open and it just says “event not found”. I don’t get any action buttons either.

  • How can I get action buttons to work and how?
  • What do I need to add on the blueprint to get them working?
  • Should I add the Nuba case url?
  • I get updates every 2-5 secs when I set the cool-down to 60’sev, is this right?
  • with the network storage added, does the mapping need changing or does it pull from the local media?

My config is

alias: LR Motion1
description: “”
use_blueprint:
path: SgtBatten/Stable.yaml
input:
tv_transparency: 0%
camera: camera.livingroom
notify_device: a2cf113808a839811c9c7824bbc3ad69
title: Living Room Motion
message: A Person was detected on the Living Room camera.
attachment: thumbnail
tap_action: “{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4”
tv_size: large
tv_position: center
color: grey
url_1: “{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4”
url_3: silence-{{ camera }}
ios_live_view: true
update_thumbnail: true
icon: mdi:cctv
url_2: “{{base_url}}/lovelace”
tv_interrupt: false
base_url: https://(url).ui.nabu.casa/
cooldown: 60
button_1: Clip

Getting this error a lot now sometimes resulting in no notification even though even has been made, doesn’t happen always but still. I sent more info on the issue I have opened on github about IOS notifications, this seems like more then that though.

Trace file: https://file.io/5wMqCOjMde7b

Any more detail in the HA log?

1 Like

I started seeing this exact error message with the blueprint last week when I tried to use the “long” message type that showed the zone entered.

I tried using both the stable and beta blueprints but both had the same issues. (This was all on iOS devices by the way).

I narrowed it down to the input: message section of the blueprint.

I changed the following line:

value: "A {{ label }} {{ 'is loitering' if loitering else 'was detected' }} on the {{ camera_name }} camera{{ ' in the ' + entered_zones if entered_zones else '.'}}"

to this:

value: "A {{ label }} {{ 'is loitering' if loitering else 'was detected' }} on the {{ camera_name }} camera {% if entered_zones %}in the {{ entered_zones | join(', ') | replace('_',' ') }}{% endif %}."

The | join(', ') | replace('_',' ') section was to format the zone correctly in the notification, e.g. without it the zone “porch area” would end up displayed as “[(porch_area)]” in the notification.

Not sure if this is exactly the same issue you are seeing or not, but I just worked this out today. It seems to be working so far.

Hope it helps.

1 Like