I have a motion detector and a camera at the front door.
Main target:
Take a series of pictures, maybe more that only 6 to make sure I capture what was trigging the motion detector, and to be able to go back to watch the photos at a later time. I would appreciate some input on how I would review them effectively too
Here are two issues here:
- Simplify the action code - maybe do a loop (for… ?), or something completely different.
- Capture pictures faster than per 1 second?
- How would I review the captured photos effectively?
My action:
which is triggered by a motion detector at the front door.
- alias: Motion at frontdoor
trigger:
- platform: state
entity_id: binary_sensor.pir_inngangsparti_sensor
from: 'off'
to: 'on'
action:
- service: notify.adults
data:
title: Hoveddør
message: Hvem er utenfor døra?
data:
attachment:
content-type: jpeg
push:
category: camera
entity_id: camera.ringeapparat_camera
- service: camera.snapshot
data:
entity_id: camera.ringeapparat_camera
filename: '/config/www/camera_snapshots/frontdoor/frontdoor_1.jpg'
- delay: 00:00:01
- service: camera.snapshot
data:
entity_id: camera.ringeapparat_camera
filename: '/config/www/camera_snapshots/frontdoor/frontdoor_2.jpg'
- delay: 00:00:01
- service: camera.snapshot
data:
entity_id: camera.ringeapparat_camera
filename: '/config/www/camera_snapshots/frontdoor/frontdoor_3.jpg'
- delay: 00:00:01
- service: camera.snapshot
data:
entity_id: camera.ringeapparat_camera
filename: '/config/www/camera_snapshots/frontdoor/frontdoor_4.jpg'
- delay: 00:00:01
- service: camera.snapshot
data:
entity_id: camera.ringeapparat_camera
filename: '/config/www/camera_snapshots/frontdoor/frontdoor_5.jpg'
- delay: 00:00:01
- service: camera.snapshot
data:
entity_id: camera.ringeapparat_camera
filename: '/config/www/camera_snapshots/frontdoor/frontdoor_6.jpg'
- service: notify.email # send email to PĂĄl and Eva
data:
title: 'Bevegelse ved hoveddør'
message: 'Bilder fra de 12 første sekundene'
data:
images:
- /config/www/camera_snapshots/frontdoor/frontdoor_1.jpg
- /config/www/camera_snapshots/frontdoor/frontdoor_2.jpg
- /config/www/camera_snapshots/frontdoor/frontdoor_3.jpg
- /config/www/camera_snapshots/frontdoor/frontdoor_4.jpg
- /config/www/camera_snapshots/frontdoor/frontdoor_5.jpg
- /config/www/camera_snapshots/frontdoor/frontdoor_6.jpg