Frigate notification to HASS.Agent
as the title says, I want an automation that sends a notification to my windows pc via HASS.Agent. I've tried changing the
notify.device
entity in the automation but the Frigate blueprint seems to only work with mobile or any devices with the HA app installed.21 Replies
the action seems like it should work
but i get
Error rendering data template: UndefinedError: 'trigger' is undefined
and I'm not sure how the trigger should be laid out
I'm also not sure if the automation would only work when the actual event occurs and I can't just have it fetch the most recent image if I run the action manuallywhats your full auttomation
or whats your trigger
first thing that comes to mind is to check the docu if there's actually a payload_json[after][data][detections][0]
if it says trigger is undefined its probably in another variable
can you send me the blueprint too maybe? a link to it would be good, i can see if there's any relevant documentation
I managed to get the notification to pop up with this automation but there was no image - I may need to adjust the link:
this was without the blueprint entirely, but this is the one i was going to try and alter https://community.home-assistant.io/t/frigate-mobile-app-notifications-2-0/559732
Home Assistant Community
Frigate Mobile App Notifications 2.0
Preamble In 2022, a home assistant release caused issues with the original blueprint. It seems @hunterjm has not visited that thread in some time. I have updated the blueprint and added dozens of new features. I am continuing to do so and the mods have split the thread here to make things simpler. Thank you very much Hunterjm for the foundationa...
Yeah trigger undefined was definitely a problem, but if it works now you just need to play around with the data
I don't have ffrigate myself so idk there,e if you can give me the trigger object i can help figure it out, and an example link
If you need help with that in the first place ofc
yeah it's just a matter of getting the image to appear
right now it's just this
so i think i need to mess with the variables
looks like the link is correct as
https://[link]/api/frigate/notifications/[event id]/snapshot.jpg
i just need to get the event id to replace it as a variableGet this working?
Nope unfortunately not.
Haven't touched it in a while
I use this myself, got a notification 10 mins ago, so i'll have a look and see if we can get yours working. Have you updated recently? Forked integration and 2.1.0?
Haven't updated in a while as I was away for Christmas. Are you able to share how you got it to work?
Yeah just working on my server, will grab config once its running again
hiya mate, were you able to have a look at this?
i'm planning to get a reolink doorbell so i'm hoping to get that working over frigate
@Ani I've got this mostly working, so I'll dig up the details in a moment. I came looking for info about getting the URI: links working as they don't seem to be getting passed to the browser, but I do get notifications with a snapshot, so partially there.
awesome mate! thanks for chiming in
looking forward to seeing it
Alright @Ani see if this helps:
https://pastebin.com/r2HgEAbt
Pastebin
Add this to your configuration.yaml:```#Notification Groupsnotify: ...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
@Cake1468 assuming this is your original code would I be able to use it on the docs?
Will just paste it as an example, frigate and stuff is too niche to do as part of actual docs, but will have a page of examples with links like yours. Will credit obvsly.
Yes, Happily!
The second part is YAML generated from SgtBatten's blueprint, but the rest and comments are mine.
I hope it all makes sense with the places to change things. I understand {insert change here} is common, but with HA templates I got a little concerned people might not change them and think they were part of the code itself.
Might you have time sometime to work with me to figure out why the links from the notification buttons don't seem to be working? That would be the cherry on top for this component.
Also, if it's for a doc, I should probably clean up that BP YAML a little. There are a few lines that I don't think are needed. You're welcome to include it anytime, and I'll send you an update once I've dialed it in.
@DrR0x Here's an edit of what I posted the other day that's a little cleaned up:
https://pastebin.com/bPjp2BSA
Pastebin
Frigate Notifications Blueprint with HASS Agent - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
if you'd be so kind as to take a look when you have an opportunity.
I have the following from a trace that triggered a notiifcation to HASS Agent correctly, with a snapshot as desired, however nothing happens when you click the bottons.
https://pastebin.com/PcJ1h9qa
If I copy the URLs and paste them into the browser I can access the live stream or recording as desired.
In HASS Agent I have the following settings for "External Tools", and "Test" works to open the browser in the correct profile as desired.
However, nothing happens when I click the links.
Here's a MQTT that displays a notificaiton
https://pastebin.com/BPFdcx8S
I just happend to have MQTT Expored open, and when I clicked a link, this showed up:
Perhaps I have the notification Blueprint configured wrong so that instead of opening the link it sends an MQTT message? I tried both 'URI' which is what the blueprint defaults to, and "uriopen" which is suggested in the HASS Agent docs.
Pastebin
Frigate/Hass Agent Troubleshooting 2 - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Frigate/Hass Agent Troubleshooting 1 - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.