XTension Logo

Home | How to order | XTension | Download Page | Home Automation | Ideas | Sand Hill | Links | Mailing List

XTension for OS X
Version Release History

For earlier XTension version history, see this page.

XTension 7.0
Please go to our WIKI site for the latest fixes, features and downloads.

XTension 6.0

     Major new features :

  • Multiple concurrent interfaces.
      You can now have multiple powerline and multiple wireless interfaces,
       as well as several new and exciting special purpose interfaces at the same time !

  • Support for many of the Oregon Scientific wireless products* such as weather sensors,
       power monitors, and even bathroom scales !

  • Support for many of the Weeder control and monitor products *

  • Native integration of video sources, directly into graphic views and to web pages.

  • Control of X10 Ninja camera mounts.

  • Seamless integration of XTension with XTdb*, the new database manager that includes Graphs !

  • Greatly improved Web interface.*

  • Support for Uninterruptable Power Supplies and laptop battery charge*.

  • Targeting of multiple Macs is back !!

MAKE SURE that your XTension machine has internet access before running this. It is necessary to update the registration of the database. Without either a new serial number issued from us or via the online system XTension will not run.

• [New] Multiple Interfaces: Previous versions of XTension used the convention that all X10 powerline traffic went through a single interface device and all wireless traffic went through another. This distinction has become less obvious with devices like the CM15 which does it all, and with multiple wireless input and output devices available to us as well as the continued additions of new interfaces of all kinds.

In order to take the best advantage of these and future devices it was necessary to break out our units not just by what protocols they respond to (like wired or wireless or security) but also by which physical interface that we expect the messages to be received, and go out through.

It is now possible to have multiple devices that can talk X10, or other protocols. This change may require some work on your part as certain conventions used in previous versions no longer work. (Note that a 'legacy' mode is provided.)

Specifically the "pass through" and "allow wireless" flags no longer function 'automatically'.

If you wish to control a lamp via a wireless remote instead of just assigning them both to the same X10 address and clicking the "allow wireless" and "passthrough flags" you must now separately create the controlling unit.

Thus, you will end up with one unit that 'controls', and another unit that is 'controlled', and both must be assigned to an interface. They may both be on the same interface, or on separate ones.

Then add simple scripts for the remote buttons which control the unit.

If you load a database into this version of XTension that still uses those flags it will be loaded in legacy support mode.

When you're ready to switch to the new system turn off legacy support in the preferences dialog and restart the program.

While these databases will continue to function, many of the new features are not supported when in legacy mode.

• [New] Added support for the RFX wireless 1-wire transmitter, (supports up to 8 '1-wire' sensors)
   as well as their USB and Ethernet based wireless receivers. These interfaces support both the European 432Mhz *
   and the American 315Mhz RF bands. You can even link via the web to monitor interfaces that are located
   on the other side of the world.

• [New] Added support for the Weeder control and monitor boards. *

• [New] Added support for the MaxSonar sonar range finder. *

   Watch for tutorials on these to show up on Mac Home Automation

• [New] Universal Binary: runs natively on both Intel and PPC Macs, all versions of OSX thru 10.5

• [New] Ninja Control: If you have a CM15 or CM19 that is capable of transmitting wireless X10 commands, you can now control and program those X10 Ninja Camera Mounts. To do this, create a powerline unit in XTension with the address that you gave to the power supply for the ninja and then use that unit name to pass to the ninja verbs like:

move "My Ninja Mount" to position 2
tilt "My Ninja Mount" (up/down) by 10
pan "My Ninja Mount" (left/right) by 7

• [New] Alien Address window ... Shows all unit events that occur on interfaces for which those addresses are not 'configured'. This is quite helpful both to identify units which can be seen by multiple interfaces, and which units are truly 'alien'.

• [New] Log Window now has logging control buttons, as well as a "MARK" function that lets you quickly put in a recognizable timestamped 'mark' at any time.

• [New] Security Unit Low Battery flag support: X10 security units send a "low battery" flag when they notice their batteries are starting to go. This can be trapped in the OnScript for the unit by watching for a unit property to be set called "low batt". or check the new LowBatt verb. See the example documentation of trapping this in the article on http://www.machomeautomation.com/

