PTZ Motion Detection
  • I am have SS controlling all the preset locations using a script. The problem I have is that the motion capture and AI do not wait long enough for the PTZ to get into the next position, and cause false alerts on parked cars. I have tried to set up a script that includes enabling and disabling motion detection, and it works for a while, then causes SS to stop processing any motion detection or AI on that camera only.

    Maybe my scripts are not right, so any help would be greatly appreciated. Or did I miss a setting to enable a longer delay during the movement of a PTZ camera in settings?

    Here is what I have so far... I have all of these scripts set up as applications through Automator.

    1. SecuritySpy Auto-Patrol:

    on run {input, parameters}
    delay 11
    if application "SecuritySpy Auto-Patrol Stop" is running then
    tell application "SecuritySpy Auto-Patrol" to quit
    else
    repeat
    tell application "SecuritySpy"
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset1 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset2 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset3 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset4 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset5 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset6 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset7 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    tell application "SecuritySpy PTZ Motion OFF" to launch
    ptz preset8 camera number 12
    tell application "SecuritySpy PTZ Motion ON" to launch
    delay 25
    end tell
    end repeat
    end if
    return input
    end run


    2. The SecuritySpy PTZ Motion OFF:

    on run {input, parameters}
    do shell script "curl -d " & "'cameraNum=12&mdCheck=0&action=save' " & "http://admin:PASSWORD@127.0.0.1:8088/++camerasetup"
    return input
    end run


    3. The SecuritySpy PTZ Motion ON: (I added the 3 second delay to account for the camera to get into position)

    on run {input, parameters}
    delay 3
    do shell script "curl -d " & "'cameraNum=12&mdCheck=1&action=save' " & "http://admin:PASSWORD@127.0.0.1:8088/++camerasetup"
    return input
    end run


    4. SecuritySpy Auto-Patrol Stop:

    on run {input, parameters}
    if application "SecuritySpy Auto-Patrol" is running then
    tell application "SecuritySpy Auto-Patrol" to quit
    delay 10
    end if
    return input
    end run
  • I think the best thing here would be for us to increase the time for which SecuritySpy turns off motion detection after a PTZ command is issued.

    SecuritySpy currently waits for 3 seconds. How long does your camera take to move after a command is issued?
  • Depending on the saved preset location, it is between 2-6 seconds to get to its final position.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!