Controllers
There’s a wide variety of controllers available to transmit X-10 commands over the power line, varying from simple table-top models to computer-controlled units.We’ve used the X-10 model CM11A PC controller, although many others exist. The Smarthome unit is particularly attractive because of its USB interface, helping you migrate away from serial ports.
Although you’ll typically use one of these controllers as the main transmitter in your system, controlling all your other devices through it, you don’t have to restrict them to that role. You can have more than one in your system, and you can use them with a serial interface to devices like the Basic Stamp in the section “Building Your Own Modules” below or the Java Stamp we use in the Automated BBQ Temperature Control project (Chapter 6). That’s a particularly attractive option with the Java Stamp, because (unlike the Basic Stamp) the Java Stamp does not have built-in routines to handle the low-level interface of the TW-523 Two-way Powerline Interface and related devices.
The protocol your PC uses to talk to a CM11A is defined in an X-10 document, including the information you’d need to use the interface with a Java Stamp.
The electrical connection to a CM11A is a standard RS-232 serial port, operating at 4.8 Kbps with 8 data bits, 1 stop bit, and no parity. The CM11A presents an RJ-11 connector; using the supplied serial cable, the signals are on the standard pins for a 9-pin connector (Signal In = pin 2, Signal Out = pin 3, Signal Ground = pin 5) plus one addition: the Ring In signal is used, and is on pin 9. The interface asserts Ring In when it needs service from the PC, such as when it hears a command or status message on the power line from another device. The interface can operate on any house or unit code.
Here’s an example (Figure 13) of what you can do with just a CM11A and some switch modules. The HomeSeer software lets you enter you location, and from it calculates times for sunrise and sunset. Rules in HomeSeer then turn the lights in front of your house on at sunset and off at sunrise, with small random changes backwards or forwards each day to avoid making it look like the lights are on a timer.

FIGURE 13: Outdoor lighting control