• [New] Increased the number of times that a device will retry to connect before giving up to 10. This number is also now settable by you via the xtRetries property of the xInterface applescript object. So if you have a device that takes a long time to recover for some reason like being just nasty or being on a remote USB server interface you can make it try longer by issuing a command like:
set xtRetries of xInterface "My Recalcitrant Device" to 500

• [New] Installing Kernel Extensions for the various supported USB devices can now be done from the File menu in XTension rather than having to do it manually in the finder as before.

• [New] Implemented the "Rude Shutdown" verb whereby you can discover if the last shutdown of your database was due to XTension shutting down properly or crashing.

• [New] Import/Export of units, scripts and views is functional again. Various features added to help in the creation of plugins such as the post process script that lets you see what units were actually created and do any further configuration that is necessary for the plugin users.

• [New] XTension can run from the Applications folder. While it is still recommended that you create a separate folder for XTension and all it's support files and logs to live in. If you place XTension in the system level Applications folder it will still operate correctly, placing all it's files in the XTension Support folder inside of your Application Support folder.

• [New] Search/Find support. New Search dialog allows you to search through all your scripts.

• [New] Automatic Database Backup: every night at midnight now a database copy is made automatically for you and zipped up to save space. 7 of these are kept at any time and older ones are deleted after 7 days. Should you have database issues this makes recovering much easier.

• [New] Added "ignore clicks in list" checkbox to the edit unit dialog. This makes it less likely that you will accidently turn on or off a unit in a list when you don't want to. You can still control them via scripts or via the various control panels and popup menus.

• [New] Hold the Option key when clicking any Delete button to skip the "are you sure" dialog... Probably not a good idea to use too often.

• [New] Unit of Measure for units is editable and is shown in lists.

• [New] Groups display a count of their units in the Address column of a list.

• [New] Applescript: Unit property names no longer have any restrictions as to the characters you can use. Used to require valid applescript property names. And now can be anything. Also the "_" is no longer translated to 'space'.

• [New] Applescript: Added "log" as a valid parameter to the "all of class" verb so that a script can 'get' the current log lines in the log window.

• [Fix] Block and Unblock verbs now write to the log where they previously did their work in secret.

• [New] Applescript: New "Create List" Verb, to create a list like:
create list "new list name" (with units {"unit 1", "unit 2", "unit 3"})

• [New] Applescript: New "Delete List" Verb.

• [New] Applescript: added "to list" parameter to the "add unit" verb so that you can specify either a group or a list to add a unit to.

• [New] Applescript: added "from list" parameter to the "remove unit" verb so that you can specify either a group or a list in the remove unit verb.

• [New] Applescript: Added "Last Activity" and "Time Delta" verbs to global scripts. Use the same as for a unit, but pass the name of a global script and it will tell you when the script last ran.

• [New] Applescript: Added verb "available video streams" which returns a list of text with the names of all the video streams available to XTension.

• [New] Applescript: Added "ThisInterface" verb like the "ThisUnit" and "ThisScript" verbs so that you can tell which interface a command came from. Most useful at the moment when figuring out why your AllOf.x scripts were called.

• [New] Views: Label backgrounds can now be a stream to display live video, or a static image file on disk.

• [New] Views: added "Enabled" flag to the list of Label options and verbs/properties.

• [New] Views: Added Z-Layer support so that you can control the layout order of your labels and buttons.

• [New] Views: Command-D to duplicate a label in a view

• [New] Views: Hold Shift key to move label by 10 pixels. Make it easier to move labels around in a view quickly with the keyboard.

• [New] Views: Added "Full Screen" option for a view. This is great for touch screens or other full screen interfaces. Works with multiple monitors by filling the screen that the window would otherwise be displayed on. This hides the dock and the menu bar.

• [New] Views: Added "snap to grid" lines to make aligning multiple controls easier.

• [New] Views: Added several new controls as label icon options. little arrows, progress bars, sliders and popup menus. Progress bars and sliders have minimum, maximum and value settings that are available via the xLabel object. Little arrows, popup menus and sliders also call events in the label script to let you trap when someone has changed them. They are:

• [New] Scripts: Revert tool bar item to revert scripts to any of last 10 'saved' versions.

