Yep, that’s the case.
I don’t understand why it kept sending them with the automation ‘off / disabled’ though (only via blueprint) and then stopped sending the notifications once I manually enabled and re-disabled the automation.
Yep, that’s the case.
I don’t understand why it kept sending them with the automation ‘off / disabled’ though (only via blueprint) and then stopped sending the notifications once I manually enabled and re-disabled the automation.
Because it wasn’t a new event. It was still ongoing for the whole 20+ minutes.
But wouldn’t the automation being disable shut of any notifications? I guess I just don’t know how the notification system is being handled in the background
That was my understanding before I saw how the original blueprint was implemented.
But no, if it’s already been triggered, disabling the automation does not terminate the existing run.
I’m wondering if we could do a simple kill message though.
Interesting. I did some searching a week ago about stopping a different automation and had concluded that the way to do so was to disable it, but never connected the dots that it doesn’t work like that with this one.
Here’s what I found from my prior search.
It appears that a PR was merged some time ago that made the functionality of stopping an automation by calling automation.turn_off
.
I’m not familiar enough yet with this BP to know if there’s some reason it isn’t effected by this, but it doesn’t seem to be. (I did observe an active trace that was silenced during recent debugging and realized that’s how the silence feature works). Perhaps something in that thread stands out to either of you.
Hi there,
I noticed that the notification channel seems to be ignored when customized. I did check some of the notifications at the app and despite me setting the channel to “surveillance” in the blueprint the reported channel in history of the app was still “alarm_stream”. Anyone else had something similar?
The automation has to keep running as the way the silence function itself works is to run, disable the automation, wait for the specified time and then reenable itself.
This might be expected with android but alarm stream usually indicates you are using critical. Is that right?
should your „latest“ version now work…. Got the same error message like before if I’m useing your posted link…
That link is to a particular version of the file.
Check the pull requests on GitHub, I think it’s #216
@SgtBatten I tried importing the 0.14 beta blueprint (pull request #216) into HA, but it gave the following errors.
Failed to load blueprint: while parsing a block mapping: line 1325, column 35 expected , but found ‘{’ in “/config/blueprints/automation/SgtBatten/Frigate014_beta.yaml”, line 1326, column 43
Failed to load blueprint: invalid key: “{‘title’: None}” in “/config/blueprints/automation/SgtBatten/Frigate014_beta.yaml”, line 1142, column 0
I tried correcting these typos… but when I try to use the blueprint and save the automation in HA I get the following error:
Message malformed: template value should be a string for dictionary value @ data[‘action’][0][‘choose’][2][‘sequence’][5][‘repeat’][‘sequence’][5][‘choose’][0][‘sequence’][0][‘default’][0][‘data’]
I did not set anything intentionally. Where do I have to check for that?
Like a few on here, I’m getting issues with "Failed to Load Attahment: on both my notifications on my IOS device and on my Apple Watch.
When I click to view the clip or the snapshot its fine. I get this whether i’m on the same network as HA or remotely through HA Cloud. Any ideas where I’m best to look first please?
alias: Frigate Notifications Person Detected
description: ""
use_blueprint:
path: SgtBatten/Beta.yaml
input:
camera: camera.front_doorbell
notify_device: 1215068044ae6bf1f721e1f4632a96fc
base_url: https://xxx.ui.nabu.casa
message: A Person was detected at the Front Door
labels:
- person
update_thumbnail: true
attachment: ""
cooldown: 30
tap_action: >-
{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4
button_1: View Clip
update_sub_label: true
debug: true
Let me know if you need anything more, thanks
That all makes sense. I’m just wondering how it works in light off the PR which seems to be directly addressing this situation (the desire to intentionally stop a looping run). Is there something about the way the silence process works in this BP that avoids the stop of the previous run?
Not a big deal, just more wondering for the understanding.
Quick follow up for anyone interested in making the a custom action for TTS or similar more consistent…
I was able take my existing “custom action auto” and copy it into the “custom action loop” since it already had an input_boolean
that disabled itself for 60 seconds as part of the action. That boolean was there to avoid the speaker from playing too many messages. I’d turned down the cooldown period as the camera picked up vehicles on the road and was missing vehicles in the driveway.
NOTE - it’s now in both the “auto” and “loop” sections and only triggers a TTS once because of the boolean.
For testing purposes I added a message sent to my phone of “loop” or “not loop”. As it turns out, this was the solution. Now my TTS to the house speakers is triggered either by the “auto” or “loop” part of the blueprint, but only once within 60 seconds.
Thanks for walking me through that Sgt!
alias: Frigate TTS - Front Gate
description: ""
use_blueprint:
path: SgtBatten/Beta.yaml
input:
camera: camera.frigate_lorex_01_gate
notify_device: 9be781ad60f411e59df2cbe2c4690a11
update_thumbnail: false
channel: frigate
video: >-
{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4
sticky: false
tap_action: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg"
icon: >-
mdi:{{'account-outline' if label == 'Person' else 'dog' if label == 'Dog'
else 'cat' if label == 'Cat' else 'car' if label == 'Car' else
'home-assistant'}}
zone_filter: true
labels:
- person
- car
button_3: Silence New
url_2: >-
{{base_url}}/api/camera_proxy_stream/camera.{{trigger.payload_json['after']['camera']
| lower | replace('-','_')}}?token={{state_attr( 'camera.' ~ camera,
'access_token')}}
button_2: View Stream
tv: false
cooldown: 1
attachment: snapshot.jpg
zones:
- gate_driveway_entrace
- gate_driveway
- gate_flower_cart
custom_action_auto:
- if:
- condition: state
entity_id: input_boolean.notifications_sonos
state: "on"
- condition: state
entity_id: input_boolean.frigate_notifications_sonos
state: "on"
then:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- service: chime_tts.say
data:
chime_path: whistle
offset: 500
tts_speed: 80
tts_pitch: 0
announce: true
cache: true
tts_platform: tts.piper
message: >-
A {{ label }} {{ 'is loitering' if loitering else 'was detected'
}} on the Gate camera.
target:
entity_id:
- media_player.sonos_upstairs
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.frigate_notifications_sonos
data: {}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.frigate_notifications_sonos
data: {}
- service: notify.mobile_app_x
metadata: {}
data:
message: Not loop
enabled: true
message: >-
A {{ label }} {{ 'is loitering' if loitering else 'was detected' }} in the
driveway.
alert_once: true
debug: false
custom_action_auto_multi:
- repeat:
sequence: []
until:
- condition: template
value_template: >-
- '{{ custom_action_auto |length > 0 }}'
- >-
{{ not zone_only or (not zone_multi and zones|select('in',
enteredzones)|list|length > 0) or (zone_multi and enteredzones|length > 0
and zones |reject('in', enteredzones) |list |length == 0) }}
- '{{ not initial_home }}'
- '{{ not state_only or states(input_entity) in states_filter
}}'
enabled: false
- if:
- condition: state
entity_id: input_boolean.notifications_sonos
state: "on"
- condition: state
entity_id: input_boolean.frigate_notifications_sonos
state: "on"
then:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 500
- service: chime_tts.say
data:
chime_path: whistle
offset: 500
tts_speed: 80
tts_pitch: 0
announce: true
cache: true
tts_platform: tts.piper
message: >-
A {{ label }} {{ 'is loitering' if loitering else 'was detected'
}} on the Gate camera.
target:
entity_id:
- media_player.sonos_upstairs
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.frigate_notifications_sonos
data: {}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.frigate_notifications_sonos
data: {}
- service: notify.mobile_app_x
metadata: {}
data:
message: Loop
trace:
stored_traces: 10
Sorry it took a little longer, was busy with something else. Here’s my config:
alias: Kamera Eingang
description: ""
use_blueprint:
path: SgtBatten/Stable.yaml
input:
camera: camera.eingang
notify_device: 9b7d87e3a8c0eaf9688d4d4a0f36f351
base_url: https://xxx.ui.nabu.casa
critical: "{{'true' if is_state('sun.sun', 'above_horizon') else 'false' }}"
alert_once: true
attachment: thumbnail.jpg
update_thumbnail: true
title: 📸 Kamera Eingang 📹
icon: >-
mdi:{{'account-outline' if label == 'Person' else 'dog' if label == 'Dog'
else 'cat' if label == 'Cat' else 'car' if label == 'Car' else
'home-assistant'}}
message: "{{label}} wurde am {{camera_name}} erkannt!"
cooldown: 120
button_1: Clip anzeigen
button_2: Snapshot anzeigen
button_3: Stumm
url_3: silence-{{ camera }}
notify_group: alle_handys
silence_timer: 60
sound: none
android_auto: true
update_sub_label: false
labels:
- person
- car
disable_times: []
channel: surveillance
Thanks!
Your attachment is set to none