XTension Logo

Whether you have one already, or just want to augment your system with one, how do you integrate XTension with the X-10 Security Consoles ?

(Please be advised that this is NOT for CP290 systems.)


Many of you have asked over the months about using XTension with one of the common Security Consoles offered by X-10, like the HS9000 :
Security Console

The base unit of the Security Console receives wireless signals from special transmitters which monitor windows, doors, motion etc. It is even capable of dialing out to a monitored alarm service.

If you wish, it will flash all of the lamps that you have set up with the proper house code.

The problem is that XTension doesn't automatically know that the "All Lights ON" from the Security Console means "ALARM".



UPDATE: April 2007

The original technique for handling the "All Lights ON" command has been a real problem for some folks.
So now there's the option of handling these special "ALL..." type codes using special-named Global scripts.

Now all you have to do is create a Global Script with a name that looks
something like this : DoAll.x

Where the "x" is the letter of the House Code that you have set on the security console.

This script will be automatically called whenever XTension receives one of the X-10 "ALL Units" or "All Lights" commands.

In that script you can specify what you want to happen for this event.
Just look in the XTension Manual under the chapter "Handling the ALL Commands"

(I will leave the old documentation about the Attachments handler just for reference...)


There is a little 'advertised' feature of XTension that anticipates the possibility that the designers didn't think of everything ...

This could be a very geeky thing, but with help from a download and simple understanding of XTension scripts, this can be 'easier'.

The Attachments Script

In their infinite wisdom, the designers of AppleScript included the same kind of forethought.

The Attachments script is sort of an 'interceptor' of events.

As events occur within the world of XTension, (AppleEvents), XTension performs its tasks as are described in the manual.

IF however there is a file in the XTension folder that is named "Attachments", then all events will be passed to this script before XTension 'sees' them !

The Attachments script contains "event handlers" for each and every event for which you want to do some special thing. If you have no special needs, then there is no reason for the Attachments script, and it should not exist.

This script must be directly in the XTension folder rather than the Scripts folder.

Let's propose a scenario :

In this simple example, whenever the Security Console reports an 'alarm', we will respond by executing a global script we'll call "OMIGOD".

You have armed your Security Console and it detects some motion or glass break etc. which is reason for alarm.

The Security Console will send out a sequence of "All Lights ON" and "All Lights OFF" in order to flash a lamp or set of lamps to visually indicate the alarm.

Through your 'interface', XTension receives these messages.

Of course, only one of these is needed to tell XTension that there is a 'security alarm', but the console will continue to send these until someone tells it to stop.

The first one of these alarm messages that XTension sees, will trigger our example script. Although you might want to do more in the script than we do here, there aren't any limitations to what you can do (within the limits of XTension and AppleScript).

You may want to trigger a QuickCam and send a picture to your home page showing all in the world just who's breaking into your home ...or wine cellar ?

Shield your eyes !

Some of the following script is really 'geeky' and you really don't need to understand what all the funny words are. The only thing you need to know is that there is a 'script' that you will have to create which 'performs' all the things that you want to do in response to the "ALARM" from your Security Console.

If you pull down the XTension "Scripts" menu, you will see "Edit Attachments".

OH ! You don't want to type in all of this, so why not just download a short file which has two scripts which will make this all come together.

Please note that you must move these files to their proper places.
The Attachments scripts goes in the XTension folder,
the "OMIGOD" script goes in the XTension folder:Scripts folder.

The Attachments script looks like this:

attachments script

The OMIGOD script looks like this:

reactionary script


Now, you should be able to easily change the "house code" in the Attachments script to whatever house code you want to use. **
And don't forget to test it before relying on it ! Please ?


** Thanks to Steve Fyfe for the very elegant applescript !


Home
Back to Home Page
Home
Tutor Index
next
Multi Macs


Copyright 2007, Sand Hill Engineering All rights reserved.

Mac Made

Last modified: May 8, 2002
Michael Ferguson, webmaster@shed.com