Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
### TRIGGERS MOTION RECORDING ON CAMERA IN SECURITY SPY AND SAVES A PICTURE (CAPTURED IN HOMEASSISTANT) TO SEND VIA TELEGRAM WHEN A SENSOR ON LETTERBOX IS TRIGGERED
- alias: 'letterbox'
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.rf_reed_sensor_2 ### THIS IS A REED SENSOR ATTACHED TO THE LETTERBOX
from: 'off'
to: 'on'
action:
### THIS COMMAND TRIGGER THE CAMERA'S RECORDING IN SECURITY SPY ###
- service: shell_command.driveway_motion_trigger
### SENDS A SIMPLE MESSAGE TO TELEGRAM (USEFUL IF YOU DON'T WANT TO SEND PICTURES) ###
- service: notify.telegram
data:
title: "Letterbox Motion"
### THIS COMMANDS CAPTURE SCREENSHOT FROM THE SECURITY SPY FEEDS, AND SAVES THEM ONTO THE RASPBERRY PI ###
- service: camera.snapshot
data:
entity_id: camera.driveway_camera
filename: /home/homeassistant/.homeassistant/camera_snapshot/driveway.jpg
### THIS COMMANDS SEND THE CAPTURED IMAGE THROUGH TELEGRAM ###
- service: notify.telegram
data:
title: one
message: two
data:
photo:
- file: /home/homeassistant/.homeassistant/camera_snapshot/driveway.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.