Time-Laps Project

mikyle
Comes here often

Time-Laps Project

Hi Everyone, 

 

I am trying to figure out a way to automate capturing an image multiple times per day for a time-laps video. Has anyone here tried to do such a thing? How did you go about it?

 

Thank You,

5 Replies 5
MerakiDave
Meraki Employee
Meraki Employee

Hi @mikyle you can accomplish this using the MV snapshot API, it would just be a matter of configuring an MV Sense license (you already have 10 for free automatically to get started), generating an API key under your profile, and following some of the self-paced learning labs on Cisco/Meraki DevNet.  Sounds like you would end up with a script that sent a snapshot API call to the camera(s) perhaps once per minute, to play back an entire day over the course of a minute or two at 15 or 30fps.  Check these links to get started. https://meraki.cisco.com/blog/2019/03/introducing-the-mv-snapshot-api/ and https://developer.cisco.com/meraki/mv-sense/#!overview/introduction and you could find more pre-canned options in the app store https://apps.meraki.io and elsewhere on Cisco DevNet.  Hope that helps! 

 

mikyle
Comes here often

So I went with the python route and have a script that almost works. The only problem I have is trying to download the image once I have the URL. It works if I hard code it into the program but not if I pass it as a variable.  Anyone have any ideas on this one?

PhilipDAth
Kind of a big deal
Kind of a big deal

Depending on how you request the image, it may not be available immediately.  You may find you need to wait for 30s.

 

You'll need to post some code to figure things out further.

PhilipDAth
Kind of a big deal
Kind of a big deal

If you are up for trying node.js, my ICU project does a lot of what you want.

https://www.ifm.net.nz/cookbooks/meraki-icu.html 

 

Basically you need to call ProcessSnapshot(), but you can delete the timestamp parameter from everything so you get a snapshot "right now".

You would use something like SetTimeout() in the code to call ProcessSnapshot at regular time intervals (and you would use it in ProcessSnapshot() as well).

 

You would delete everything to do with MQTT,

mikyle
Comes here often

Hey Philip, 

 

Thanks for the pointers, I know some java script but I have not done much of anything with node. How would I get it run at regular intervals with SetTimeout? Can you give an example? Also how would you recommend running this some of these projects can go for months.

 

Thanks 

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.