From 2bafe1d9ba56031785a90307b9a5a933a3dd616c Mon Sep 17 00:00:00 2001 From: Brent Perdue Date: Thu, 1 Jun 2023 14:07:15 -0400 Subject: [PATCH] Add save clips to Blink services (#25329) --- source/_integrations/blink.markdown | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/source/_integrations/blink.markdown b/source/_integrations/blink.markdown index 97e0e276368..ffaecc4066f 100644 --- a/source/_integrations/blink.markdown +++ b/source/_integrations/blink.markdown @@ -152,11 +152,11 @@ Similar to the previous example, this automation will disarm blink when arriving entity_id: alarm_control_panel.blink_my_sync_module ``` -### Save Video Locally When Motion Detected +### Save Most Recent Video Locally When Motion Detected When motion is detected, you can use the Blink Home Assistant integration to save the last recorded video locally, rather than relying on Blink's servers to save your data. -Again, this example assumes your camera's name (in the blink app) is `My Camera` and your sync module name is `My Sync Module`. The file will be saved to `/tmp/videos/blink_video_{YYYMMDD_HHmmSS}.mp4` where `{YYYYMMDD_HHmmSS}` will be a timestamp create via the use of [templating](/docs/configuration/templating/). +The following example assumes your camera's name (in the Blink app) is `My Camera` and your sync module name is `My Sync Module`. The file will be saved to `/tmp/videos/blink_video_{YYYMMDD_HHmmSS}.mp4` where `{YYYYMMDD_HHmmSS}` will be a timestamp create via the use of [templating](/docs/configuration/templating/). {% raw %} @@ -175,3 +175,28 @@ Again, this example assumes your camera's name (in the blink app) is `My Camera` ``` {% endraw %} + +### Save All Recent Clips Locally on a Schedule + +A list of all the recent video clips is updated at each refresh of the Blink system. +The video clips are available in a download list (per camera) for up to an hour, +and they can be downloaded at any time before the one-hour expiration time. +After a clip is downloaded it is removed from the list. + +The following example demonstrates saving recent clips every three minutes. +It assumes your camera's name (in the Blink app) is `My Camera`. +The file will be saved to `/tmp/videos/YYYYMMDD_HHmmSS_MyCamera.mp4`. +The file name of the downloaded video file is not configurable. + +```yaml +- id: save_recent_clips_from_my_camera + alias: "Save Recent Clips from My Camera" + trigger: + - platform: time_pattern + minutes: /3 + action: + - service: blink.save_recent_clips + data: + name: My Camera + file_path: /tmp/videos +```