X10 Home Automation

X10 is a company that sells X10 power line carrier (PLC) and wireless technology. Until just recently, the X10 company held patents on the X10 technology. Confusing, isn’t it? When those patents expired, companies such as Advanced Control Technologies, Inc. (ACT); Leviton; Powerline Control Systems (PCS); Smarthome; and others began making X10-compatible modules (with enhancements). Some modules plug into the wall, replace sockets, work as inline modules (fitting inside electrical boxes), or replace wall switches. The modules I discuss in this chapter are the plug-in wall modules.

X10 Home Automation
X10 Home Automation

This allows you to plug an electrical device (a lamp, a TV, or an appliance) into the module and plug the module into the wall. From there, you can control the power to that device. A PC with an X10 interface and control software or an X10 console sends the commands to control the modules. The modules can provide sprinkler, heating, or relay control (to name just a few tricks they do).

I introduce you to some of the many X10-compatible products. (One of the nice things about Linux is that it allows you to extend programs to add functionality you think is missing.) You get to play with the hardware and use the software products under the Linux environment, and I even show you how to use X10 and Linux software to save money by using it to automagically turn on and off the power to your devices (your printer, for example) as necessary. This chapter also covers resolving those little problems that crop up while using X10.

Everyone uses the term module to refer to the X10 parts. I use the generic term device to mean the thing plugged into the X10 modules (which then plugs in the wall outlet just as an extension cord would).

X10 Power Line Carrier

You need to know about the X10 power line carrier (PLC) technology (X10 for short). Simply put, X10 uses your home’s electrical wiring and the electricity (alternating current, or AC) to carry the X10 commands throughout the house. The software on your Linux PC talks to the X10 interface module. The X10 interface module puts the commands on the electrical wires so that all the wall modules can receive them. The modules listen for commands meant for them. (Each command has an address portion, and each module has an address.) When a command arrives at the correct module, that module performs the requested command (dim, brighten, turn on, or turn off).

X10 communicates at a rate between 50 and 60 bps. Note the lack of the K! Yes, it’s that slow; a single X10 command takes about one second to send and be acted on. This means that you can’t expect X10 to control fancy blinking holiday lighting displays. Now, one second isn’t as bad as it sounds, but it is about at the edge of tolerance of the Spouse Acceptance Factor (SAF). See the nearby sidebar for more about this topic.

So what can you do with X10? This list scratches the surface of what X10 can do:

Send an on or off command. The simplest devices, such as appliance modules, are capable of handling only on or off commands.

Send a brighten or dim command. Lamp modules can support dim and brighten commands as well as on and off commands.

Dim or brighten to preset levels. Some fancier X10 modules, such as those from Smarthome, support preset levels. These modules will either jump to a preset level or ramp to a preset level you program in advance. You can send this specific X10 command as a preset command or by using an extended command. The basic lamp modules can’t handle the extended command, but the more expensive modules can.

Send special commands. When is a dim not a dim? When something like a thermostat receives the dim command. Instead, the thermostat interprets the dim as a command to set back the temperature. Other devices, such as security systems and sprinkler controls, do the same thing.

Send signals from your computer to an X10 module. This allows you to control one or more modules. Generally, you can let the X10 software automatically handle the commands that you’ve pre configured, but sometimes, you might want to manually type commands, and that’s available, too.

Operate X10 modules manually. X10 remote control units, console units, and switches allow you to do this.

The commands that are sent to the modules have an address portion of the command. The X10 modules are listening for this address. The module ignores commands with address portions that do not match a module’s address. The module performs commands with address portions that match. X10 modules have two portions of an address: a house code and a unit code. The house code is made up of a letter between A and P, and the unit code is made up of a number between 1 and 16. For example, a module that is addressed as A1 has a house code of A and a unit code of 1. How you set these codes depends on how you want to set up your module:

On the simple X10 modules, you turn two dials to set the address. One dial sets the house code (A through P), and the other sets the unit code (1 through 16). By default, the address of a new module is set to A1.

On the fancier modules, you must press a button sequence or send specific X10 commands to set the address of the modules.

Each module must have an address, but multiple modules can have the same address. When a command with the address arrives, only the modules with that address will listen and act upon that command.