Feature Request
For example, I have a PTZ dome at my front door. If someone triggers motion detection, could it be set to rotate the camera to a second position (turn around and face the door), then return to the original position after a set time delay?
As it stands now, once I get the notification I have to log in and manually control PTZ - a pain in the rear end over cellular as you can imagine. If SS could jut automatically run that script, I would be able to follow visitors without having to manually steer the camera lens.
Just an idea!
Comments
-
Hello
in the Action tab, there is already a "Run shell command", that you can use to post an HTTP message to move the PTZ. -
Yes, as @MaxSupergiovane says, this is possible with a shell script.
But it's even easier with an AppleScript, as then you don't have to go via the web interface and have to deal with authentication etc. Here is how to do this:
- Open the Script Editor application (you'll find it in the Utilities folder within the Applications folder).
- Enter the following script:
tell app "SecuritySpy" to ptz preset1 camera number 0
delay 20
tell app "SecuritySpy" to ptz preset2 camera number 0
Edit this to use the preset positions that you actually want, and also the camera number of the PTZ camera, which you can get from the Camera Info window (to show this column, click on the header bar where you see the column names for a menu that allows you to add/remove columns).
- Save the script to the "Scripts" folder that exists within the SecuritySpy folder in your Home folder.
- Select this script as the Action for the camera that will be detecting motion at the front door. -
Awesome! Thanks kindly for the reply!
-
Quick followup, is there a way to designate zones on the camera feed outside of the record/no record areas? As in, if my camera records the sidewalk in front of my home, I still want to record people approaching. But I don't want the camera to swivel until they walk up my path onto my front porch. The script (which I have implemented by the way, thanks!) would only trigger if someone walks into a specific zone as determined by the camera.
-
Unfortunately it is currently not possible to allocated separate zones in the image of one camera to cause different triggers. This is something we are looking at for a future update, but it would be a big change to the way SecuritySpy works and a big change to the user interface, so it's not a simple feature to add.
The workaround for now is to add the camera twice to SecuritySpy: one instance can be used for recording while the other instance, with a different motion mask, can be used to trigger actions. -
Pretty slick, love the outside the box thinking.
Thanks Ben! -
So, I managed to successfully set up a second camera mask, which works as intended. But I'm running into a second issue.
The applescript triggers, and the camera rotates. It then rotates back... and the mask detects movement again during rotation, triggering the action once again.
Adding a delay to the end of the applescript doesn't change anything since SS is what's being triggered. I've tried increasing the trigger time requirement to 2 seconds, but it still sets off the action when the camera returns to position 1. Unfortunately, the path from the sidewalk to my porch can be covered off in under two seconds, so setting a movement time parameter higher that that would mean nothing would trigger the action. 'Ignore whole frame motion' is checked off.
Any suggestions on how to break the perpetual loop? -
When SecuritySpy issues a PTZ command, it temporarily turns off its motion detection in the camera in question until the movement completes, as otherwise the movement itself would cause a trigger. But, if you have two instances of the same camera, both doing motion detection, and you make a PTZ move with one of the instances, the motion detection of the other instance will pick this up as motion and will trigger. So I would say that PTZ cannot really be used in the situation where you have two instances of the same camera, both doing motion detection. Furthermore, motion-detection masks aren't really useful for PTZ cameras in general, as they only apply when the camera is looking in a certain direction.
I think what you want to achieve will only work well in a true two-camera setup: one fixed camera right next to the front door, and a PTZ camera nearby. Then, when the fixed camera detects motion, you can get its Action to run a script that tells the PTZ camera to move to point at the front door.
-
couldn't the script which triggers the PTZ move also force the 2nd camera into continuous record move and turn of motion sensing at the same time? then reset after the time out?

