Great AddOn!
I’m trying to use the snapshots in an automations in order to save them on motion. I tried this by calling the following on motion, to download the image from the attribute (based on this post: Using a variable (attribute) as a url for downloading - #12 by CrouchingWorm).
service: downloader.download_file
data_template:
url: https://192.168.2.253:8123/api/camera_proxy/camera.front_door_snapshot?token=3fa23de984a746b5a9e1cf3b06a6114100ceba5a5b8615f12bae0b05c9b2bce4
subdir: Doorbell/May 2022/
filename: Bell Snapshot - {{ now().strftime("%d-%m-%Y- %H.%M.%S") }}.jpg
This results in all sorts of security notifications from HA:
Now I understand this does not directly have to do with the AddOn, but maybe there are other of it’s users here that try to accomplish the same. The downloader is to be called after the following in an automation:
- conditions:
- condition: trigger
id: doorbell_oncameramotion
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.front_door_live_stream
- service: timer.start
data:
duration: '00:04:00'
target:
entity_id: timer.front_door_camera_stream
- service: camera.snapshot
data:
filename: >-
/media/Doorbell/{{ now().strftime("%B %Y") }}/Motion Snapshot -
{{ now().strftime("%d-%m-%Y- %H.%M.%S") }}.jpg
target:
entity_id: camera.03cabcc9_ring_mqtt
- service: camera.record
data:
filename: >-
/media/Doorbell/{{ now().strftime("%B %Y") }}/Motion Video - {{
now().strftime("%d-%m-%Y- %H.%M.%S") }}.mp4
duration: 240
target:
entity_id: camera.03cabcc9_ring_mqtt
- conditions:
- condition: trigger
id: timer_finish
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.front_door_live_stream
The later video recording works, but downloading the snapshot doesn’t. Am I missing something?