Downloading local Blink videos

There’s an awesome project on github (Blinkpy https://github.com/fronzbot/blinkpy) that enables downloading the videos on the sync 2 module. Since I’ve got a mini linux box available, I wrote a fairly simple program that, when run, downloads all the existing videos to local storage and then deletes them from the sync module.

A brief note on where your can host this!

You can host this program anywhere, since Blinkpy is using the (undocumented, unsupported, YMMV) Blink API to work with the sync module, NOT local network access. Obviously that means the videos on the sync module storage card are UPLOADED to blink servers and then DOWNLOADED to wherever you’re running this program. Network upload speeds at home, and download speeds wherever it is running will definitely impact overall performance. Be mindful of your bandwidth limits, if any, as well, as videos are 1-3MB each.

If you couple that with a couple crontab entries, you get 7 days (or whatever retention you want) of videos on your linux box. Make that path servable via your local web server (with user/password authentication) and hey presto you can view videos via a web browser. Like the one on your phone.

Crontab example:

# delete videos older than a week
0 0 * * * /usr/bin/find <PATH TO VIDEOS> -name "*.mp4" -type f -mtime +7 -delete
# download new videos every hour
14 * * * * <PATH TO PROGRAM>/blink.py

Apache2 configuration with basic password protection (see https://httpd.apache.org/docs/2.4/howto/auth.html) example:

#<DirectoryMatch (PATH_TO_VIDEOS)>
<Location (PATH_TO_VIDEOS)>
    Options +FollowSymLinks +Indexes
    #DirectoryIndex index.php index.html
    AllowOverride AuthConfig
	AuthName "Blink Access"
	AuthType Basic
	AuthUserFile PATH_TO_AUTH_USER_FILE
	require valid-user
</Location>

The project is available on Github: https://github.com/schettj/BlinkSync

Pages: 1 2