O'Reilly logo

Games, Diversions & Perl Culture by Jon Orwant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Home Automation: The X10 Nitty-Gritty

Bill Birthisel

Consider small computers. No, not notebooks, subnotebooks, or even “embedded” single board controllers. Blackberry, Psion, Palm—still way too big. Game consoles, microwave oven keypads, clock radios? Getting closer. TV remotes, computer keyboards, and talking toys are at the top end of this class. The real foot soldier of home automation is the microcontroller—a tiny computer optimized to do a few things well. Tiny is the key word here—microcontrollers need to be small, cheap, and able to run on low power.

In this article, we will introduce some of the nitty-gritty details of working with home automation. We’ll talk about two microcontroller-based boxes you can connect to your computer: one simple (the CM17) and one complex (the CM11). Each sends messages to devices that plug into your house power and control individual items (one lamp or appliance per device). We’ll start with the CM17 and use it to describe the commands, protocols, and timing issues common to most home control installations. Then we’ll look at the CM11 and the extra complications associated with receiving commands. Finally, we’ll look at some of the issues a real home automation application needs to consider.

Along the way, we’ll examine some the Perl modules you can use to manipulate the CM17 and CM11. The examples will run on your computer even if you don’t have any of the hardware, although you won’t be able to “watch der blinkin’ lights.” In practice, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required