https://travcom.tripod.com/x10_talk.html

An Introduction to X10

I'd like to talk about X10. X10 equipment is the best-known (and probably best-selling) home automation equipment around. It may surprise you that it is also very inexpensive, and that inexpensive computer interfaces are available, and that there are (free) open-source software packages to work with that computer interface. I think that for the money, X10 is the best home automation solution out there. However, there are some definite limitations, so I'll be acting both as evangelist and critic here.

Motivation

First off, let me explain what X10 can do for you. If you hear a sound in your house at night, you could press a button on a panel by your bed and have all the lights come on. The X10 security system can detect motion in your house (or the opening of a door, or the pressing of a panic button), sound an alarm, flash the lights in the house to attract attention, call you on your cell phone or pager, then try contacting your neighbor in case you're away on vacation; once it reaches someone, they can listen in on what's going on in your house! With a computer interface, the possibilities are almost limitless. You could turn on your MP3 player with your remote, and start listening to music. At 0700 you could have it start your coffee, then at 0720 have your computer play an audio file of "reveille", turn on the lights in your bedroom, and at 0745 open your garage door. One person I know has a "panic button" near his door that signals his computer to wipe his hard drive, just in case the feds find him and serve him with a warrant. One organization I heard about wanted to have an IDS turn off their computers at the first sign of attack; you could use X10 to do it. And then there's the simple pleasure of turning off all the lights in your house from the comfort of your couch, just before lying down for a nap.

Simply put, X10 allows your computer to do "real" stuff, to interact with your environment, to extend your control from bits and bytes to anything electrically powered.

How inexpensive is it? By the prices on their web site today, you could set up a house for remote control of two lamps and five overhead lights for $92. You can get the starter home security package with remote, console, one motion detector, two door/window sensors for $100 as well. The computer interface is going for $20 on Ebay.

X10: The Company

It is difficult to know where to begin when discussing X10. X10 is first and foremost a company. This company produces low-cost home automation equipment, including a computer interface. This makes them interesting to the gadget-hungry technophile; the computer interface provides literally links the flexibility of a general-purpose computer, while the low cost means you can afford to play with it, and modify (hack) a piece of equipment without worrying about the cost. X10 has been so successful that there are several companies producing compatible pieces of equipment. These pieces of equipment communicate with one another using either a wired protocol over your house wiring or a wireless protocol through the ether.

There is so much information on X10 on the web, and there are so many pieces of X10-compatible equipment out there that it is very difficult to generalize about it or reduce it to the point that you don't get information overload.

A note about the X10 web site: X10 has one of the most confusing and distracting web sites and you will find it very difficult to navigate. You might also want to check out SmartHome.

A note about X10's "deals": X10 is continually having some kind of "deal". Frequently, they have a dynamically generated page which makes it appear that the deal ends at midnight; do not be fooled. However, their package deals usually have a significant discount, so if you're looking to buy, pay attention to the loudly-promoted package deals to see if you can get what you want for less. Also, don't forget about E-bay; since X10 sells so much in "bundles", there's an active used component market.

A note about X10's use of email addresses:X10 will spam you senseless. If you don't have a good way of filtering your email, use a fake address, perhaps foo@bar.x10.com so the email doesn't actually leave their system.

The Wire Protocol

Description

http://www.hometoys.com/htinews/feb99/articles/kingery/kingery13.htm

Basically, what you should take away from that is that there are 16 "house codes" and 16 "unit codes", and that means 256 different "addresses". It is very common to use letters for the house code and numbers for the unit codes, together to form an address like "A5" or "K10". You may send a variety of commands, the most important of which are "on" and "off", and some special codes like "bright" and "dim", "all lights on" and "all units off" (note: that is not "all units on" nor "all lights off").

Drawbacks

There is no way to know if the message was received properly. This is because communication is unidirectional, from the X10 transmitter to an X10 receiver.

It can take a second or two for a command to be sent. This is because it can send only one bit per zero-crossing of a 60Hz signal, that's just 120 bps, and even that bandwidth is reduced significantly by dramatic duplication of data for reliability.

You shouldn't have two transmitters sending at once, because there is no collision detection.

