Lady Catterton's Automated Cat Alert System
Lady Catterton isn't allowed outside, but she doesn't let that stop her from keeping a close eye on the neighborhood cats that pass by. Here's how she does it.
Lady Catterton runs Home Assistant OS on a spare HP Mini PC. You can read about how she set it up here: https://www.wswapps.com/books/home-assistant/page/setup-home-assistant-on-a-mini-pc
Lady Catterton runs Frigate NVR as an addon in HAOS to monitor that cameras and detect object. You can read about her setup here: https://www.wswapps.com/books/home-assistant/page/frigate-nvr
And finally, Lady Catteron has configured automations in Home Assistant to let you know any time she spots a fellow kitty. Here's an example of how she does that. She prefers to post to Mastodon, but you could post your important news anywhere. Maybe one day she'll get more creative with her words as well. Kitten steps.
This looks for cat events on a specific camera only after they have ended, to ensure we only post about it once. At the end we delay for 5 minutes to ensure that we don't get too excited and post again too soon.
alias: Mastodon - Back Door Cat
description: Posts to Mastodon with cat image when Frigate detects a cat
triggers:
- trigger: mqtt
topic: frigate/events
payload: end
value_template: "{{ value_json.type }}"
conditions:
- condition: template
value_template: >-
{{ trigger.payload_json.after.label == 'cat' and trigger.payload_json.type
== 'end' and trigger.payload_json.after.camera == 'Back_Door' }}
enabled: true
actions:
- variables:
source_filename: >-
{{ trigger.payload_json.after.camera }}-{{ trigger.payload_json.after.id
}}.jpg
enabled: true
- delay: "00:00:03"
- data:
config_entry_id: MASTODON_ACCOUNT_ID_ASSIGNED_BY_HA_HERE
visibility: unlisted
status: >-
A 🐱 just came by the back door!
#cat #homeassistant #frigate
media_description: >-
I'm {{ (trigger.payload_json.after.score * 100) | round(1) }}% sure this
is a cat!
media_warning: false
media: /media/frigate/clips/{{ source_filename }}
action: mastodon.post
- delay: "00:05:00"
mode: single