Frigate Mobile App Notifications 2.0

Love this Blueprint thank you so much for the work on it. I have been using it a for a little over a year now and been great. I upgraded to frigate+ and now playing around with some more detection with car objects and this is where my problem comes in.

For my front door camera I have a zone set up for my notifications so I don’t get notifications for sidewalks and street traffic. This works except for one thing. It seems that when a frigate/event come in it triggers the “cooldown” timer in the blueprint even if the event was outside of my required zone. This ends up making me miss notifications in my required zone due to the cooldown timer being active. How can I make it so the cooldown timer only activates on events from inside the required zone?

This is my observations of my system and my best guess of what is happening. First time posting on here so not sure what is really needed in terms of .yaml etc.

It would require a reorganisation of where the conditions are in the blueprint which would make it impossible to troubleshoot . I had to prioritise debugging as too many people make errors in Configs.

Now with frigate 0.14 we will be using the reviews topic going forward so if you configure the same zone to be required for an “alert” within frigate it will do what you are asking.

For now though, if using the frigate 0.14 branch of the blueprint (pull request 216 on GitHub) cooldown will stop it working as I have not designed the loop.

Hello everyone! I have recently moved my Frigate instance to a new machine and added some cameras. Frigate is all up and running according to plan now, but as I am adding notification automations to HA, I seem to be running into some snags…

I can’t seem to get notifications to hit my phone, although it seems the automation is being triggered. It just fails to follow through.

Attached is the example of the only error I can seem to find being generated here which is also below:

“Error: UndefinedError: ‘dict object’ has no attribute ‘snapshot’”

I run into some rare occasions where the notification will actually send, but then I get 404 error on snapshot attachment…

I am using frigate/reviews as the MQTT topic (as it looks like that has recently changed). I am running the latest stable Frigate install (0.14.1-f4f3cfa)

Any advice on what to look at next would be a great help!
Thanks!

Here is also a screenshot of the automation error with debug turned on:

Probably the issue, as I assume you aren’t using the reviews version

Local testing isn’t working, direct to HA local port, getting a bad gateway 502.

image

