Hi all
Im struggling with understanding notifications I have the below but not all works. I get the alexa notification but not the tts.
Im trying to get a TTS announcement on my phone and the snapshot image and local notification on an alexa device.
Im obviously doing it wrong any advice please.
automation:
- alias: Notify of events
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.alexa_media_kitchen_echo_show
data_template:
message: A Person has been Detected at the front door.
data:
type: announce
method: all
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.mobile_app_sm_n960f
data_template:
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
data:
image: 'https://7k2zezkmoid2mfmuenyj4nzstlyb4qnf.ui.nabu.casa/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
ttl: 0
priority: high
channel: "alarm_stream_max"
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.mobile_app_sm_n960f
data_template:
message: TTS
title: 'A {{trigger.payload_json["after"]["label"]}} has been detected at the front door.'
data:
ttl: 0
priority: high
channel: "alarm_stream_max"
Does that even pass the config checker? I would be surprised if so.
you only need one trigger section in the automation.
then add all the actions in the action section.
Also data_template isn’t used any more. it’s just data now.
automation:
- alias: Notify of events
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.alexa_media_kitchen_echo_show
data:
message: A Person has been Detected at the front door.
data:
type: announce
method: all
- service: notify.mobile_app_sm_n960f
data:
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
data:
image: 'https://7k2zezkmoid2mfmuenyj4nzstlyb4qnf.ui.nabu.casa/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
tag: '{{trigger.payload_json["after"]["id"]}}'
ttl: 0
priority: high
channel: "alarm_stream_max"
- service: notify.mobile_app_sm_n960f
data:
message: TTS
title: 'A {{trigger.payload_json["after"]["label"]}} has been detected at the front door.'
data:
ttl: 0
priority: high
channel: "alarm_stream_max"
Update
TTS now working
also added a delay so I only get 1 notification per minute
- alias: Notify james mobile TTS on person front door
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.mobile_app_sm_n960f
data:
message: TTS
title: 'A {{trigger.payload_json["after"]["label"]}} has been detected at the front door.'
data:
ttl: 0
priority: high
channel: "alarm_stream_max"
- delay:
minutes: 1
I have recently installed and started using Frigate. I’ve set up the MQTT notifications too and I’ve also noticed that from a single event I’ll get multiple notifications. In the Frigate docs it shows this:
# Optional: timeout for highest scoring image before allowing it
# to be replaced by a newer image. (default: shown below)
best_image_timeout: 60
I thought it would hold off on sending any MQTT announcements before picking the image to include but adding this timeout didn’t seem to do anything about the onslaught of notifications I get when a camera gets triggered. Usually, I’ll get 2-4 notifications on the same incident. Is there some way to adjust a “lock-out” for the camera trigger? I’d like to set it to something like 30 seconds to a minute.
- id: '1605123353940847'
alias: Notify james mobile TTS on person front door
trigger:
platform: mqtt
topic: frigate/events
action:
- service: notify.mobile_app_sm_n960f
data:
message: TTS
title: A {{trigger.payload_json["after"]["label"]}} has been detected at the
front door.
data:
ttl: 0
priority: high
channel: alarm_stream_max
- delay:
minutes: 1
I have also started using the frigate blue print for notifications. That works brilliantly apart from 1 thing. The TTS notification comes through within about 10 seconds the blue print one can be similar or 10 minutes later. Im assuming its because its missing this bit
data:
ttl: 0
priority: high
channel: alarm_stream_max
But i dont as yet see a way to modify the blueprint, or see the yaml it genertates
What you posted above is an automation, not a blueprint (they’re two different concepts). When you say “blueprint” are you referring to the automation you posted or to a separate blueprint that you have not posted yet?