AppleScript and SecuritySpy 3.3

cstout
edited May 2014 in SecuritySpy
I sent this e-mail nearly three weeks ago and never received a response. It's likely something very simple too.

Original E-mail:
I've been using SS for a couple years now and I'm finally getting around to playing with some of the example AppleScript commands. I'm not having a lot of luck with it, however. It appears the examples and instructions were written for previous versions of SecuritySpy. The current version doesn't seem to have ++camerasetup. I haven't seen that in the SecuritySpy.app since version 2. Did it move or was it replaced by another command?

The script I'm looking at potentially making use of is the simple script to enable/disable a camera found at: http://www.bensoftware.com/securityspy/helpapplescript.html

Last part of this question: How do I find a listing of my camera numbers? Was that something that is supposed to show in the ++camerasetup file?

Comments

  • Hello and apologies you didn't get a reply to your email - we don't have this in our ticketing system so it appears it may have been eaten by a spam filter somewhere. If ever you don't hear from us after a couple of days please send another email to follow up.

    The AppleScript Examples page that you link to above is current with the latest 3.3 version of SecuritySpy. If you send us an example of your script (or post it here) I'll take a look and let you know what could be going wrong.

    Camera numbers can be found by going to "Device map" under the Window menu in SecuritySpy.
  • Hi Ben, it was definitely an easy solution. I didn't know about device map and I simply had the wrong camera number. What was confusing me was that the AppleScript error I was receiving didn't say anything about "can't find camera" it just stated that it couldn't find ++camerasetup. Now that I have the correct camera number it works like a charm. The script I was using was for disabling and enabling cameras. Thanks again.
  • Hi there,

    What would be a command line on Automator that tells SecuritySpy to turn all cameras active?

    Im no programming experts, but I can figure stuff out just by trial and error.
    Right now I have:



    on run {input, parameters}

    try
    tell application "SecuritySpy"
    --Set camera 0 to active mode
    end tell

    end try

    end run


    But nothing happens.
    Am I any close?
    Can you help me?
  • Hi randrade1000 - the correct command to set camera 0 to active mode is as follows:

        tell application "SecuritySpy"
            active mode camera number 0
        end tell

    If you want to set all cameras to active mode, use a camera number of -1, like this:

        tell application "SecuritySpy"
            active mode camera number -1
        end tell

    Hope this helps!
  • Yes, that solved my problem!

    But now I have a new one :(

    For some reason, all of my setup works just fine, but Security Spy, for some reason, resets my active camera to passive mode. Have no idea why.

    This is what I have:

    IFTTT knows when I leave and arrive home, so I have IFTTT setup to post a file to my Dropbox folder named "start_surveillance" when I leave my place, and another file "stop_surveillance" when I arrive. That works fine.

    Then I have Hazel watching that Dropbox folder, looking for those two files. If "start_surveillance" shows up, it runs a script that tells SecuritySpy to set all camera to active mode (that exact script we have above). And then if the file named "stop_surveillance" is detected, Hazel runs a similar script telling SecuritySpy to set all cameras to passive mode. That works fine too.

    BUT, sometimes, when I leave my place, I can see the whole setup running, all up until SecuritySpy sets the camera mode to active, which is perfect, but then it sets to passive mode again, half a second later.

    I went through all the scripts and setups, and Im sure "stop_surveillance" script does not run right after "start_surveillance". So it could only be a SecuritySpy issue.

    Any ideas on what it could be?

    Thanks for the help!

  • Another thing. I've tried setting the camera to active mode manually, and sometimes, it goes back to passive instantly, for no apparent reason.
  • The only reason I can think of that may be causing this is if the camera(s) in question are not currently connected, for example if they are temporarily offline or SecuritySpy is in the process of connecting to them - could this be the case?