Home automation, X10, computer-controlled appliances
X10 is system for controlling lights and appliances, where control signals
are carried on the mains wiring itself. It is very big in the USA, but not
widely used in Britain. This article describes how to
use X10 for home automation, and for solving knotty wiring problems.
X10 devices can be controlled by computers, if you have the appropriate
interface. This makes it easy to turn appliances on and off at set times, link
remote-control button presses to play MP3 audio, and all sort of clever tricks.
I have developed a Linux driver for the TW723 X10 controller. Source code
is available from the download page, or
click here for more information.
I have proposed a Java API for X10 devices. Using this API, Java
applications would be able to control and monitor X10 equipment. This
will, of course, require a device-specific driver compatible with
this specification. At present, a driver exists which provides the
Java interface to the TW723 native-code driver described above.
The complete source code and Javadoc documentation is available
from the Java download page; for
a brief overview of the API, click here.
A command-line test client is available for the X10 API. Full source
code from the Java download page; for
a brief description click here
I have implemented a Java interface to the TW723
driver available from this site; this Java interface is compatible with the
X10 API, and can be used with the command-line client and Web client to
control X10 devices. Full source code from the
Java download page.
Putting all the above pieces together allows us to implement, among other
things, a Web interface to X10 devices. This
is implemented in JSP and has been tested with the Tomcat JSP/servlet engine.
In operation, it provides a simulation of an X10 controller handset, and
looks like this:
The complete source code and Javadoc documentation is available
from the Java download page.
More home-automation-related software for Linux is available from the
Linux download.