• [New] Added the "[sortable]" option to the xtFormatDate verb to return a date string that is sortable by the finder or other string based sorting routines. This is useful when saving off multiple files, logs, pictures, whatever to the finder.

• [New] Added the interface device name of a unit to the unit extract record. Part of multiple interface support.

• [Fix] Improved script typing response. If you have a lot going on in the background like video displays updating typing in a script will temporarily delay those screen updates to improve the performance feel of the script editor. This is most noticeable when using XTension on a processor challenged machine...

• [Fix] Manage Scripts window is now resizable and uses it's space more appropriately. When renaming scripts, the menus and display are properly resorted.

• [New] Edit Script windows are no longer modal. You can now open many different script windows at the same time. Making it easier to cut and paste between them. Script window bounds and sizes are saved for individual scripts so they will open up in the same place you were last working on them.

• [Fix] Removed the random checkmarks from the window menu.

• [Fix] Command Queue Exception errors that were otherwise harmless but alarming, will no longer happen.

on DownArrowClick()
on UpArrowClick()
on PopupMenuChanged( NewValueText)
on SliderValueChanged( NewValueNumber)

To set the selections of a popup menu set the text of the label to a return delimited list of text and they will each get their own line like:

set text of xLabel "my popup menu" in xView "the view name" to
"selection one" & return & "selection two" & return & "etc..."

Then, to change the selection programatically change the selection property of the xLabel object like:

         set selection of xLabel "my popup menu" in xView "foo" to "text from list"

• [New] AppleScript: Can now run handlers in any script from any other script. This aids in plugin creation and in organizing things. It's no longer necessary to put everything in the attachments script if you wish to compartmentalize things. For example if you have a Global Script by the name of "remote control" with a handler to "TurnOffTV( TVName)" you could access that from anywhere by calling:

        tell xGlobalScript "remote control" to TurnOffTV( "Living Room")

The same works for units, view parent scripts and label scripts by instead using the xUnit, xView and xLabel targets for the tell statement. In the case of the xUnit, the handler in the ON script is called first and if no handler is found there then it tries to find one in the OFF script.

This would probably qualify as "advanced" scripting and isn't necessary for basic and traditional functionality.

• [New] AppleScript: Added the ability to get and set variables in any script from any other script. Similar to running other handlers you can now access any script variables from anywhere via simple standard applescript syntax:

        set MyLocalVariable to SomeVariableName from xUnit "unit name"

in the case of a unit a variable by that name is first looked for in the ON script and if it doesn't find it then it looks in the OFF script. you can also use the standard objects, xGlobalScript, xView and xLabel as targets.

Setting variables works the same way, but for a unit only setting ON script variables is supported:

        set RemoteVariableName in xUnit "unit name" to Something

• [New] View: added multiple display options to Units dragged directly into a view for display of icon, value, description, last activity etc. Lots of formatting options.

• [New] OnLabel and OffLabel properties added to the unit. So instead of displaying "On" and "Off" the unit could display "Open" and "Closed" or any other labels for it's state.

• [New] log debugging data at any time: if things are looking very strange for a unit you can run from the command line:
        tell xUnit "whatever" to LogDebugData()
            in order to get a full printout in the log of all it's internal flags.
            (this is different from the 'debug' mode of the interfaces)

• [New] Trap interface disconnection errors: If an interface is disconnected and reaches the end of it's retry count XTension will try to find a global script by the name of "Interface Error Script" and run it to let you know that an unrecoverable error has happened for that interface. The "ThisInterface" verb will be set to let you see which interface has died.

• [Fix] fixed variable type of unit value passed to "on GroupMemberChanged( NewValue)" event. It was coming through as a string confusing some scripts, it is now properly labeled internally as a number.

• [New] Applescript: Added new unit properties: xtOnLabel, xtOffLabel and xtCurrentLabel to the xUnit object.

• [Fix?] Applescript: Log error when non-text object passed to the write log verb. Couldn't quite fix every possibility internally, so if an object is passed to the write log verb that the program can't make into a string it will log an error suggesting that you might want to add "as text" to the end of your command rather than just writing gibberish.

