Cynics at Large Indigo: Cynical SecuritySpy

Cynical SecuritySpy Plugin

Download Cynical SecuritySpy (Release Notes)

BenSoftware makes a Macintosh application called SecuritySpy, useful to manage local and network cameras. It can record them, play them back, trigger recording based on visual motion detection or various schedules, and do pretty much whatever you'd like your typical surveillance camera application to do. I've been using it in my house for many years, and am a fairly satisfied customer.

Indigo and SecuritySpy have obvious shared interests. They both are often used to track movement through space and time, and they both have a concept of events and how to respond to them. Cynical SecuritySpy brings them together.

You will need SecuritySpy version 2.1.1 or later for this plugin to work. If you have a prior version 2, this is a free upgrade. You can try out this integration by using SecuritySpy in demo mode.

Overview

Install and configure SecuritySpy normally. Then create a Server device to represent each SecuritySpy installation, and one Camera device for each camera of interest. Use Indigo plugin actions to manipulate those cameras, and use Events to respond to changes.

Cynical SecuritySpy tracks changes in SecuritySpy's state and reflects them in the state of the server and camera devices, as well as through Camera Motion events. When your Indigo scripts cause changes in SecuritySpy, they will be reflected in Indigo device changes only as SecuritySpy reports them. This means that Cynical SecuritySpy provides you with closed-loop supervision over SecuritySpy servers - what you see in Indigo state and events is what actually happened on the server, not just what you said you wanted to happen.

Devices

Server

To work with a SecuritySpy server, you must first tell Indigo about it by creating a Server device. This tells Indigo where the server is and how to talk to it. The server must have its web server component enabled, and the port number you enter is that of the web server (not the SecuritySpy server itself).

Cynical SecuritySpy talks to SecuritySpy exclusively through its web interface. There is no need for Indigo and SecuritySpy to run on the same computer, though they certainly can.

If the web server is Password protected, you must also enter a name and password that can perform whatever actions you want Indigo to take. At minimum, that user must have Allow access to general settings checked, as well as View live images for all cameras you want Indigo to work with. If you want Indigo to make changes to SecuritySpy, additional checkboxes will be needed. Do note that the password will be stored in cleartext in the plugin's configuration file. You may wish to create a specific username/password pair just for Indigo and use that.

Similarly, if the web server has Access control enabled, the computer running Indigo must be granted access to it. If they are both running on the same computer, use localhost (address 127.0.0.1).

Yes, you can talk to multiple SecuritySpy servers on different computers if you like; just make a different Server device for each one. The right things will happen.

Camera

This is one camera configured on a SecuritySpy server. Pick from the popup list that shows all cameras on all SecuritySpy servers for which you have created devices in Indigo (and which are responding at the moment).

Note that you can name your Indigo Camera device anything you like, quite independent from the name SecuritySpy uses for it. Cynical SecuritySpy remembers SecuritySpy cameras by their camera number, which is meant to be stable and will survive renaming. In practice, it is probably a good idea to keep those names similar to avoid confusing you.

In addition to the customary state state, a Camera also has a sensitivity state that tracks its motion sensing sensitivity; it can be changed with the Set Motion Sensitivity action.

Actions

Make Active

Sets the designated camera to active mode. Active cameras can record video and trigger motion alerts. If the camera is already active, nothing changes. Whether a camera is active is reflected in its state.

Make Passive

Sets the designated camera to passive mode. Passive cameras don't do anything; while you can still watch them, SecuritySpy does not record them, and they generate no motion events. If the camera is already passive, nothing changes. Whether a camera is passive is reflected in its state.

Trigger Recording

This action tells SecuritySpy to pretend that it has seen motion on the designated camera. If you have a motion sensor in the general area covered by a camera, that's what you want to do. All the usual consequences follow; in particular, any motion-triggered recording commences. SecuritySpy's usual rules apply; the camera must be active and configured appropriately.

This action is the complement to the Camera Motion event. Together, they link Indigo's and SecuritySpy's event systems together. In fact, if everything is hooked up right, a Trigger Recording action will cause Camera Motion triggers to fire, as SecuritySpy faithfully reports the (simulated) motion back to Indigo.

Set Overlay

This changes the text overlay that SecuritySpy can place onto a video camera's image. This text becomes part of the video stream, so that it is displayed and recorded along with it. Note that it also irreversibly obscures what's behind it.

Note: This action neither sets nor clears the Camera Setup checkbox that enables overlays. If that checkbox is off, no overlays will ever be placed on the camera image. If you want to dynamically turn overlays off for a camera, leave that checkbox on and simply set the message text to empty.

Set Motion Sensitivity

This action lets you change the sensitivity of a camera's motion detection. It controls the same SecuritySpy parameter as the sensitivity slider in the Camera Setup window. The higher the number, the smaller the amount of motion needed to trigger an event. This is an integer value between 0 and 100.

The current sensitivity setting of a camera can be read as a camera state value. Any state change trigger set on this will fire when the camera's sensitivity is changed, whether that is done through SecuritySpy's user interface, its web interface, or through an Indigo action.

Move Camera

This action allows you to control a PTZ (Point-Tilt-Zoom) capable camera - the kind that can be told to move around. Only cameras recognized by SecuritySpy as able to move will be shown in the camera selection menu. This is a somewhat optimistic measure, as SecuritySpy includes any camera that might have this ability installed. But if you ask Indigo to move a camera that is in fact securely bolted to the ground, nothing bad will happen.

Position Preset

This action tells a PTZ-capable camera to move to one of its preset positions. Even fewer types of cameras support presets, and only those cameras will be shown in the camera selection menu.

Run Script

Ask SecuritySpy to execute one of the scripts in its Scripts folder. Pick the desired script from the popup list.

Play Sound

Ask SecuritySpy to play one of the sounds available on the server. Loud siren sounds are particularly amusing. Pick the desired sound from the popup list.

Events

Camera Motion

This event triggers when SecuritySpy reports motion on a particular camera. This is based on SecuritySpy's motion detection logic as set in the camera's Camera Setup panel. It requires the camera to be active and have motion detection enabled.

This motion notification is controlled by Indigo, and is totally independent from any of the settings in the Actions tab there. This means that existing motion responses configured in SecuritySpy can continue to work unchanged.

The Maximum Rate configuration parameter determines how often continuing motion is reported - it is never triggered more often than every so many seconds. Under no circumstances will motion be reported more than once per second.

This is the complement to the Trigger Recording action, which tells SecuritySpy to take action as if it had detected motion on a camera.

Release Notes


About This Area 15 May 2012 21:20