Skip to content

Is it possible to have SS take a single photo at the same time each day?

edited August 2020 in SecuritySpy
In addition to my normal motion-activated settings, is it possible for SS to take a photo at a specific time each day and save it to a separate folder?

Comments

  • BenBen
    edited August 2020
    Yes - the easiest way to accomplish this is using an AppleScript that you schedule to run every day.

    A simple script to capture an image would be as follows:

        tell application "SecuritySpy"
            capture image camera number 0
        end tell

    SecuritySpy will capture an image from the camera to its default location (i.e. ~/SecuritySpy/Captured Files, or whatever capture destination path you have set for the camera). You also have the option to add a custom path to the AppleScript command like this:

            capture image camera number 0 as "/Users/mlevin77/Desktop/image.jpg"

    You can schedule your script to run every day at a specific time by following our instructions here: SecuritySpy - Scheduling AppleScripts.
  • edited August 2020
    Brilliant! Is there an easy way to have it sequentially name the files, so they don't over-write? The script on your web page uses dates, which is good, but I'd love to have them numbered sequentially past whatever else is in that folder.
    Also, where do I see the camera numbers, so I know which of my cameras is which number?
  • BenBen
    edited August 2020
    The easiest way to do this is to add the "epoch time" to the file name (it's the number of seconds since midnight 1 January 1970, but the important thing is that it increments every second, so it's useful for producing unique file names that conserve the order of creation). Something like this would work:

        set ET to do shell script "date +%s"

        tell application "SecuritySpy"
            capture image camera number 0 as "/Users/mlevin77/Desktop/image-" & ET & ".jpg"
         end tell

    For info about discovering your camera numbers, see the "Camera Numbers" section near the top of the SecuritySpy AppleScript Examples page.
  • hmm it's telling me the variable ET (or et) is not defined.
  • Did you also add the first line? set ET to do shell script "date +%s"
  • ah bingo, that's where I had a mistake. Thanks!
Sign In or Register to comment.