• [New] Applescript: added "on init()" handler call to all scripts at startup. When XTension is started up all scripts, unit on script, global scripts, view scripts and label scripts will be sent an on init() event. If the scripts have an on init() handler it will be run. This simplifies plugin creation and lets you not have to edit your Startup script for everything you want to have happen at startup. Good to compartmentalize things and to simplify plugins.

• [Fix] Small memory leak in XML subsystem fixed. Though this was never a big problem it has fixed the largest remaining memory leak that I am aware of in the program and allow it to run forever ;-)

• [New] Added OnLabel and OffLabel to Groups as well as Units.

• [New] AppleScript: MakeGlobal( HandlerName) verb. Call from the on Init() handler in any script to add that handler to a global list of handlers. Basically makes any handler in any script into a global handler as if it were in the attachments script. Good for plugin authors so that things no longer need to be cut and pasted into the Attachments script. The handler called will run inside the context of whatever script it was added from. Please respect your namespace so that you don't cause problems for existing verbs or for other peoples' plugins.

• [Fix] InitInterfaces script is now run whenever the interface is actually running. So this may re-run if an interface is restarted at any time. It will run multiple times for each interface that comes online when they appear to be ready with the name of the interface set in the "ThisInterface" verb. This may require changes to your current InitInterfaces script. Though it was fairly useless previously running just once after the StartupScript ran.

• [Fix] Better handling for hung interfaces. One common mode of failure for a USB interface that was pulled or disconnected unexpectedly was to just continually fill my buffers with repeated commands rendering XTension virtually useless while it tried to handle them all. XTension now watches the queues for this eventuality and will kill and try to restart the interface connection if this happens.

• [Fix] Serial Number support for Intel version. Nasty endian bug kept me from validating user serial numbers on Intel. If you run an intel version of the program on a ppc database the serial number will offer you the option of entering a new one or going online to get you running immediately. Should be painless.

• [Fix] Removed "don't anti-alias" option for Intel builds. This would cause a crash for some unknown reason when running on Intel.

• [Fix] Fixed error in log after removing a unit from a list.

• [New] Added "log" as a class for the "all of class" verb. It will return all the log lines currently visible in the log window. (even if the window is not visible)

• [New] Added "on NewLogLine( TheData, TheColor)" handler. If you create this handler in your attachments script you will get notified about each log event that happens just prior to it being written to the log. This might be useful for log following or searching it for other things. Be very careful not to generate a log item while you're in this handler though or you will infinitely recurse until the program crashes. TheColor will be text either (Black:Red:Green:Blue) so you could trap just error messages by checking for TheColor is "Red"

• [New] Added more support for wireless security devices. In the current released version only the DS10 and MS10 are officially supported, in this version you can expect to be able to handle messages from any security device or security remote control. Motion sensors and door sensors continue to trigger the ON script for Alerts and the OFF scripts for Safe conditions. Any other command will trigger the ON script but will also now set the new CommandCode enumerated variable. You can check this against the current list of constants to find out what code prompted the script to run and take the appropriate action. The list of supported constants is:


So, when coding for a security remote you might check something like this in the OnScript:

if CommandCode is SecurityCommandArmHome then
write log "setup for perimeter security"
else if CommandCode is SecurityCommandArmAway then
write log "setup for perimeter and internal motion security"
else if CommandCode is SecurityCommandPanic then
turn on "Robotic Richard Simmons Theft Deterrent System"
end if

For those wanting low level access to the bytes of the command, in case specific features aren't setup the way you want or if you're using a device that has a command for which there is no constant yet, use the original Command verb which will return an integer number of the exact command as sent from the device.

There are new flags associated with the security devices as well. If an ON or OFF script is run and the unit is passing the low battery flag, in addition to the original adding of the Low Batt message to the unit properties a new LowBatt verb will return true in the script. Same for the Tamper flag sent by the DS90 and MS90 can be checked in the scripts via the "Tamper" verb or by looking in the unit properties for a Tamper boolean set to true. Lastly the min/max switch on some units can also be read in the scripts by checking the new "EntryDelay" verb. It will be true if the switch is set to max.

* Not included in base price of XTension.

Copyright 2012, Sand Hill Engineering All rights reserved.

Mac Made