I’ve been using Ring cameras for several years now and a while back they introduced the option to have the cameras take snapshots periodically. This is awesome as you can fire up the Ring app and see a timelapse of your cameras. However, this only works in the app, you can’t export a timelapse! But, as a proud geek this should not be a problem to me and can be solved!

I wanted something that did not cost me anything to run, should be easy to manage, should integrate with my Home Assistant setup and also should also be something I could share. So, I created a solution I call Ring Timelapse that anyone can use to create their own timelapse videos of their Ring cameras.

Here’s one of the creations:

How to use ring-timelapse

The solution is based on a Docker image, that allowed me to host this (for free and securely on my domains) as I already have an Intel NUC running my Home Assistant at home.

In your Docker environment pull the ring-timelapse container with the following:

docker pull wictorwilen/ring-timelapse

I wanted to avoid storing any snapshots and timelapses in any cloud storage (mostly for simplicity), so the solution uses a Docker mount that allows the Docker image to write the files to your host system. Create a folder on your host system where you want to store the snapshots and timelapses. For instance:

cd media
mkdir timelapse

The container will in this folder create additional folders for each camera entity and store the snapshots within them. Periodically (default daily) it will then generate the timelapse videos, in mp4 format, in the main folder.

Before starting the container you need to acquire a token to be used with the Ring API’s. The easiest way to get the token is to use the following command:

npx -p ring-client-api ring-auth-cli

All that now is left is to start the container, do this by running the following command. You will need to replace the /media/timelapse part of the -v argument with the location of your timelapse folder, and of course insert the Ring token.

docker run 
  -e TOKEN="<insert token here>" 
  -v "/media/timelapse:/app/dist/target" 
  --restart unless-stopped 

The container will now run and every 15 minute take a snapshot. Then every day at 7 AM UTC the timelapse video will be available in the folder you created.

If you want to get snapshots more often or at different times, or create timelapses for instance every week. Check out the documentation of the environment variables in the Github repo.

How to integrate ring-timelapse with Home Assistant

I wanted to get these videos into my Home Assistant experience and this can easily be achieved using the Home Assistant Local Media feature. I’ve set up a cron job that moves the mp4 files from the folder, created above, to the Home Assistant media folder.

0 8 * * * mv /media/timelapse/*.mp4 /usr/share/hassio/media

After this the timelapses are available every day at 8 AM UTC to be viewed using the Local Media browser, or even better using the Gallery card like this:

type: 'custom:gallery-card'
  - path: 'media-source://media_source/media/'
    recursive: true
menu_alignment: Hidden
file_name_format: '*.mp4'

Gallery Card

Final words

Mission accomplished! This was an awesome little evening project that allowed me to get exactly what I wanted. I have some more ideas on how to make it even better going forward - but I’m also looking for feedback on what you would like! Head on over to the Github repo and give your thoughts.