Introduction to X10 Home Automation Technology
by Tony Northrup, co-author of Home Hacking Projects for Geeks01/10/2005
Every geek dreams of the elusive smart home, a place that automatically turns off that light you forgot in the basement when you went to bed, monitors your house for intruders while you sleep, and reads you the weather report in the morning so you know how to dress. Good news: smart home technology is no longer science fiction. Bad news: it's not for everyone. You need to fall into one of the following two categories:
- Filthy rich
- Geek
If you're filthy rich, stop reading, call up your favorite contractor, and give him (or her) a blank check. If you're a geek, spend a few minutes learning about X10 technology.
X10 is just one of many home automation technologies used in my latest book, Home Hacking Projects for Geeks. The book will guide you step by step through the process of adding common smart home features to your home.
What Can You Do with X10?
X10 is a powerful, flexible, and (mostly) inexpensive technology. With X10 technology and a little creativity, you can accomplish the following things:
- Add a light switch to any wall without running any wires.
- Control a lamp or built-in light with your computer (described in Project 2, "Automate Your Porch Light," in Home Hacking Projects for Geeks).
- Use a television at your home or a computer on the Internet to monitor multiple, inexpensive video cameras around your home (described in Project 3, "Remotely Monitor a Pet," and Project 12, "Watch Your House Across the Network").
- Turn off the power outlets in your kid's bedroom between 4 p.m. and 6 p.m. to make sure he or she is studying and not playing a game or watching TV.
- Build a custom security system that sounds an alarm if an intruder opens a window, or sends an email to your mobile phone if there is a water leak in your basement (described in Project 13, "Build a Security System").
What Is X10?
X10 is a communications protocol, similar to network protocols such as TCP/IP. However, X10 works across home power lines and is extremely low-bandwidth. X10 devices send about one command per second, and the commands are as simple as "Device A1: turn on." These commands require less than 1/1000th of the bandwidth of a dial-up connection. Like a broadcast network, every command is sent through every wire in your house; it's up to each individual device to decide whether it needs to respond to a particular command. With X10, devices that can be plugged into the wall can communicate with each other and with your computer. There are hundreds of X10 devices available, and most are fairly inexpensive--less than $40. Figure 1 shows some of the most common types of X10 devices: a two-way, hard-wired X10 wall switch, a wireless transceiver, and a battery-operated wireless wall switch.

Figure 1. A hard-wired X10 wall switch, an X10 wireless transceiver, and a wireless X10 wall switch
The simplest way to use X10 is to turn a lamp on and off from an X10 remote. To do this, configure an X10 transmitter (such as an X10 remote or wall switch) and an X10 receiver (such as a lamp module) to the same X10 address. Plug a lamp into the X10 receiver, as shown in Figure 2, and then turn the lamp on. Voila! You can now use the X10 remote to turn the lamp on and off.
Electronics stores and large hardware stores usually carry a handful of common X10 parts; in fact, you can buy all of the parts you need for simple projects at the Home Depot, Lowe's, or Radio Shack. However, I prefer to buy the parts on the Internet because prices tend to be lower and there are many more parts to choose from. I do most of my shopping at SmartHome.

