-
-
Save SgtBatten/10a2dc7f16af9f55f3ba83fe4523d8d7 to your computer and use it in GitHub Desktop.
blueprint: | |
name: Frigate Notifications by SgtB have moved | |
description: | | |
## ANNOUNCEMENT | |
I have moved from this gist to a github repositry. | |
Please checkout https://github.com/SgtBatten/HA_blueprints for the latest versions | |
domain: automation | |
input: | |
camera: | |
name: This blueprint has moved. | |
description: Please checkout https://github.com/SgtBatten/HA_blueprints for the latest versions | |
selector: | |
text: | |
default: https://github.com/SgtBatten/HA_blueprints | |
trigger: [] | |
action: [] |
@mrplow still not working for me, but images are updating again.
I'm considering hardcoding snapshots everywhere to test. Maybe frigate doesn't save the bounding box before the image gets sent.
@mr-brains please share your config for the automation like mrplow did above
here you go:
alias: beweging woonkamer beta
description: ''
use_blueprint:
path: hunterjm/frigate_0.11_15f-beta.yaml
input:
tv_transparency: 0%
camera: camera.huiskamer
notify_device: f1dd73c85b7201c8b2faad8ba0a3347a
base_url: http://external.url:8123
title: Beweging!
critical: 'true'
alert_once: true
tv_size: large
tv_position: center
color: red
message: persoon gedetecteerd in huiskamer
zone_filter: true
zones:
- side
- examples
zone_multi: false
debug: true
config from the cam:
huiskamer:
record:
enabled: true
ffmpeg:
hwaccel_args: preset-vaapi
inputs:
- path: rtsp://user:[email protected]:8554/
roles:
- detect
- rtmp
rtmp:
enabled: False
detect:
width: 640
height: 360
zones:
Side:
coordinates: 0,360,640,360,90,108,0,126
examples:
coordinates: 585,80,640,247,365,243,370,0
@mrplow I have tested extensively today. It seems the primary issue is simply that the snapshot is cropped and saved in the background sometime after the notification is sent. I have tried hardcoding snaphot.jpg instead of using the variable just in case, no change.
I have been testing by running two notifications in parallel for the same camera. one with thumbnail and one with snapshot. The thumbnail one shows a cropped image, the snapshot one shows an uncropped image despite being set to crop: true. Both update simultaneously as better snapshots are taken (i move closer to camera)
Clicking view snapshot on either notification shows me the uncropped image. If i wait a little while after ending the event the same url now shows me a cropped image with the bounding box. Not sure i can solve this one
@mr-brains I may see the issue. Can you grab me the debug output please, I see you have it enabled.
You can view it easily in the notification trace by clicking on this icon
One is 7 down from the top and the other is 6 up from the bottom. Im more interested in the bottom one which may have many iterations. The last one should be enough.
the top one:
Edited down to relevant bit by SgtBatten
Required zones: ['side', 'examples'],
Entered Zones: ['Side'],
also: Ah, there is where the debugging is going. i expected them in the logging of home assistant somewhere. :)
also: Ah, there is where the debugging is going. i expected them in the logging of home assistant somewhere. :)
It goes to the logbook also, but the formatting is hard to read. much easier to read in the trace.
I have just uploaded a fix for your issue.
The issue was capitalisation of your zones in frigate config.
Required zones: ['side', 'examples'],
Entered Zones: ['Side'],
See here that side is not the same as Side
The fix should make everything lowercase behind the scenes, regardless of your configuration. Please try the latest beta and let me know
on it. I was seeing that and so i tried to add the zone's with upper and lowercase. didn't work.
I let you know the result of the fix.
@SgtBatten
IT WORKS! thank you.
now up to finetuning my notifications.
i tried to add the zone's with upper and lowercase. didn't work.
Yep that wouldn't have worked because I was forcing the inputs to be lowercase already (due to users having the opposite problem to you. Now it does both so they should always match.
@mrplow I have a workaround and I really hate how much bigger the blueprint gets but try the latest beta (16a). It sends a final notification 10 seconds after the end of the event which seems to be enough time for my frigate instance to process the snapshot.
It will only send if update thumbnail is true and attachment is set to snapshot.
@Delta1977 forked from an original gist. I could change it for easier conversations/issue tracking though
@SgtBatten Do you have plans or a timeline to move to git?
@SgtBatten IT WORKS! thank you. now up to finetuning my notifications.
and that was it, worked 1 time :/
i am going to start allover, trow away what i have now and start with 1 camera.
let you know what happens.
first i had to restart HA,after that the camera we troubleshoot started working again. so that was something with my homeassist.
it looks like your blueprint doesn't like _ in the camera names. I renamed 1 camera and now it works.
other question, can i edit the zones in the automation yaml?
the tekst glitch is preventing me from typing but i kan paste and hit enter,or i just type it in the automation yaml.
@SgtBatten wow, that was a big change. So far so good though. I had two notifications so far this morning and both had the bounding boxes.
blueprint doesn't like _ in the camera names
I have _ in some of mine. It does handle them fine.
Yes you can edit the zones in yaml, select one of the examples and then edit it in yaml. I have raised an issue on GitHub and someone has already done a fix but it is not yet release in homeassistant.
@Delta1977 I will clean up this repo later today but you can now use https://github.com/SgtBatten/HA_blueprints and people can raise issues there.
@Delta1977 I will clean up this repo later today but you can now use https://github.com/SgtBatten/HA_blueprints and people can raise issues there.
@SgtBatten great. Thank you for your amazing work
Yes, git is much better. When I see the threat here how long it is