Skip to content

Actions with different scripts based on action type ?

I would like to run script A on one of my cameras when it detects a human , Script B when the same camera detects a Animal .


Is this possible ? Shell or AppleScript would be fine . Does SecuritySpy pass a parameter I can action in my script ?


Thanks

Zip

Comments

  • SecuritySpy does pass parameters into AppleScripts that are invokes as Actions. Here's an example script showing how to obtain these parameters, so that you can do some further processing on them if required:

    on run args
    	set cameraNum to item 1 of args
    	set cameraName to item 2 of args
    	set reason to item 3 of args
    
    end run
    

    Possible reasons are as follows: Motion, Audio, Script, CameraEvent, WebEvent, OtherCamera, Manual, Human, Vehicle, Animal, Home.

    If you only enable the Human and Animal AI options, and you don't use any of the other triggers, you could get "Human" or "Animal" or potentially "Human,Animal" if both were detected at the same time.

  • Excellent Ben. That’s exactly what I needed.


    Thanks very much. Good AppleScript support is one of SecuritySpy’s many strengths.


    Zip

Sign In or Register to comment.