Blink.save_video files saved with 0 bytes

Hi,

I have an automation to save blink videos which is working, but files saved are always 0 bytes.

For example, /media/20210208_151702_blink_video.mp4 with 0 bytes

The recorded video seems fine, and is viewable using the Blink app with a timestamp of 15:14 and is 8 seconds long.

There are no errors in the log files – just the following info entries related to the event:

Log files:

2021-02-08 15:17:02 INFO (MainThread) [homeassistant.components.automation.save_blink_video_on_motion] Save Blink Video on Motion: Running automation actions

2021-02-08 15:17:02 INFO (MainThread) [homeassistant.components.automation.save_blink_video_on_motion] Save Blink Video on Motion: Executing step call service

2021-02-08 15:17:02 INFO (MainThread) [homeassistant.components.automation.save_blink_video_on_motion] Save Blink Video on Motion: Executing step call service

Automations.yaml entry:

- id: save_blink_video_on_motion
  alias: Save Blink Video on Motion
  trigger:
  - platform: state
    entity_id: binary_sensor.blink_nameredacted_motion_detected
    to: 'on'
  action:
  - service: blink.save_video
    data:
      name: Outdoor
      filename: /media/{{ now().strftime("%Y%m%d_%H%M%S") }}_blink_video.mp4
  - service: persistent_notification.create
    data:
      message: Motion detected. Review it in the media files
  mode: single

Version Information: Version core-2021.2.2
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
Virtual Environment false
Python Version 3.8.7
Operating System Family Linux
Operating System Version 5.4.83-v8
CPU Architecture aarch64
Timezone GB

Host Operating System Home Assistant OS 5.11
Update Channel stable
Supervisor Version supervisor-2021.02.6

Blink Version Last Updated 09/02/2021 17:44:07
Camera Firmware 10.38
Sync Module 2 Firmware: 4.2.12

Yeah this has been fixed in an update to the library that has not been rolled into home-assistant yet. If you’re python saavy enough you can edit the manifest.json in the components/blink folder to update blinkpy to either 0.16.5rc0 or 17.0.0rc0. note, you’d also have to make this change in the requirements.txt file (just grep for blinkpy to find all the places to update…that’s probably easiest)

If what I just said sounded like nonsense, don’t worry, just hold tight and I’ll try to get the fix into HA soon :slight_smile:

I added an issue to home-assistant to track. So you can follow here to see progress :+1: https://github.com/home-assistant/core/issues/46447#issuecomment-778163631

Thanks @fronzbot. Will give it a try.