Indigo Security Script v4

What is the Indigo Security Script?

The Indigo Security Script is a AppleScript applet for Indigo that is run anytime a Security Event has been received by Indigo.

Donate to help continue the development
of the Indigo Security Script

The typical Security device is a DS10A X10 based magnetic reed sensor switch.  The sensor itself is very versatile, and can be used for a variety of tasks, including detecting:

  • Open Doors, and Windows
  • With Small modification detecting Deadbolt positions

The script itself when a event occurs, can do the following:

  • Sound a Chime  (Every time, or only on open events) on a device-by-device basis
  • Send a Growl Notification on a device-by-device basis
  • Play a Sound File on a device-by-device basis
  • Monitor for inactivate security sensors (eg. Low Battery Warning, Broken Sensor Warning)
  • Ignore the event on a device by device basis
  • Use Mac Text-to-Speech to speak the alarm
  • (Optional) Indigo Security Status Web Plugin (See below)

Changes in Version 4

The major benefit to Version 4 of the Security Script, is that it is now more versatile.  Instead of activating a single device, the script now can also trigger Action Groups.  Why would you want to do that?  Because it simpilifies things quite a bit.

With version 3, you needed to create a trigger to detect a sensor opening or closing, if you wished to control more than one device or more than one action.  For example:

  1. if kitchen_door_is_open is changed to true
    • Action 1 – turn on hall way light
    • action 2 – set timer to 600 seconds.

And this could get out of control, simply because you have to create a trigger per sensor, and if they all are controlling the same device(s), there is a lot of duplication of effort….

With version 4, it’s easier, and simpler…  In the Alarm Matrix, field 9 is an “Action group” prefix, if this is defined Indigo will attempt execute the Action Group when an sensor is triggered.  The action group that it executes depends on what signal the sensor sends:

{91, “Ben_AlarmFob”, false, true, “Sound Chime”, false, false, false, “AlarmFob“}

The security script will take the action group name and append the following action name to it:

  • _Opened     – Insteon Door/Window Sensor has been opened
  • _Closed       – Insteon Door/Window Sensor has been Closed
  • _ArmHome  – If the Armed (Home) button is pressed
  • _ArmAway – If the Arm Away button is pressed
  • _Disarm      – Disarm Button pressed
  • _LightsOn  – Lights On button pressed
  • _LightsOff  – Lights Off button pressed
  • _Panic_On – Panic Mode is turned on
  • _Panic_Off – Panic Mode is turned off

So for the Alarm Matrix entry above, the 9th item (“AlarmFob“) is the prefix, and when the Panic button is pressed Indigo will check for an Action group called “AlarmFob_Panic_On“, and if it exists execute it.  But this name doesn’t have to be unique.  So if you have 3 security devices, all three can call the same action group. This allows you to write it once, and use it with a variety of security devices, assuming that they all perform the same actions.

Version 4.03 now adds another feature, the ability to Arm and Disarm the “security script”.  The Security_Status variable will be “Armed” when Armed, and when disarmed it will be  “Disarmed”.  When Armed, the script will automatically email the addresses in the SecurityAlert_Email variable (multiple addressed seperated by a comma).


To Install:

  1. Download the Security Script
  2. Copy the Indigo Timer script to /Library/Application Support/Perceptive Automation/Indigo 4/Scripts/Background Tasks
  3. Now we need to start the script, everytime the Indigo Server Starts.  So define a new trigger “Indigo Server Startup” with a type “Indigo Server Startup”. No condition needed.  The action is to execute Applescript in a file. Select the Timer script in the Background Tasks folder. To start the script, you can restart the Indigo server or just execute the trigger.
  4. Copy the Security Script v4 into /Library/Application Support/Perceptive Automation/Indigo 4/Scripts/Attachments
  5. Please ensure that the old copy of the security script is moved out of the attachment script, but do not delete it.  You may want to revert at some point (or use it for testing purposes).
  6. At this point just update the Security script’s Alarm matrix.  See the security script for more details.

Versions for Download

  • 8/9/2010, [download id=”56″]
  • 4/15/2010, [download id=”55″]
  • 7/02/2009, [download id=”24″]
  • 6/29/2009, [download id=”23″]
  • [download id=”7″]

Version History of Security Script

  • v4.03 – Minor Release
    • Added support for Armed & Disarmed status via Security_Status variable
    • Added support for the SecurityAlert_Email variable, contains email address(es) to email if system is armed, and security statuses change (Multiple Email addresses are Seperated by comma)
    • (Added in v4.02) – Added Opened / Closed support for the Insteon Triggerlinc, etc.
  • v4.01 – Minor Release
    • Added better logging for unknown actions for action group support
    • Missed adding in Insteon Open & Close to action group support
  • v4.00 – Major Release
    • Added Action Group support
    • Added Support for Arm / Disarm / Lights On / Lights Off security codes / Panic On / Panic Off
    • fixed some minor issues with default times sometimes being set to an invalid time
    • Fixed default icon for Growl Support (Now uses Indigo 4 icon)
    • Added support for disabling System Beep

Indigo Security Status Web Plugin

I have also made available an plugin to the Indigo Web Server that will display the status of all security sensors (that are controlled by the Security Script), along with Security related Variables, and the last 25 lines of security related log entries.

To Install the Security Status Plugin, download the Plugin, unzip it, and move the folder created to the /Library/Application Support/Perceptive Automation/Indigo 4/IndigoWebServer/plugins directory.  Once that has been done, restart the Indigo Web server, and you should now see the plugin.

  • [download id=”21″]

Drivers for USB to Serial Adapter (for w800rf32)

The Snow Leopard Driver for the USA-28XG is here
http://www.tripplite.com/shared/software/Driver/Mac-OS-10-6-v26b-driver.zip

Keyspan notes for the driver:
The latest driver version 2.6b (file: Model USA-19HS, USA-49WG, USA-28XG & UPR-112G Keyspan Driver – Mac OS 10.6 (Snow Leopard) – found in Help & Downloads section of each product as well as the download section) will allow the following products to run on Mac OS10.6. Those products are the USA-19HS, USA-49WG, USA-28XG, and the serial port of the UPR-112G. Although previous versions of these serial based products should work with the new driver release, our support staff will only be able to troubleshoot issues with the current skus. We have done extensive testing, but welcome you the user to give any additional feedback to help with the improvement of the this beta driver.

Troubleshooting

If your having an issue, please let me know.  Please email me, and I will be happy to assist in any way possible…  Please feel free to offer suggestions for Feature Enhancements, or new features through email as well..