<< return to Vizycam.com

Timelapse (terrestrial)

I want to use my Vizy to take a timelapse of a house construction. I have done this in the past with a PI Zero and HQ camera I have. When I did that one I used a script and crontab, so really simple setup. Every week or so I would pull up at the site and transfer files off over WiFi using SSH to my laptop.

I was thinking this time I would use Vizy. I made a copy of the Pic Taker app and am working to familiarize myself with the code so I can build off it. I have to admit it has been a little slow going due to lack of experience with Python.

I saw some older posts about code/library documentation that was coming in the future. Will that be on this site or in Github? What is the current estimate on timing for that?

Thanks

Hi Eric,
Yes, the detailed software library documentation (Kritter and Vizy) is on our list, but our focus has been on writing application software. We have the Pet Companion tutorial, which will at least get your feet reasonably wet:

https://docs.vizycam.com/doku.php?id=wiki:pet_companion2

In the meantime, feel free to ask any questions about Vizy’s software on this forum – Python-related questions are also fair game :slight_smile:

Edward

Eric,

I too suffer from being a python noob, and was a tad daunted. Have a look at the pet companion app to see how to snatch frames from the stream. Python’s time and date handling/methods are absolutely convoluted and abysmal IMO. For epoch time, use the time module, and for timestamping files use datetime . In order to save files from the video stream I used something like the following snippet. cv2 is the opencv lib which is documented elsewhere.

import time
from datetime import datetime,timedelta
import cv2
.
.
.
    def save_pic(self,frame):
        now=datetime.now()
        file_name = now.strftime("%Y-%m-%d_%H_%M_%S.%f.jpg")
        cv2.imwrite(MEDIA_DIR+"/"+file_name,frame)

FWIW you can assemble time lapse movies from JPEGs with FFMPEG which should be easily installable.

For easy file viewing you can start a vanilla webserver on another port with something like:

 os.system("cd /home/pi/vizy/examples/MY_APP_DIR/media;python3 -m http.server")

Thank you for the suggestion. I will try it out eventually. Since I was down to the wire I created a fresh install on a different SD card and have it up and running using a script and crontab. Unfortunately it doesn’t look like the POE injector works with the daughter board if you are not running the Vizy image, but it works with the type C connector.

One of these days I need to sit down and make sense of Python. Most everything else I have ever used is similar enough to C to make sense in a few minutes. I kind of skipped over Java so maybe if I learned that it would make more sense.

Hi Eric,
Can you describe the problems you’re having the with PoE splitter (and injector)? I’m not understanding and would like to help.

Edward

I had a vanilla Raspberry PI image on the Vizy since I was struggling with parsing the Python and my schedule was short. It will only boot if it has power in the Type C connector, not with the POE setup. I have it running that way now using the Type C for power. I had a house construction that was about to start and wanted to get a time lapse working. I’ll revert back to a Vizy image after the time lapse is complete.