The signal is small; 5V on a 110V sine wave, so range is limited. In particular, most houses have two "hot" (black) 110V wires and one neutral (gray). The two hot wires are out of phase, and this gives the ability to have 220V circuits like for your washer and dryer. However, an X10 signal must travel from one 110V circuit back to the power distribution panel and "jump" to the other circuit, and travel back into the house; depending on where you place the X10 transmitter, this may be too far. Also, for houses with a large number of TVs and computers, you may find that their power supplies absorb the signal, and so you may need an expensive ($150-200) amplifying coupler between the two 110V phases of your wiring.

Modules

There are essentially two types of X10 receivers; lamp modules and appliance modules.

Lamp Modules

Note that even though you can send dim/brighten commands to any house code and unit code, only lamp modules dim/brighten. They do this by clamping the 60Hz sine wave, which means they can be used safely only with incandescent lamps. Lamp modules are tricky, in that they can detect when you've used the local control (switch) on the lamp to turn it on or off, and so you don't need to use X10. Let me rephrase that for clarity; when you turn the lamp off, then on again, the lamp module "knows" that you're fiddling with the switch, and it acts like a normal lamp again. However, you need to leave the switch "on" in order to regain X10 control over it (obviously). I'm not sure exactly how this works, but it does. Note that this is not the same thing as saying you can use either X10 or the switch at will.

Appliance Modules

