Skip to content

Trigger . Go to ptz position.

hello . is it possible during a trigger, to activate a camera and ask it to go to a specific ptz position? Thanks.

Comments

  • I know you can make an apple script to make it do that.

  • Yes, this is best done via AppleScript. Create a script using the Script Editor app, like this:

    tell app "SecuritySpy"
        ptz preset1 camera number 0
    end tell
    

    Make sure the preset number is the one you want, and that the camera number corresponds to the number shown for the camera you want to control in the Camera Info window in SecuritySpy (if you don't see this column, click on the header bar where you see the column names for a menu that will allow you to add it).

    Then save the script to the ~/SecuritySpy/Scripts folder (i.e. the Scripts folder within the SecuritySpy folder within your Home folder), and then set the script as an Action for the camera that you want to invoke the script when triggered.

  • Great ! Thanks it works great!

    What if I want the PTZ to return to another position after a while?

    Or maybe you have a list of models or examples of scripts or functions!? I don't know many.

    Thanks anyway, you are efficient.

  • Sure, you can add a delay before returning the camera to another preset, like this:

    tell app "SecuritySpy"
        ptz preset1 camera number 0
        delay 10
        ptz preset2 camera number 0
    end tell
    

    There are more examples of other things you can do with AppleScript on the SecuritySpy AppleScript Examples page.

  • edited July 24

    Parfait 👌🏼 Thanks

Sign In or Register to comment.