{"id":40,"date":"2009-01-12T11:10:30","date_gmt":"2009-01-12T16:10:30","guid":{"rendered":"http:\/\/wordpress.schollnick.net\/?page_id=40"},"modified":"2012-06-20T09:21:06","modified_gmt":"2012-06-20T13:21:06","slug":"indigo-security-script","status":"publish","type":"page","link":"http:\/\/www.schollnick.net\/wordpress\/home-automation\/indigo-plugins-for-v4\/indigo-security-script\/","title":{"rendered":"Indigo Security Script v4"},"content":{"rendered":"<p><strong>What is the Indigo Security Script?<\/strong><\/p>\n<p>The Indigo Security Script is a AppleScript applet for Indigo that is run anytime a Security Event has been received by Indigo.<\/p>\n<table>\n<tbody>\n<tr>\n<td>[toc=&#8221;2,3,4&#8243; title=&#8221;Table of contents&#8221;]<\/td>\n<td align=\"right\">Donate to help continue the development<br \/>\nof the Indigo Security Script<br \/>\n[paypal-donation purpose=&#8221;Software Donation&#8221; reference=&#8221;Indigo Security Script&#8221;]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The typical Security device is a DS10A X10 based magnetic reed sensor switch. \u00c2\u00a0The sensor itself is very versatile, and can be used for a variety of tasks, including detecting:<\/p>\n<ul>\n<li>Open Doors, and Windows<\/li>\n<li>With Small modification detecting Deadbolt positions<\/li>\n<\/ul>\n<p>The script itself when a event occurs, can do the following:<\/p>\n<ul>\n<li>Sound a Chime \u00c2\u00a0(Every time, or only on open events) on a device-by-device basis<\/li>\n<li>Send a Growl Notification on a device-by-device basis<\/li>\n<li>Play a Sound File on a device-by-device basis<\/li>\n<li>Monitor for inactivate security sensors (eg. Low Battery Warning, Broken Sensor Warning)<\/li>\n<li>Ignore the event on a device by device basis<\/li>\n<li>Use Mac Text-to-Speech to speak the alarm<\/li>\n<li>(Optional) Indigo Security Status Web Plugin (See below)<\/li>\n<\/ul>\n<h2>Changes in Version 4<\/h2>\n<p>The major benefit to Version 4 of the Security Script, is that it is now more versatile. \u00c2\u00a0Instead of activating a single device, the script now can also trigger Action Groups. \u00c2\u00a0Why would you want to do that? \u00c2\u00a0Because it simpilifies things quite a bit.<\/p>\n<p>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. \u00c2\u00a0For example:<\/p>\n<ol>\n<li>if kitchen_door_is_open is changed to true\n<ul>\n<li>Action 1 &#8211; turn on hall way light<\/li>\n<li>action 2 &#8211; set timer to 600 seconds.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>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&#8230;.<\/p>\n<p>With version 4, it&#8217;s easier, and simpler&#8230; \u00c2\u00a0In the Alarm Matrix, field 9 is an &#8220;Action group&#8221; prefix, if this is defined Indigo will attempt execute the Action Group when an sensor is triggered. \u00c2\u00a0The action group that it executes depends on what signal the sensor sends:<\/p>\n<p>{91, &#8220;Ben_AlarmFob&#8221;, false, true, &#8220;Sound Chime&#8221;, false, false, false, &#8220;<strong>AlarmFob<\/strong>&#8220;}<\/p>\n<p>The security script will take the action group name and append the following action name to it:<\/p>\n<ul>\n<li>_Opened \u00c2\u00a0 \u00c2\u00a0 &#8211; Insteon Door\/Window Sensor has been opened<\/li>\n<li>_Closed \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0 &#8211; Insteon Door\/Window Sensor has been Closed<\/li>\n<li>_ArmHome \u00c2\u00a0&#8211; If the Armed (Home) button is pressed<\/li>\n<li>_ArmAway &#8211; If the Arm Away button is pressed<\/li>\n<li>_Disarm \u00c2\u00a0 \u00c2\u00a0 \u00c2\u00a0&#8211; Disarm Button pressed<\/li>\n<li>_LightsOn \u00c2\u00a0&#8211; Lights On button pressed<\/li>\n<li>_LightsOff \u00c2\u00a0&#8211; Lights Off button pressed<\/li>\n<li>_Panic_On &#8211; Panic Mode is turned on<\/li>\n<li>_Panic_Off &#8211; Panic Mode is turned off<\/li>\n<\/ul>\n<p>So for the Alarm Matrix entry above, the 9th item (&#8220;<strong>AlarmFob<\/strong>&#8220;) is the prefix, and when the Panic button is pressed Indigo will check for an Action group called &#8220;<strong>AlarmFob_Panic_On<\/strong>&#8220;, and if it exists execute it. \u00c2\u00a0<strong>But this name doesn&#8217;t have to be unique<\/strong>. \u00c2\u00a0<strong>So if you have 3 security devices, all three can call the same action group.<\/strong> This allows you to write it once, and use it with a variety of security devices, assuming that they all perform the same actions.<\/p>\n<p>Version 4.03 now adds another feature, the ability to Arm and Disarm the &#8220;security script&#8221;. \u00c2\u00a0The Security_Status variable will be &#8220;Armed&#8221; when Armed, and when disarmed it will be \u00c2\u00a0&#8220;Disarmed&#8221;. \u00c2\u00a0When Armed, the script will automatically email the addresses in the SecurityAlert_Email variable (multiple addressed seperated by a comma).<\/p>\n<div><span style=\"font-family: Verdana, 'Times New Roman', 'Bitstream Charter', Times, serif;\"><span style=\"font-size: small;\"><br \/>\n<\/span><\/span><\/div>\n<h2>To Install:<\/h2>\n<ol>\n<li>Download the Security Script<\/li>\n<li>Copy the Indigo Timer script to\u00c2\u00a0<strong>\/Library\/Application Support\/Perceptive Automation\/Indigo 4\/Scripts\/Background Tasks<\/strong><\/li>\n<li>Now we need to start the script, everytime the Indigo Server Starts. \u00c2\u00a0So define a new trigger &#8220;Indigo Server Startup&#8221; with a type &#8220;Indigo Server Startup&#8221;. No condition needed. \u00c2\u00a0The action is to execute Applescript in a file.\u00c2\u00a0Select the Timer script in the Background Tasks folder.\u00c2\u00a0To start the script, you can restart the Indigo server or just execute the trigger.<\/li>\n<li>Copy the Security Script v4 into\u00c2\u00a0<strong>\/Library\/Application Support\/Perceptive Automation\/Indigo 4\/Scripts\/Attachments<\/strong><\/li>\n<li>Please ensure that the old copy of the security script is moved out of the attachment script, but do not delete it. \u00c2\u00a0You may want to revert at some point (or use it for testing purposes).<\/li>\n<li>At this point just update the Security script&#8217;s Alarm matrix. \u00c2\u00a0See the security script for more details.<\/li>\n<\/ol>\n<h2>Versions for Download<\/h2>\n<ul>\n<li>8\/9\/2010, [download id=&#8221;7705&#8243;]<\/li>\n<li>4\/15\/2010, [download id=&#8221;7703&#8243;]<\/li>\n<li>7\/02\/2009, [download id=&#8221;7641&#8243;]<\/li>\n<li>6\/29\/2009, [download id=&#8221;7639&#8243;]<\/li>\n<li>[download id=&#8221;7613&#8243;]<\/li>\n<\/ul>\n<p><strong>Version History of Security Script<\/strong><\/p>\n<ul>\n<li>v4.03 &#8211; Minor Release\n<ul>\n<li>Added support for Armed &amp; Disarmed status via Security_Status variable<\/li>\n<li>Added support for the\u00c2\u00a0SecurityAlert_Email variable, contains email address(es) to email if system is armed, and security statuses change (Multiple Email addresses are Seperated by comma)<\/li>\n<li>(Added in v4.02) &#8211; Added Opened \/ Closed support for the Insteon Triggerlinc, etc.<\/li>\n<\/ul>\n<\/li>\n<li>v4.01 &#8211; Minor Release\n<ul>\n<li>Added better logging for unknown actions for action group support<\/li>\n<li>Missed adding in Insteon Open &amp; Close to action group support<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>v4.00 &#8211; Major Release\n<ul>\n<li>Added Action Group support<\/li>\n<li>Added Support for Arm \/ Disarm \/ Lights On \/ Lights Off security codes \/ Panic On \/ Panic Off<\/li>\n<li>fixed some minor issues with default times sometimes being set to an invalid time<\/li>\n<li>Fixed default icon for Growl Support (Now uses Indigo 4 icon)<\/li>\n<li>Added support for disabling System Beep<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2 style=\"font-size: 1.5em;\">Indigo Security Status Web Plugin<\/h2>\n<p>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.<\/p>\n<p>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. \u00c2\u00a0Once that has been done, restart the Indigo Web server, and you should now see the plugin.<\/p>\n<ul>\n<li>[download id=&#8221;7635&#8243;]<\/li>\n<\/ul>\n<h2>Drivers for USB to Serial Adapter (for w800rf32)<\/h2>\n<p>The Snow Leopard Driver for the USA-28XG is here<br \/>\nhttp:\/\/www.tripplite.com\/shared\/software\/Driver\/Mac-OS-10-6-v26b-driver.zip<\/p>\n<p>Keyspan notes for the driver:<br \/>\nThe latest driver version 2.6b (file: Model USA-19HS, USA-49WG, USA-28XG &amp; UPR-112G Keyspan Driver &#8211; Mac OS 10.6 (Snow Leopard) &#8211; found in Help &amp; 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.<\/p>\n<h2>Troubleshooting<\/h2>\n<p>If your having an issue, please let me know. \u00c2\u00a0Please email me, and I will be happy to assist in any way possible&#8230; \u00c2\u00a0Please feel free to offer suggestions for Feature Enhancements, or new features through email as well..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. [toc=&#8221;2,3,4&#8243; title=&#8221;Table of contents&#8221;] Donate to help continue the development of the Indigo Security Script [paypal-donation purpose=&#8221;Software Donation&#8221; reference=&#8221;Indigo Security Script&#8221;] The typical Security device is a <a class=\"read-more\" href=\"http:\/\/www.schollnick.net\/wordpress\/home-automation\/indigo-plugins-for-v4\/indigo-security-script\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":6880,"menu_order":9,"comment_status":"open","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"_links":{"self":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages\/40"}],"collection":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages\/40\/revisions"}],"up":[{"embeddable":true,"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/pages\/6880"}],"wp:attachment":[{"href":"http:\/\/www.schollnick.net\/wordpress\/wp-json\/wp\/v2\/media?parent=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->