Figure 2. An X10 lamp module turns a lamp on and off when an X10 signal is sent from an X10 transmitter
X10 Addressing
To identify individual devices and groups of devices, X10 uses an addressing scheme that provides up to 256 unique addresses. House codes are written as a single letter in the range A-P. Unit codes are a decimal number between one and 16. Examples of valid house codes are A1, J13, and P16.
Note: If you're a network geek, think of the house code as the network portion of an IP address, and the unit code as the host portion.
Unlike the IP addresses used on the Internet, X10 addresses do not have to be unique. You should give a single address for each group of X10 devices that you would like to respond to the same command. For example, if you want to turn on two lamps with a single switch, connect an X10 lamp module to each lamp and configure both modules with a single address. If you want all of the lamps in a room to be controlled by a single command, they should all be assigned a single address.
|
Related Reading
Home Hacking Projects for Geeks |
While most X10 devices are one-way (because they are only capable of either sending or receiving), some devices are two-way. For example, one-way X10 light switches can receive X10 commands to enable them to be turned on and off remotely. You can also use the one-way light switch to control the light locally, just as you control a conventional light switch. However, when you flip the switch, a one-way X10 light switch does not transmit a signal. Therefore, while flipping the switch can turn the light on and off, it cannot turn on other X10 switches.
Two-way X10 light switches can receive X10 commands, and can also transmit an X10 command when you flip the switch. This allows you to use the switch to control both the light and another X10 device simultaneously. For example, if I replace the switch that controls my kitchen's under-cabinet lighting with a one-way X10 switch, and then replace the switch that controls my kitchen's overhead lighting with a two-way X10 switch, I could turn on both the overhead light and the under-cabinet light by using the overhead light switch.
For More Information
The greatest things about X10 are its flexibility and the large number of X10 components available. These factors also make it a bit challenging to learn. A good way to dip your toe into the water is to buy a home automation starter kit, and then automate a light or two.
When you feel comfortable with the hardware, start to explore the ways you can control X10 devices from your computer. Buy a CM11A Serial X10-computer interface. (Whatever you do, don't get the USB or the Powerlinc II models!) Immediately throw away the software that comes with it, and download one of these free X10 home control applications:
- MisterHouse (my favorite)
- Java Home Automation
- X10 Controller
If you have scripting or programming skills, it'll probably be easier for you to write your own applications to control your X10 devices than to use other people's tools. X10 scripts are extremely easy to write, thanks to the Perl tools created by Bill Birthisel. If you don't feel comfortable writing scripts, grab a copy of Home Hacking Projects for Geeks--I provide many ready-to-run scripts and tools that you can edit for your own purposes.
Tony Northrup , a Boston-area network security consultant and technology author, developed his interest in home automation after renting an apartment where every light was controlled by pulling a string. Tony's wife, Erica, ensures his home hacking projects are user-friendly and reliable, while his cat, Sammy, mangles every project within paw's reach.
Return to the O'Reilly Network.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 9 of 9.
-
Powerlinc II not supported by Misterhouse!!
2005-01-19 15:49:34 dougrobertson [Reply | View]
As far as I can tell, the Powerlinc module that you recommend is not yet supported for Misterhouse! This is discouraging to find out, having bought one after reading this article! -
Powerlinc II not supported by Misterhouse!!
2005-01-19 18:30:30 TonyNorthrup [Reply | View]
No worries, the Powerlinc II (serial, not USB) is definitely supported by Misterhouse and every other X10 app I've used. I've always used the CM11A libraries with it, so it must support exactly the same protocol. It also supports the older TW523 protocol. I recommend it over the CM11A because it's about $17 less expensive.
Good luck with it. -
Powerlinc II not supported by Misterhouse!!
2005-01-21 13:12:43 dougrobertson [Reply | View]
It doesn't work for me, and I can't find any pertinent "how to" info in the various Misterhouse sites.
My mh.log file is getting the following error messages:
01/20/2005 06:59:34 PM X10: Outgoing data=XO1OJ
Bad checksum in cm11 send: cs1=74 cs2=240. Will retry
Bad checksum in cm11 send: cs1=74 cs2=240. Will retry
Bad checksum in cm11 send: cs1=74 cs2=240. Will retry
Bad checksum in cm11 send: cs1=74 cs2=240. Will retry
Bad checksum in cm11 send: cs1=72 cs2=240. Will retry
Bad checksum in cm11 send: cs1=72 cs2=240. Will retry
Bad checksum in cm11 send: cs1=72 cs2=240. Will retry
Bad checksum in cm11 send: cs1=72 cs2=240. Will retry
-
Powerlinc II not supported by Misterhouse!!
2005-01-21 17:45:28 TonyNorthrup [Reply | View]
Start by testing it with the software that came packaged with it. Getting that software to work will verify that you've selected the correct port and connected the Powerlinc correctly. Then, try the same configuration with Misterhouse.
Good luck with it. -
Powerlinc II not supported by Misterhouse!!
2005-01-22 21:08:48 dougrobertson [Reply | View]
I did all that, although this is not the forum to get into all the details. I've posted to the Misterhouse users list to get information there.
The list can be read at:
http://news.gmane.org/gmane.comp.misc.misterhouse.user -
Powerlinc II not supported by Misterhouse!!
2005-01-24 10:41:39 TonyNorthrup [Reply | View]
Sorry, this was my mistake. I thought I had been using the PowerLinc II, but I actually have the CM11a model. I updated the article so that it now recommends the CM11a.
I still don't understand why Misterhouse doesn't work with the Powerlinc II. The Powerlinc II and Misterhouse both support the TW523 protocol, at least according to the online documentation.
Sorry again about the confusion, and best of luck with your home automation project.
-
No USB?
2005-01-12 07:48:33 McNair [Reply | View]
Err, If I don't get the USB version of the interface how will I connect it to my Mac? That is, why don't you like the USB version of the PowerLinc II?
John -
No USB?
2005-01-12 08:37:00 TonyNorthrup [Reply | View]
You can use a USB to serial adapter, and then connect the serial interface to the serial PowerLinc.
I don't like the USB version of the PowerLinc because most of the tools for communicating directly to the PowerLinc only work with the serial version. It's much more complicated to communicate with the USB version.
This link has useful information on using home automation tools with a Mac:
http://w3.misterhouse.net:81/get_to_know_mh.html
Many of the low-level open source tools that I use in the book are written by the author of MisterHouse, so there's a good chance my scripts will work on the Mac if you follow his instructions. I haven't tested it, though.







Someone who was living in my home installed a camera system and is using x-10 technology to remote view me and my home happenings through his computer at his home. How can I prove the camera system is linked to his computer. Thank you.
Alice Waters