Looking at the Commit for support HLS proxying, it seems to redirect to a different root than /api…


        elif path.endswith("clip.mp4"):`
            url_path = f"api/events/{event_id}/clip.mp4"
       elif path.endswith("master.m3u8"):`
            url_path = f"vod/events/{event_id}/master.m3u8"`

Will try to do more testing tonight.

I don’t think the vod API works the same as api for clip… will play with this later.

Recordings

GET /vod/<year>-<month>/<day>/<hour>/<camera>/master.m3u8

HTTP Live Streaming Video on Demand URL for the specified hour and camera. Can be viewed in an application like VLC.

GET /vod/event/<event-id>/index.m3u8

HTTP Live Streaming Video on Demand URL for the specified event. Can be viewed in an application like VLC.

GET /vod/<camera>/start/<start-timestamp>/end/<end-timestamp>/index.m3u8

HTTP Live Streaming Video on Demand URL for the camera with the specified time range. Can be viewed in an application like VLC.

Ahh okay I missed that vod part of the url.

Maybe @crzynik can lend a hand in the best approach.

This is an issue on the integration side

I found part of the problem…

In the frigate integration, the redirect URL has events, not event.

url_path = f"vod/event/{event_id}/master.m3u8"

No “s” on event.

Second problem though, master.m3u8 redirects to index-v1-a1.m3u8, but then it tries to load:

GET /api/frigate/notifications/XXXX.YYYY-ZZZZ/frontdoor/index-v1-a1.m3u8?external_auth=1 HTTP/1.1 Host: <IP>:8123 Accept: */* Accept-Language: en_US User-Agent: VLC/3.0.20 LibVLC/3.0.20 Accept-Encoding: deflate, gzip Cache-Control: no-cache 
http debug: incoming response: HTTP/1.1 404 Not Found Referrer-Policy: no-referrer X-Content-Type-Options: nosniff Server: X-Frame-Options: SAMEORIGIN Content-Length: 0 Date: Sun, 15 Dec 2024 02:16:42 GMT 

Edit: as i play with the URLs, there is an entire set of VOD redirection built into the frigate component (see views.py), but it needs authentiecation.

I believe proper URL to build will be something like:

/api/frigate/vod/event//master.m38?external_auth=1

Ok, not ideal, but works for now. Had to hack some changes into the NotificationProxy section of the views.py of the frigate integration so it can redirect the 2 redirections from m3u8 files.

I just harded coded to the file name I saw, didn’t test if this changes yet.

But now with this, “View Clips” works again on iOS.

        elif path.endswith("master.m3u8"):
            url_path = f"vod/event/{event_id}/master.m3u8"
        elif path.endswith("index-v1-a1.m3u8"):
            url_path = f"vod/event/{event_id}/index-v1-a1.m3u8"
        elif path.endswith("seg-1-v1-a1.ts"):
            url_path = f"vod/event/{event_id}/seg-1-v1-a1.ts"            

Edit: Sure enough, the file name changes. Made the change a little more generic to handle more situations. This way allows this stream to work without Auth based on the auth-free notification option. If there is a better way to use the normal /vod/ methods, then that may be a better way, but those seem to require HA auth.

        elif path.endswith(".m3u8"):
            url_path = f"vod/event/{event_id}/{path[path.rfind('/')+1:]}"
        elif path.endswith(".ts"):
            url_path = f"vod/event/{event_id}/{path[path.rfind('/')+1:]}"
2 Likes

Basic question - I am running Frigate 14, want to try 15-beta during christmas.

Which notification version/branch should I use?
14 => branch frigate-0.14 or main
15 => ?

Thanks for your help :slight_smile:

14 branch is working for me, the difference is that 14 supports “reviews” as opposed to just “events” which is a grouping of events which occur at the same time put together so it makes it less noisy.

15 doesn’t change things around reviews.

1 Like

Ok thanks, so I stick to 14 branch beta :slight_smile:

Wondering if someone is having a similar problem to me, I am on 0.12.0.3c (So I do intent to upgrade!) - There is a discrepancy between what these notifications think is an event, and what Frigate thinks is an event.

This morning Amazon pulled slightly into the driveway and got out, walked to the door, threw a package and left

I got alerts on my phone for Driveway, Front Path, Front Door

However, in Frigate I only see Front Path and Front Door. There are no events for Driveway

Its borderline whether I should have an event for Driveway, as they were only slightly in the motion/object masks

What’s throwing me off is the discrepancy between the two. Of course when I click the notification for Front Left, I get an error page because there is no JPEG to view in Frigate because it didn’t think there was an event

How come I got a notification on my phone?

This happened the other day too when a bunch of Racoons were running around my back yard, and I got a “Person in back yard” notification, only to look in Frigate and see nothing. This makes tuning the alerts very hard, because I have no idea what the size of the object was or where it was on the camera, etc

1 Like

I’m having a bit a trouble with my notifications. If I upgrade my integration to the new 5.6.0 I get 404 message. Is this something to do with how the events are sent out (as above). Or is there something else I need to change?

Is there a way to configure notifcations in a way that they are not triggered if another camera monitoring the same area also detected an object and notification was triggered? I have cameras setup in a way that they monitor some areas from 2 corners of the building but I’m getting swamped with “duplicate” notifications from both of them

Ehi @SgtBatten thanks for the awesome blueprint!
I’m just getting started with it but it works perfectly!
I would like to customize another button of the three available but I’m not sure what I should do.

I understand I can enter a custom URL but what should I enter to call an action like toggling an input boolean? Sorry if it’s a stupid question but I searched a lot and couldn’t find an answer.

Thanks!

Edit: I managed to add two custom actions instead of just one so it’s now possible to have three different customizable actions without using a custom URL. Is there a reason why it is not as default in the blueprint? I’m not saying it’s better like this, I’m just asking to make sure I’m not missing something. Thanks!

I can’t get the telegram function of the beta to work. Since the blueprint doesn’t specify the name of the telegram bot that is setup TO send the notifications to a telegram chat ID, where are they messages coming from?

I end up with this


setting used.