Nest camera - Time lapse with automation

Hi,

I am wondering if there is a way to save an image from the connected Nest Cam into a local or shared drive. I would like to save one image every day at an exact time in order to create a time lapse video few months later.

I believe it would be the best approach for me to use HA for this since it is already connected, running 24/7, it has the time component and Nest Cam has a limitation of 2 image/minute anyway which used by HA…

Does anyone know if it is doable and if it is how to do it?

Thank you all in advance!

2 Likes

@tiszavolgyi did you get this figured out? I’d like to try it too…

@RyanRayNeff - I did figured it out, see the Python code below. It is working pretty well, you have to change your camera API URL in the code and run it with a CRON job periodically.

The only problem is that Nest standby quality is really bad. Nest only provide HD image quality if you have the subscription OR actively watching the feed. I did not found a way yet to watch it for days. If I open it in any browser, it works for about a day and I have to refresh the page…

import urllib.request
import time

timestr = time.strftime("%Y%m%d-%H%M%S")
filename = "/home/tiszavolgyi/Python/NestTimeLapse/Photos/%s.jpg" % timestr
#filename = "/run/user/1000/gvfs/smb-share:server=tank,share=virtualshare/%s.jpg" % timestr

urllib.request.urlretrieve("https://www.dropcam.com/api/wwn.get_snapshot/XXXYOURAPIKEYURLXXXX", filename)
1 Like

Thanks for sharing your code! I’ve been looking for the best hass.io camera option for timelapse, this just might be it.

1 Like