XTension Logo

The simplest way to get XTension on the Web
Thanks to James Sentman's X2Web

Painless Web Access to your home !

You can use Timbuktu, VNC, and even XTension's intrinsic 'targeting' technique to control and monitor your home via the web. But what do you do if you want to watch and control your home system from that PC at work or those Audreys that you have sprinkled around the house ?

A lot of work has gone into this to make it very simple. The basic installation doesn't even require that you know anything about building web pages !

What's involved ?

Simply, you're going to set up a 'web server', a 'plug-in' for the server that communicates with XTension, a method for keeping tabs on your current web address (IP), and of course XTension.
This requires XTension 3.7.5 or later

Set up the web server folder

First you need to download James Sentman's X2Web server plug-in.
You'll find the latest version at James's web site.

Next, put the X2Web package in your 'server folder'.
By default, this is the Web Pages folder
that is in the root directory of your Boot volume.
x2web docs

Set up the web server

This will work with other web servers, but for this example, we'll use Apple's Personal Web Server that has been a part of the MacOS for many years now.

Under the Apple menu, Control Panels,
select web sharing.

Then, under the Edit Menu, select Preferences.

Choose a 'Web Sharing port number'.
We've chosen 1234, but you may need to
choose a different one...?

Enable the Web Sharing Log,
and remember that you can
change the max memory size.

Now press the Actions tab...
PWS prefs

Here you need to press the New...
button which will allow you to choose an
'action' to be taken whenever the server
encounters a request for a page with a
suffix of .x10 which is what the
X2Web plug-in uses as its 'cue'.

Then just choose the action pop-down
Launch at suffix, and then enter
the suffix .x10.

Now press the button to Select the
application, and then navigate to the
Web Pages folder and choose X2Web.

After pressing OK, you should see the
dialog shown here...
PWS actions

At this point, you have set up everything you need !
Now all you have to do is Start the Web Server
and set up XTension.

Now set up your XTension web Lists

The only thing you need to do for XTension is to set up all of the Lists that you want to 'expose' to the web.

We have decided that it would be best if you name all Lists that you want to expose with a suffix of .web.
(Not case sensitive)

ALL Lists that have their names with a suffix of .web will be exposed to the Web Automatically !

So, create a new List (CMD-L), and name it as you wish, but give it a suffix of .web

Now drag any Units that you want to expose into this new List.

BTW: This may be a good time to 'save' your XTension database...
exposed units

Now there's only one leetle thing :

You need to know what URL to connect to from your web browser.

If you have a Static IP Address, this is easy. Just enter that address into your Browser 'Address' line, and add the Port number that you entered when you set up the Web Server above (1234 etc).

Then you'll need a 'page name', and for this demo, you'll want to enter this complete name:

http://[your IP address] :1234/instantx/index.x10

If you have done this correctly,
you should see this page in your browser window :

exposed Lists

This is a List of Lists that you have 'exposed' to the web.

If you have done this correctly,
you should see this page in your browser window :

exposed units

This is a List of Units in the list Web demo that you have 'exposed' to the web.

Here you can see that you have the current status of each of those units, as well as the 'last time stamp' of each.

If you click on the 'Toggle' link for any unit, you can change the status for that unit. This normally means sending an ON if it's OFF, and vice versa.

Note that if the unit is a 'smart' or 'simulated' dimmer, this will work nicely to softly dim/brighten that unit.

Also, after 'toggling' a unit, the web page 'refreshes', and you can see the changed results as well as any other elements that have changed.

Clicking on the List link again will cause a refresh of the page !

A little more control

If you click on the More link for any unit, you will see a page of detailed functions that you can perform on that unit :
more unit controls

Back down to Earth

We've side-stepped the problem of knowing the IP address of your home system.

Even if you have a DSL or cable modem connection, and certainy if you have a dial-up connection, your IP address can change, and all of a sudden, you can't connect to your home.

There are different techniques for taking care of this, but the best one is to use another of James Sentman's free tools Dynamic DNS Client. (see info and download it from this page)

This application and the 'free' web service sites that it supports, make it easy to maintain a 'web presence' for your XTension web server, without having to publish a web page that shows your 'current' IP address.
(Which is the alternative, as well as sending the current IP address to your cell phone or to an email address)

Basically, this tool periodically tells the Dynamic DNS service provider what your current IP address is, and that service updates a list of addresses, giving your home system an address like : www.myhome.dyndns.org

Thus, at any time, even from your PC at work, you can connect to something like:


and you will be connected to your home system.

UPDATE: March 1, 2002: Log File Access and Search !

James has now added the ability to display and search the XTension Log files !

If you pull down the X2Web File Menu, and select Log File Window, you will be presented with this dialog :

Although you can select other Log Files from the Logs folder, you'll certainly want to choose the 'current' XTension Log file that is in the XTension folder.

Having done that, the next time you link to your home system, you will be presented with this new dialog :

Now, click on the "Log Files" link, and you'll get a page that lets you choose one of the Log Files that you elected in the X2Web Log File maintenance dialog above.

Clicking on any of the Log File names, you'll get this wonderful new view of the activity of your system... :

The first page you see will be the 'most recent' portion of the Log. But note that you can navigate to the 'previous' or 'next' pages, 'Top', and 'End'.

Now notice that you can Search for keywords in this log file, as I did above for the "beer cooler"

You'll notice also that there is an option to use 'Regular Expressions' in the search operation. This is not the same as you have used with on-line search engines. It is the system used by BBEdit, and RealBasic. I've left it out for now, as it takes a bit of telling. But it is a great way to go to a certain 'time' within the Log.

More to come

I'm sure that you'll be very happy with this fast and easy technique to set up a web interface to your home. But there is much more to the X2Web technique, from using other web servers, to creating very personalized web pages.

But for now, this should be a great boon to your XTension system.


Copyright 2007, Sand Hill Engineering All rights reserved.

Mac Made

Last modified: March 1, 2002
Michael Ferguson, webmaster@shed.com