Hi I am using the blink integration. But I can’t get the scripts working.
Here is what I did:
-First I allowed the /tmp folder in the configuration.yml
homeassistant:
allowlist_external_dirs:
- "/tmp"
-Restart Home Assistant
-tmp folder exists (checked in the terminal)
[core-ssh ~]$ ls -la /tmp/
total 16
drwxrwxrwt 1 root root 4096 Jul 26 16:35 .
drwxr-xr-x 1 root root 4096 Jul 24 15:14 ..
drwxr-xr-x 2 root root 4096 Jul 24 15:15 .bashio
drwx------ 2 root root 4096 Jul 24 17:44 tmux-0
[core-ssh ~]$
Settings → Automation & Scenes → Scripts → Add Script → Create New Script → Edit in YML
Pasted this:
alias: "Blink Snap Picture"
sequence:
- service: blink.trigger_camera
target:
entity_id: camera.blink_my_camera
- delay: 00:00:05
- service: blink.blink_update
- service: camera.snapshot
target:
entity_id: camera.blink_my_camera
data:
filename: /tmp/my_image.jpg
I tried it like this and also changed it to this because my camera is called Garage in the App.
alias: Blink Snap Picture
sequence:
- service: blink.trigger_camera
data: {}
target:
entity_id: camera.garage
- delay: "00:00:05"
- service: blink.blink_update
data: {}
- service: camera.snapshot
target:
entity_id:
- camera.garage
data:
filename: /tmp/my_image.jpg
I don’t get any file in the /tmp directory.
I also added multiple cameras to the script like this:
alias: Blink Snap Picture
sequence:
- service: blink.trigger_camera
data: {}
target:
entity_id:
- camera.garage
- camera.haus
- camera.nebengebaude
- delay: "00:00:05"
- service: blink.blink_update
data: {}
- service: camera.snapshot
target:
entity_id:
- camera.garage
- camera.haus
- camera.nebengebaude
data:
filename: /tmp/my_image.jpg
also no success.
I also tried another script which I want to use:
- id: save_blink_video_on_motion
alias: "Save Blink Video on Motion"
trigger:
platform: state
entity_id: binary_sensor.blink_my_camera_motion_detected
to: "on"
action:
service: blink.save_video
data:
name: "My Camera"
filename: "/tmp/videos/blink_video_{{ now().strftime('%Y%m%d_%H%M%S') }}.mp4"
Here I get the message when I want to save the script:
Message malformed: expected a dictionary
Can anyone explain me how to use this integration and what I am doing wrong here.
I am using a Sync Module 2 and 3 x Blink Mini Cameras.