Getting Ring Camera Data and Downloading Videos

Ever since I added security cameras to my house I’ve wanted to use the video in various projects, such as automatically detecting cars and faces and sending myself a text message saying “Your parents just arrived at your house!”, or “The UPS truck is here!”.

Unfortunately Ring doesn’t even give you any way to manually download the videos, let alone automatically whenever activity is detected.

Fear not though, even though there is no official api to allow this, there are some unofficial ways you can write programs or scripts to get your camera information and download videos from your Ring cameras.

Thankfully some wonderful people on GitHub, such as tchellomello, have provided us all with an unofficial way of getting this information.

This is written in Python and makes accessing your information incredibly easy.

Assuming you already have Python installed, first you need to install this unofficial api

pip install ring_doorbell

Then in your python script, give your credentials to allow the script to log into your account.

from ring_doorbell import Ring

myring = Ring(email_address, ‘password)

After that you are free to start querying your devices with

myring.devices

myring.chimes

myring.doorbells

myring.stickup_cams   #This handles all ring cameras which are not doorbells.

For example, back to my use case of training a computer vision system to automatically detect faces and objects, I can download the latest video from one of my floodlight cameras like this:

floodlight = myring.stickup_cams[0]
floodlight.recording_download(floodlight.history(limit=100,kind=’motion’)[0][‘id’],filename=’motion.mp4′,override=True)

This code will:

  • grab the first floodlight or stickup camera (the api treats them both the same), 
  • get the id of the latest video from that camera’s history which was generated from a motion event
  • use the id to download the file to wherever your python script is running from and give the video the name “motion.mp4”

From there you can run the video through the computer vision system and test how well it works.

Unfortunately this doesn’t yet get me to the point where I’m automatically downloading the videos to send myself alerts, but I’m still working on that part. So please check back later to see my progress!

Recent Content

link to Baby Dimmer Control

Baby Dimmer Control

Manage your Baby’s dimmer   This little app will help control the dimmer switch in your baby’s nursery, or any other dimmer switch. Perhaps late at night you don’t want the light at 100% brightness. This app will take care of that by allowing you to specify a time and what level to set the […]
link to Garage Door Monitor

Garage Door Monitor

Here’s a little app which will monitor your garage doors and alert you if they remain open for longer than you would like. It’s always a terrible feeling when you realize that you left the garage door open all evening, or throughout the heat of the day. You can also specify some motion sensors which […]