Of course, there are "appliance modules" which can turn on and off flourescent lamps, motors, fans, and even computers. Basically appliance modules are X10-controlled relays that turn the power on or off. They make a loud click which may annoy you (it doesn't bother me).

The Wireless Protocol

http://www.geocities.com/ido_bartana/x10rf.htm

Any X10 equipment with an antenna acts as bridge from RF to wire protocol (but usually only for its assigned house code). These are called "transceivers" because they both transmit (on the house wiring) and receive (from wireless remotes).

Most units with an antenna (e.g. TM751) can only have one unit code, others (e.g. RR501) only two unit codes; these arbitrary restrictions on ID assignment remind me of trying to make sure you don't have IRQ conflicts on ISA hardware. For some reason, every module I've seen with an antennae is either a security console or a appliance module (no lamp modules).

Motion Detectors

Most motion detectors require batteries because they are truly wireless. This means you can put them exactly where they need to be. However, you might not find the non-security motion detectors as useful as you would like. For example, a motion detector will send an ON signal to some preconfigured address when you enter a room. You could use this to turn on a light. However, it will send an OFF signal after a fixed length of inactivity. This length is fixed in the detector and cannot be configured. If it's 5 minutes and you sit down to watch TV, your light will probably be turned off.

Firecracker Serial Protocol

http://www.geocities.com/ido_bartana/Firecracker_protocol.htm

You may be familiar with X10 because of the $5 firecracker set, which contained a remote, lamp module and a wireless serial transmitter. The $5 firecracker combo was a "loss-leader".

The firecracker is basically a wireless transmitter, but not a wireless receiver, so it is not a substitute for the CM11A computer interface. It is output-only.

Security Applications

Security components use a novel method for communicating because X10 did not want others to be able to turn off your alarm system using standard equipment. For this reason, the security components generate unique IDs and "register" them with the security console (only when it is in "install" mode). I am not sure how secure this really is.

Most pieces of security equipment do not generate wire protocol commands. The alarm console generates X10 commands, but it only does this when the alarm goes off (it flashes all the lights).

The X10 security system can be set off by either door/window sensors (when it's in "home" mode) or door/window sensors and motion detectors (when it's in "away" mode). This is so that you can turn on the alarm while you're asleep, and not have to worry about setting it off if you get up to use the bathroom. When it detects an intruder, it sounds an alarm, starts sending "all lights on" followed by "all units off" (to attract attention, and scare intruders away), and starts to call the pre-programmed numbers (it can hold four). Once it reaches someone, they can press a key, which will turn off the siren and allow them to listen to the microphone on the alarm console.

Note that there are two motion detectors; one generates X10 wireless commands, the other X10 wireless security alarms. Note also that the motion detectors will probably not function properly outside if the ambient temperature gets above body temperature.

They could really have made the security console a little better; for one thing, there's no ability to delay dialing, so that it could send numeric messages to pagers. Also, the recorded message starts when it starts dialing, not when the callees pick up the phone. It would be nice if they had added a way to disable the alarm by punching in DTMF codes, or if you could talk to an intruder (rather than just being able to listen in).

Panic Button

The wireless security panic button is an exception to the rule, in that a light touch will be converted into an X10 wireline command to turn on a certain address. If you hold it down, however, it will set off the alarm (and the chain of events that normally follows the alarm). It appears that there are not many ID codes for panic buttons, because I have had problems with certain mixes of panic buttons; this manifests itself as panic buttons that do not "register" with the security console when it is in install mode.

Cameras

The "wireless" X10 cameras require a wire for power, but virtually none of the pictures on the web site show it. I don't have any cameras so I can't tell you any more.

Hardware Hackery and Tricks

One trick you could do is rig up several wireline modules (appliance or lamp) in series so that it took a certain combination of commands to turn on a device. Of course the "wall-warts" aren't made for this so in reality you'd need some short extension cords or a soldering gun.

Another trick you could do is use an appliance module to connect power to a fan, and have the fan wind up a rope or string to make linear motion.

For the security wireless door/window sensors, they are normally closed (NC) contacts, so you could wire up a variety of things:

Neil Cherry has a plan for a modified TW523 that allows you to "sniff" X10 data from the power line using some hacks to the two-way X10 interface module.

Here's a whole ton of modifications: http://www.geocities.com/ido_bartana/toc.htm#Module modifications

Software

Note that the computer interface in particular only sees house wiring signals. It cannot "see" RF commands (except those bridged to the house wiring by an appropriate module with an antenna). The computer interface package currently comes with the computer interface, a keychain remote, a wireless transceiver, a 6-in-1 learning remote, software and a lamp module for about $50!

All software below assumes that you have the CM11A computer interface.

Heyu

http://heyu.tanj.com/heyu/

The author explains the silly name:

My kids are grown and on their own, and I kind of missed being able to shout out "Hey You! Turn the lights off!"
Basically this program allows your computer to:
  1. control lights and other X10 receivers
  2. program the CM11A computer interface to do the same (on its own)
Note that it does not allow it to receive commands from X10 transmitters and execute programs; for that you need xtend.

Here's what the author says about heyu:

With heyu, you can: There are two demo programs included with heyu, monit and x10biff:

You might wonder about the CM11A. It is a small microcontroller (?) that connects to your computer via an RS-232 serial cable (they actually use phone wire and modular connectors). It can store up to 128 "events". Events are timers, triggers, and macros. Timers and triggers invoke macros, and macros can send a series of X10 commands. A macro can turn on, off, dim, or brighten up to 16 units. The CM11A has a battery-backed clock to support timers.

xtend

http://www.jabberwocky.com/software/xtend/

The xtend program is named to evoke thoughts about inetd; it works similarly. Instead of waiting for network connections then invoking programs, it waits for X10 commands and invokes programs in response to them.

Sample Uses:
Using a X10 motion detector (it switches a particular address "on" when it detects motion) you could have your computer say hello when you enter the room.

Or how about putting the X10 motion sensor near your front door and having the system mail you whenever it is tripped.

You can do complex conditionals like "If it is after 10pm, and light B2 is off, then brighten A7 by 20%, wait 5 minutes and then turn it off."

There is a dry-contact adapter available, so perhaps you could wire that to a water sensor.

Using Xtend with heyu, you can create lighting "scenes":

How about something complicated and silly? When you enter the room, the computer should say hello, dim the doorway light to nothing, brighten the room light to 50%, turn the radio on, wait a few seconds and then start a PPP connection so you can read your mail!

MisterHouse

www.misterhouse.net

I've saved the best for last. I haven't actually tried MisterHouse yet, but I will soon. For now I'll just quote their web page:

MisterHouse is an open source home automation program. It's fun, it's free, and it's entirely geeky. Written in Perl, it fires events based on time, web, socket, voice, and serial data. It currently runs on Windows 95/98/NT/2k/XP and on most Unix based platforms, including Linux and Mac OSX.

Perl subroutines and objects are used to give a powerful programming interface. Here is some example code:

   $fountain = new X10_Item 'B1';
   set $fountain ON if time_now '6:00 PM';

   $movement_sensor = new Serial_Item 'XA2', 'stair';
   play(file => 'stairs_creek*.wav') if state_now $movement_sensor eq 'stair';

   $v_bedroom_curtain = new Voice_Cmd '[open,close] the bedroom curtains';
   curtain('bedroom', $state) if $state = said $v_bedroom_curtain;

And, it talks!


Go to this level's index
Travcom auto92089@hushmail.com
Original date: Thu May 15 02:06:59 EDT 2003
Updated: