BUY THIS BOOK
Add to Cart

Print Book $24.95


Add to Cart

PDF $19.99

Safari Books Online

What is this?

Add to UK Cart

Print Book £17.50

What is this?

Looking to Reprint or License this content?


Smart Home Hacks
Smart Home Hacks Tips & Tools for Automating Your House

By Gordon Meyer
Book Price: $24.95 USD
£17.50 GBP
PDF Price: $19.99

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: A Foot in the Front Door
Getting started with home automation can feel like entering a strange, new world. Familiar things such as light switches and electrical outlets take on new roles and capabilities. You hear about house codes, controllers, and sensors that can tell when someone has entered a dark room. And what in the world is a Powerflash? Before you can create your own smart home, you'll need to educate yourself.
The hacks in this chapter form the foundation upon which you'll build your smart home. Start at the beginning and get the basics of what does what, or dive into the middle and discover something surprising. You'll learn how to turn on lights [Hack #2] , take control of your appliances [Hack #3] , and find automation equipment that's masquerading at your local hardware store [Hack #23] .
But before you get sucked in too far, it's a good idea to prepare both your house [Hack #12] and your housemates [Hack #14] for the adventure upon which you're about to embark. With these hacks in hand, you're sure to get off on the right foot.
To send commands to X10 devices, you need to know their addresses. Here are the basics of deciding which addresses to use and how to set them.
The X10 protocol works by sending commands—using the power line in your home—to modules that know how to listen for and respond to requests to turn on, turn off, or brighten the lamp or appliance which they're controlling. A lot of careful timing and engineering are involved to send and receive the commands, but all you really need to know is that each module understands which commands to react to and which ones to ignore.
Here's how it works. Unlike the Postal Service, which (hopefully) delivers mail directly to your address, X10 crudely broadcasts its commands far and wide, throughout your entire electrical system. It's up to each module to continuously listen for commands and discern whether each one is meant for it. To facilitate this, every X10 command is prefaced by an
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Hacks 1–24
Getting started with home automation can feel like entering a strange, new world. Familiar things such as light switches and electrical outlets take on new roles and capabilities. You hear about house codes, controllers, and sensors that can tell when someone has entered a dark room. And what in the world is a Powerflash? Before you can create your own smart home, you'll need to educate yourself.
The hacks in this chapter form the foundation upon which you'll build your smart home. Start at the beginning and get the basics of what does what, or dive into the middle and discover something surprising. You'll learn how to turn on lights [Hack #2] , take control of your appliances [Hack #3] , and find automation equipment that's masquerading at your local hardware store [Hack #23] .
But before you get sucked in too far, it's a good idea to prepare both your house [Hack #12] and your housemates [Hack #14] for the adventure upon which you're about to embark. With these hacks in hand, you're sure to get off on the right foot.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Know the X10 Address
To send commands to X10 devices, you need to know their addresses. Here are the basics of deciding which addresses to use and how to set them.
The X10 protocol works by sending commands—using the power line in your home—to modules that know how to listen for and respond to requests to turn on, turn off, or brighten the lamp or appliance which they're controlling. A lot of careful timing and engineering are involved to send and receive the commands, but all you really need to know is that each module understands which commands to react to and which ones to ignore.
Here's how it works. Unlike the Postal Service, which (hopefully) delivers mail directly to your address, X10 crudely broadcasts its commands far and wide, throughout your entire electrical system. It's up to each module to continuously listen for commands and discern whether each one is meant for it. To facilitate this, every X10 command is prefaced by an address. If the command's address matches that of the module, the module acts on the command; otherwise, it ignores it and waits to see if the next command is meant for it instead.
An X10 address is made up of two parts: a house code, whose value is A through P; and a unit code, whose value is 1 through 16. Together, these form a complete address. For example, the appliance module that you use to control the lava lamp in the den might have an X10 address of B5. Therefore, to turn on the lava lamp, you send the command B5 On. This module will ignore commands prefaced with any other address.
Each X10 module needs to be configured to listen for its address. You set the house and unit codes separately, usually by turning dials on the front of the module, as shown on the lamp module in Figure 1-1. In this example, the module is set to address A1.
You program some modules, such as Smarthome LampLinc (http://www.smarthome.com/2000sc.html; $13), by sending a series of commands over the power line [Hack #13] . Still others, such as X10 motion detectors, require you to push and hold buttons inside the unit to set their addresses. Regardless of how you do it, all X10 modules require you to configure their addresses; just be sure to keep the instructions
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Turn On a Light
If you're new to home automation, the best way to start is with a few lamp modules.
Lamp modules are the basic building block of home automation, and it's not unusual for a smart home to have one connected to nearly every lamp in the house. Lamp modules can vary in appearance, but, essentially, all of them look like the one shown in Figure 1-1 [Hack #1] .
Setting up a lamp module is very simple. Set the address you want this module to respond to by turning the house and unit code dials [Hack #1] on the front of the unit. Then plug a lamp into the front of the module and plug the module into a wall outlet. You'll want to put it into the bottom plug so the module doesn't block the rest of the outlet. If you need to use the top plug for some reason, plug the module into a short extension cord, instead of directly into the outlet, so the bottom outlet remains clear.
Next, turn on the lamp's switch. If it doesn't turn on, don't be alarmed; just turn the switch until it does. We'll talk about why this is necessary in a moment. Now, send an Off command to the module's address using a Palm Pad [Hack #5] or minicontroller [Hack #4] . If this is the first time you've seen X10 in action, don't feel self-conscious as you stand there and make it go on and off repeatedly; it's nearly impossible to resist.
Next, try changing the light's brightness. The lamp module is unique in its ability to brighten and dim whatever is connected to it. To do this, press the On button on the Palm Pad or minicontroller, and then press the Dim/Bright switch. In a second or two, you'll see the lamp react. Whee!
This ability to brighten and dim is why you should use the lamp module only to control lights. Never use it with an appliance, a fan, halogen or fluorescent lights, or a lamp that has a built-in dimmer. For these items, use an appliance module [Hack #3] instead.
Most lamp modules have a feature called local sense
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Master Your Appliances
If you want to automate a fan, coffeepot, or radio, use an appliance module. Thanks to their versatility, appliance modules are an integral component of a smart home.
In many ways, the X10 appliance module fulfills the promise of a Jetsonian future. You can turn fans, radios, coffeepots, garden lights, and popcorn makers into your obedient servants with the addition of this little module. Although nearly identical in appearance to the lamp module [Hack #2] , the appliance module is a lot more versatile. You can use it to control nearly anything that turns on or off.
Although you can use an appliance module to control a lamp, albeit without the ability to control the brightness, never ever use a lamp module to control an appliance. If the lamp module is dimmed accidentally, the appliance might overheat and cause a fire.
The appliance module doesn't understand many X10 commands; it responds only to On or Off. To set the module's address, use the house and unit dials [Hack #1] on the front of the module. For example, the module shown in Figure 1-3 is set to the address B12.
Figure 1-3: An X10 appliance module
After you've set the address, simply plug the module into a wall outlet and plug the appliance that you want to control into the module's plug receptacle. Then, make sure the appliance's switch is turned to the on position.
Send an X10 On command [Hack #4] , and a moment later you'll hear a click, followed by your appliance springing to life.
Unlike lamp modules, some appliance modules don't have a local control feature that enables you to turn on the appliance by using its switch. If an appliance module does have this feature, you can turn it on by turning it on, off, and then on again. If not, you'll need to either disconnect the appliance module or send an X10 command to the module.
You can't control some appliances using this module because they don't have a switch that stays in the on position when the power to the appliance is turned off. That's how the appliance module works: it controls the flow of electricity to the connected appliance. When the module is off, it's as if you've unplugged the appliance from the wall. If the appliance you want to control has a
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Send X10 Commands
The computer you use for home automation often will be sending commands to your X10 devices. But when you want to send a command yourself, to turn on a light or change a setting, for instance, you'll need an X10 controller.
The most common way to send an X10 command is to use a minicontroller, which is a small box (shown in Figure 1-4) that plugs into a wall outlet and has an array of switches that send On and Off signals to X10 addresses.
Figure 1-4: A minicontroller with labeled buttons
It's called a minicontroller because it has four buttons that, when combined with the selector switch at the bottom of the unit, can address only 8 units—half of the 16 possible units in a given house code. This is something to keep in mind when you're selecting the module addresses you want to use; if you spread the addresses out too far, you'll need two controllers to easily send them all commands. Or, buy a maxi-controller instead.
Set the dial on the minicontroller to a house code, and then press one of the numbered buttons to send a command. For example, with the house code set to H, press in the top of the first button to send H1 On, press the second button to send H2 On, and so on down the line. To send a Dim command to a lamp module, first press the On button for the lamp you want to control, and then press Dim or Bright.
Minicontrollers are useful for sending commands directly to a module, such as a lamp, but they're better used to communicate with your home automation software, where a single button press can kick off a script that does a whole series of events. For example, you might use a bedside minicontroller to signal that you've gone to bed for the night [Hack #48] , which causes the house to turn off all the lights, check for open doors, and lower the thermo-stat—all from pressing just one little button. Now that's automation!
Minicontrollers are very handy and it's a good idea to keep one or two around the house. Occasionally, you'll want to send an X10 command to adjust something in your home. Perhaps a light is too bright, or it's a cloudy day and you want a lamp on before sunset. Or, you might have a houseguest to whom you want to give an easy way to control some key areas, such as the hallway lights near the guest bath. All of these are good reasons to use a minicontroller or its wireless brethren, the Palm Pad
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Send X10 Commands Wirelessly
Wireless remote controls are handy power tools for home automators, but you need to understand their quirks to get the most out of them.
In addition to modules that plug into your electrical system, several wireless devices work with X10-based systems. All wireless X10 devices work by transmitting a radio frequency (RF) signal to a nearby receiver that's plugged into an AC outlet. The receiver translates the command and issues it to the power line so that other devices, including your computer and its home automation software, can see it. These devices are called transceivers. Ultimately, it's still necessary to put the commands on the power line—that's the core modus operandi of X10, after all—but the ability to initiate a command without a connecting wire is a great freedom.
The most common wireless X10 devices are motion detectors [Hack #6] , keychain-size remote controls, and Palm Pad remote controls.
Tiny key-chain remotes, such as the one shown in Figure 1-5, enable you to send On or Off commands for one or two addresses. A watch battery powers them, so the range is limited, but it's still pretty good given their tiny power requirements. In most styles of key-chain remotes, you set the address that the first set of buttons control, and the second set of buttons are programmed automatically for the next incremental unit. That is, if you set the first buttons to transmit A4 On and A4 Off, the other buttons will send A5 On and A5 Off. You'll want to keep this unalterable relationship in mind when assigning addresses to your devices.
Figure 1-5: A typical key-chain remote control
Key-chain remotes are handy for scattering about the house, such as at your bedside, for a convenient way to send a command. They're also lightweight and easy to mount on the wall or under a table edge with double-stick tape.
Keep the programming instructions [Hack #22] that come with your remote. To set the remote's address, you'll have to press different combinations of the buttons, and the instructions vary between different models.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Keep Watch with Motion Detectors
A key element in any smart home, motion detectors enable your system to react to you and your visitors as you move about your house.
The X10 wireless motion detector is a beautiful thing in the world of home automation. It's small, inexpensive, and incredibly useful when it comes to creating a smart home. Nothing does a better job of impressing your friends than the lights coming on automatically when you enter a room and turning off after you've left. And that's just the tip of the iceberg for what you can do with these beauties.
A typical motion detector, the X10 MS-14A Eagle Eye, is shown in Figure 1-8. About 2.5 inches square and powered by two AAA batteries, the MS-14A (http://www.smarthome.com/4086.html; $20) is mounted easily on the wall or ceiling with double-stick tape. When the detector senses motion, it sends a signal wirelessly, so you'll need an X10 transceiver [Hack #5] nearby to receive and convert the signal to an X10 command for your computer and other modules to see.
The detector's transmitting range is about 25 feet, but that varies depending on the strength of the batteries and the construction of your home. If you have a stucco home, for example, the detector's signal won't penetrate walls easily, so you might need to put the transceiver in the same room as the detector. Also, keep in mind that the transmitting range will drop off as the detector's batteries weaken. This can lead to troubleshooting confusion when you can see that the LED on the detector indicates it's seeing motion, yet no signal is being sent—a prime indicator that it's time to change the batteries.
Figure 1-8: An X10 motion detector
Motion detectors use passive infrared (PIR) to sense when something around them is moving. They see the world in terms of temperature, and they detect motion by watching for moving patterns of warmth. When you walk into a room, you might feel like a living, breathing being; but to a PIR detector, you're just a moving blob of body heat. Don't take it personally; it treats everyone the same way.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Turn On the Lights When You Enter a Room
Here's an easy way to turn on the lights when you enter a room and have them turn off automatically after you leave. You don't even need a computer!
Although many of the hacks in this book use a computer to automate your home [Hack #16] , computers are not always strictly necessary. X10 modules work just fine without a computer, and in the case of motion-activated lights, you can improve response time and keep your system simple by setting them up to work without a computer-based controller. Even if you generally want to have a computerized smart home, setting up a few lights so that they work independently is a good idea to ensure some basic functionality even when the computer is turned off.
I use that approach for the overhead light in my garage. It's a single light, so it's a good candidate for having it controlled strictly with X10. Also, there aren't any windows, so it's very dark, and I want the light to come on quickly and reliably, even if I happen to be tinkering with my home automation system and it's offline or terribly confused.
I use a motion detector [Hack #6] to turn on the overhead light whenever someone enters the garage using the door from the house. Here's how it's set up:
  • An Eagle Eye motion detector, mounted near the door, is set to address C2.
  • A built-in X10 light switch [Hack #14] is set to address C2.
  • An X10 transceiver, set to house code C, is plugged into a wall outlet in the garage.
Here's how it works. When someone enters the garage, the motion detector sends C2 On. The transceiver picks up this signal and relays it to the power line. The X10 light switch sees the C2 On command, which matches its address and turns on the garage light. This whole process takes just less than two seconds, due to the timing necessary for the wireless and X10 command transmissions.
After the motion detector hasn't sensed any motion for five minutes, it sends C2 Off, which causes the garage light to turn off. The five-minute delay is programmed into the motion detector; you might want to set a longer delay
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Turn On the Lights When They're Needed
Combining a computer-controlled home, motion detectors, and lamp modules can ensure that your lights come on only when you really need them.
The simple approach [Hack #7] of setting a motion detector to the same address as the light you want to control is often useful, but there's a more flexible approach. Instead of having the motion detector control the lights directly, use your home automation software [Hack #16] to add some intelligence to the equation.
Here's the situation:
  • An Eagle Eye motion detector [Hack #6] set to address B2
  • An X10 transceiver to receive the signal from the motion detector
  • A lamp module [Hack #2] set to address B4
  • A computer with home automation software, such as XTension, with units defined for both the motion detector and the lamp module
When a person enters the room and triggers the motion detector, it sends B2 On, which the transceiver receives and transmits to the power line. XTension sees the command and turns on the unit that represents the B2 motion detector in the software.
The unit has the following On script, which XTension executes [Hack #17] when it turns on the unit:
     if (status of "daylight") = false then 
         turnon "bedroom light" 
     endif
In this script, the lamp module named bedroom light will be turned on only if it's nighttime. Compare this with the technique in "Turn On the Lights When You Enter a Room" [Hack #7] , which turns on the light every time the motion detector is activated, day or night. It's a basic idea, but it illustrates how simple logic and just a little scripting can elevate your automation to smart behavior.
In the preceding example, how is the light turned off? There are at least two good approaches. First, you could modify the On script to automatically add a scheduled event that turns off the light five minutes later:
    if (status of "daylight") = false then
       turnon "bedroom light"
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Ring a Bell to Alert the House
The chime module provides an easy way to add audible alerts to your home automation system. Simply plug it in, and then tell it to sound off with a single command.
The chime module, shown in Figure 1-9, is quite simplistic. You need only to set its house and unit codes, and then to plug it in. When it receives an On command, it makes a doorbell-like "ding-dong" sound that repeats three times. There's no way to make it ring in any other pattern, and there's no volume control, so this module is a take-it-or-leave-it affair.
The chime module most commonly is used as a remote doorbell and is helpful particularly if your home's bell is too quiet to hear throughout the house. You can set up a Powerflash to trigger the module with your existing doorbell button, or set its house and unit code to the same as a motion detector and have it chime automatically every time the motion detector signals that someone is nearby. This probably would get annoying quite quickly because it will chime every time the motion detector is triggered, so it's better to control it with a script that limits how often it goes off [Hack #85] .
Figure 1-9: The chime module
In a less highly trafficked area, such as a back gate, the chime module is useful for alerting you of comings and goings where there usually aren't any. Another useful application is to associate the chime module with the arming or disarming of your X10-enabled burglar alarm system so that everyone knows when the system is being armed. Many alarm consoles can send an X10 command when they're armed or disarmed, so simply set the chime module to the address sent by the console and you'll get a nice audible beep when the alarm changes state. Another way to use a chime module is to have it alert you to when the mail is delivered [Hack #62] .
If there's one thing to be said about the chime module, it's that it's loud and it gets your attention. You can quiet it down a bit by placing duct tape over the speaker grille. Or, consider using a universal module instead
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Sense What's Happening
Combine the Powerflash module with switches and sensors to monitor conditions in and around your home.
The oddly named Powerflash module (http://www.smarthome.com/4060.HTML; $24), shown in Figure 1-10, often is overlooked by beginning home automation enthusiasts because at first glance it doesn't seem to do much of anything. It doesn't have the ability to control lamps or anything else, and, in fact, it doesn't respond to any power-line commands at all. So, you might be wondering, what's it good for?
Figure 1-10: The misunderstood Powerflash module
The Powerflash module is an essential tool for knowing what's happening in your home because you can use it to turn virtually any switch or sensor into an X10-savvy signaling device and have your home react automatically to changes in conditions and states. Thanks to the Powerflash and to the wide variety of sensors that are commonly available, you can integrate nearly any condition you care to monitor into your smart home—water, temperature points, current detectors, pressure mats, breaking-glass sensors, and more— nearly any of which you can bring into the reach of your home automation controller.
Simply connect a switch to the two screw-terminals on the front of the Powerflash. The switch doesn't need to know anything about home automation; it just sends its usual signal (On or Off), which the Powerflash detects and translates into an X10 signal to which other modules or your home automation controller can react.
If at any time you find yourself thinking, "I wish I could tell when [something] happens," think Powerflash and go Googling for sensors that complete the puzzle. With a little creative thinking, a solution is probably within reach.
For example, connect a magnetic reed switch to a Powerflash and you can know when the garage door has been opened or closed [Hack #55] . If you have a problem with rainwater seeping into your garage during storms, hook up a water sensor to a Powerflash and you'll get a signal that alerts you to the encroaching puddle
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Control the Uncontrollable
The universal module is an important part of an advanced or intermediate home automation system. With it you can control things that don't have built-in X10 capability.
Let's cut right to the bottom line: the universal module is a relay switch that you control with X10 commands. If there's something you want to automate and it has a switch you can replace or bypass, the universal module, shown in Figure 1-11, is just what you're looking for. Plug this module into the wall and connect wires from its terminals to the device you want to control, and you're pretty much all set.
Figure 1-11: A universal module
A common use of the universal module is to control a garage door [Hack #56] . In this case, the module becomes a second switch, acting in parallel to the push button you use to manually open and close the door.
You set the module's address [Hack #1] by turning the House and Unit dials on the front of the unit. The universal module can act as either a momentary-contact switch—like a doorbell button—or a continuous switch. You determine in which mode the universal module operates by moving the slider on the front of the unit to one of these settings.
Momentary mode
The module briefly closes the relay switch when it receives an On command.
Continuous mode
An On command closes the switch until an Off command is received.
The universal module also has a built-in chime. It's louder than the standard chime module [Hack #9] and sounds off in a more pleasing tone.
The universal module's chime has three different settings:
Relay Only
The module's chime is turned off. The relay switch functions silently.
Sounder & Relay
When the relay switch is turned on or off, the bell will ring four times. This is useful as a warning tone that alerts bystanders that something is about to happen, such as a garage door opening or closing.
Sounder Only
Puts the module into chime-only mode. The relay-switch portion of the unit is disabled and its switch will never be opened or closed. An
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Groom Your Home for X10
The X10 method of sending signals over your home's power system is quite clever, but it's subject to interference from other electrical devices and any anomalies you have in your power system. With a little bit of effort and equipment, you can greatly improve the reliability of X10 in your home.
Most homes in North America have two 120-volt power lines from the utility company coming into the home. These two lines meet at the home's breaker box, where the circuits that feed light switches, plug-in outlets, and appliances are supplied with electricity. Half of the circuits are fed by one of the 120-volt lines, and the second 120-volt line feeds the other half. The intermittent operation of X10 modules usually happens when the transmitter is sending signals on one line and the receiver module is plugged into an outlet on the other line. For the signals to get to the receiver, they actually leave the home, travel to the utility company's transformer, and then come back into the home on the other power line. Not surprisingly, by the time the X10 signal completes this circuitous journey, it might be too weak for the module to detect, particularly in large homes.
The first order of business, then, is to install an X10 coupler-repeater, also known as an amplifier. A coupler-repeater will detect the incoming X10 signal, regenerate it, and then blast it out over both 120-volt lines. If your home is larger than 3,000 square feet, consider installing a coupler-repeater. In smaller homes, a device known as a signal bridge might be enough to get good results. A signal bridge performs the same function but does not amplify the signal when it passes it on to the other power line. See "Improve X10 Reliability" [Hack #86] for more information about options for choosing between when to use an amplifier and when to use a repeater.
Once the signal has been amplified, it's time to preserve it. X10 signals are like water under pressure in a pipe: they go everywhere they can, not just to the receiving module. This means they reach every electrical device in your home, and some of them will affect the strength of the X10 signal. Computers, video gear, and high-end electronics are likely culprits of interfering with X10 signals. The more complicated the electrical power supply in a device, the more likely it is to disrupt X10 signals because the engineers who design power supplies build in traps to filter out and kill electrical noise. Unfortunately, the X10 signals look like electrical noise to these devices, and when the signals are filtered, they get weaker and harder for the intended recipients to receive.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Set Addresses for Modules Without Dials
Some X10 modules don't have mechanical dials to set their addresses or other options. To configure these types of devices, you need to send commands over the power line.
Some of the X10 modules from Smarthome, Inc. have shed the old-style dial method of setting the module's house and unit code [Hack #1] . For example, the LampLinc and ApplianceLinc modules, as shown in Figure 1-12, have smooth fronts with no code wheels.
Eliminating the code wheels has some advantages because they can be prone to failure and have a certain air of cheesiness about them, but it's more complicated than that. By teaching the module to listen for configuration commands over the power line, more options can be supported. That's exactly what Smarthome has done. With the SmartLinc lamp module, for example, you can set how quickly it dims, its initial brightness level when it's on, and whether using the switch on the lamp will turn on the module.
Whew. That's a lot of choices to make when setting up a single lamp module, and, correspondingly, some special steps are required to program it.
Figure 1-12: The LampLinc and ApplianceLinc, which require commands to set their addresses
Because the X10 protocol supports only a handful of commands, setting the options involves sending addresses in a specific sequence, within a short window of time. For example, to set the address of a LampLinc 2000 model, you plug it into the wall, hold down its Set button for five seconds, then send the X10 address you want to set the module to respond to (such as B11) within 30 seconds. Then, send an On command if you want the module to turn on when the lamp's switch is used, or send Off if you want to disable the local control feature.
To set other features, such as the initial brightness level, you might need to send several addresses in sequence. For example, to set the LampLinc 2000SLS's default brightness you send O16, N16, M16, P16, and M16. Then send one or more Dim commands to adjust the lamp to the desired level. Then, send P16, N16, M16, O16,
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Increase the Spousal Approval Factor
Living in a smart home requires, at the very least, tolerance from your family or housemates. If they're indulging your desire to create a home of the future, here are some tips for returning the favor by smoothing out some of the rough spots.
Not everyone in your household will be as enthusiastic about home automation as you are. That's to be expected—everyone has different interests— but unlike some hobbies, automating your home has a profound impact on others. If it's not done in a careful and considerate fashion, it can disrupt and bring frustration to a family's ultimate retreat: their home. For this reason, and just for common courtesy, it's a good idea to discuss your plans before you implement them. The results of some automation projects can be surprising, such as a talking house [Hack #28] , so it's best to make sure you aren't the only one who will enjoy them.
Something else to keep in mind is that installing X10 modules changes the behavior of everyday objects, sometimes in ways that make them virtually unusable by normal methods. For example, using an appliance module to control the Vornado air fan [Hack #3] is a neat idea, but it means you might not be able to turn on the fan by using its switch; some appliance module might prevent that from happening. In addition, if the fan is operating and you turn it off by using its switch, the home automation system won't be able to turn it back on later. You should make sure that everyone in the house is aware of this to reduce frustration with the new approach, and that the benefits of automation—such as energy savings or being able to have the fan turned on only when it's needed—outweigh the drawbacks.
Other X10 modules have their own quirks, too. If you're using lamp modules to control lighting [Hack #2] , you'll need to understand how local sense works. This enables you to turn on the light by turning its built-in switch, but it often takes an extra turn of the switch before the light comes on. Moreover, like the air fan, if the light is turned off at the switch, it's beyond the control of X10. For motion detectors, it is a good idea to discuss how they work
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Unplug Your Computer
Using your computer to control your home makes your home smart. But don't overlook the benefits of a slightly less sophisticated approach.
You can create an automated home by using different approaches. These approaches vary in terms of the equipment needed and the degree of control and automation they provide. If you simply want to turn on lights or appliances without leaving your easy chair, all you need are a few X10 modules and a wireless Palm Pad [Hack #5] or a minicontroller [Hack #4] . This approach gives you complete control (you push buttons to make things happen), but it provides very little automation (if you don't push those buttons, nothing happens).
If you want the lights to come on by themselves at certain times during the day or night, you can use a standalone X10-capable timer, such as the Mini Timer (http://www.smarthome.com/1100x.html; $30) shown in Figure 1-19. This box plugs into your wall and you can program it to turn lights on or off, up to twice a day.
Figure 1-19: The X10 Mini Timer
The Mini Timer also has a security mode that varies the on-and-off schedule you've entered to provide the appearance that someone might be home. You also can use it for an alarm clock and, optionally, have it turn on your coffee maker [Hack #37] when the alarm goes off. With a timer-based system, you're doing more than remotely controlling your home; you're beginning to move toward automation.
Moving up in sophistication are X10 controllers that can use simple logic to make automation decisions, execute a series of X10 commands defined as a macro, and execute macros at scheduled times or at sunrise and sunset. You need a personal computer to program these controllers, but once you have done so, they operate by themselves. See "Choose the Right Controller" [Hack #21] for a discussion of some controllers that fall into this category.
Next up, providing the most sophistication and flexibility are computer-based home automation systems. These systems enable you to use sophisticated logic in your automation, such as reacting appropriately based on which house members are at home and whether it's a holiday
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Add a Brain to Your Smart Home
You don't need a computer to use X10, but you'll be missing out on many great techniques if you don't have one. Take your automation to the next level by letting your computer pilot your home.
At the most fundamental level, the only thing you need for an automated home is a few X10 modules and a way to send X10 commands, such as a Palm Pad [Hack #5] or a minicontroller [Hack #4] . For some people, a simple setup that enables you to push a button on your nightstand to turn off the lights in the next room, or have the lights come on automatically when you enter a room [Hack #7] , is more than enough. And it's even fun, at least until you discover that it's pretty limited.
But that's so 20th century. You still have to push a button to control the lamp, so all you've really done is relocate the lamp switch from the room next door to your nightstand. That's not automation: that's remote control. Sure, it's a bit more sophisticated than using The Clapper (http://www.chia.com), but only because X10 doesn't make you clap your hands together to trigger it.
To move up from remote control to automation, you need to have something making decisions—something that's dedicated, tireless, and works for little pay. Something exactly like a personal computer! Computers excel at doing repetitive, boring tasks such as waiting for an X10 command to which they can respond. It will sit happily, waiting for the sun to set, and then turn on your outdoor lights the instant the sun dips below the horizon. Or, if you're not home, it will make your house look occupied [Hack #74] , convincing nearby prowlers that they should look elsewhere for an easy mark.
Of course, it's not quite as simple as just adding a computer into the mix. You'll need a few bits of hardware and some software that's ready to run your house. Let's take a look at each piece individually.

Section 1.17.1.1: Computer.

To get started, you'll need a computer that you're willing to leave switched on all the time. You can turn off the monitor, of course, but the CPU needs to be powered on so that it can keep track of what's going on in your house. You can use the computer for other server-like things, such as playing iTunes music. But you'll need to keep the home automation software running all the time, so a system that is often occupied playing CPU-hogging games, or switched off at night for some peace and quiet, isn't the best candidate.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get to Know XTension
To implement many of the hacks in this book, you'll need to know some basic techniques for programming the XTension home automation application for Mac OS X.
XTension is the granddaddy of X10-based home automation software for the Macintosh, having originated several years ago for the Classic Mac OS.
In fact, if you have an older Macintosh, even a lowly Mac Plus, XTension (http://www.shed.com/; $150) is a great way to put your doorstop-Mac back in service.
But don't let its modest origins fool you. Beneath the old-school user interface lies an automation powerhouse. Its designer and chief programmer, Michael Ferguson, helped NASA automate its space shuttle operations, and he makes sure XTension is every bit as capable for those of us who aren't rocket scientists.
For more detail and the latest skinny, be sure to consult the XTension user guide. Choose Download Manual from the XTension menu in the application to get the latest version, or visit http://www.shed.com/download.html.
XTension can handle all the home automation programming you can throw at it, but to send commands to X10 modules, it needs a power-line interface [Hack #16] . XTension currently works with the CM11A, LynX-10, and LynX-10 PLC. These are standard serial devices, so if you're using a newer Macintosh, you'll also need a USB-to-serial interface, such as the Twin USB Port Serial Adapter from Keyspan (http://www.keyspan.com). If you're using a Macintosh that has a round serial port, you'll need an adapter to convert the connection to a standard nine-pin configuration. A palmOne Mac Serial Adapter (http://www.palmone.com) will do the trick.
After you've connected the power-line interface to your Mac, you'll need to configure XTension. To do this, choose Preferences from the XTension menu, and then click Communications. Check the Enable X-10 checkbox and select the interface you're using, such as a CM11A, from the pop-up menu. See Figure 1-22 for an example.
Figure 1-22: Selecting a home automation interface
Why in the world do you have to enable X10 before you can choose an interface? Well, you can use XTension as a wire-less-only controller or simply as a way to execute scripts and automated tasks automatically—such as sending email or anything else you can do with AppleScript. If you leave both wireless and X10 turned off, you still can use XTension to kick off anything you want to happen on a regular basis.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get to Know Indigo
Using the Indigo home automation application for Mac OS X requires some basic techniques that you'll need to know in order to implement many of the hacks in this book.
Indigo, from Perceptive Automation, is the newest home automation software for the Mac, but it already has earned an enthusiastic following for its clean, Cocoa-based implementation and its support of the latest equipment. Its designer and chief programmer, Matt Bendiksen, has a hand in programming some of the best mainstream Macintosh applications, and he's applied that experience to making sure Indigo is approachable for beginners and experts alike.
For more detail and the latest skinny, be sure to consult the Indigo user guide—available from Indigo's Help menu—and the online tech support area (www.perceptiveautomation.com/indigo/support.html).
For Indigo to send commands to X10 modules it needs a power-line interface [Hack #16] . Indigo currently works with the CM11A, the LynX-10 PLC, and the PowerLinc Serial, PowerLinc USB (1132U), and PowerLinc Controller (1132CU). With the exception of the PowerLinc USB, the others are standard serial devices, so if you're using a newer Macintosh you'll need a USB-to-serial interface, such as the High-Speed USB Serial Adapter from Keyspan (http://www.keyspan.com/products/usb/USA19HS/), to make the connection to your computer. If you're using a Macintosh that has a round serial port, you'll need an adapter to convert the connection to a standard nine-pin configuration. A palmOne Mac Serial Adapter (http://www.palmone.com) will do the trick.
If you don't already have a power-line interface, you should consider getting the PowerLinc USB (http://www.smarthome.com/1132u.html). It's inexpensive, and because it has a USB port rather than a standard serial port, you won't have the added expense of buying an adapter. At the time of this writing, Indigo is the only Macintosh home automation software that works with the PowerLinc USB, and it also supports the capability of storing macros in the PowerLinc Controller (1132CU), so you can have some automation even when your computer is turned off
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Get to Know HomeSeer
You'll need to know some basic techniques to using the HomeSeer home automation software for Windows in order to implement many of the hacks in this book.
HomeSeer is a popular program for Windows XP, Windows 2000, Windows 98 Second Edition, and Windows NT. By way of a familiar user interface, HomeSeer enables you to view and command a huge variety of home automation devices and modules, offers voice control so that you can speak your commands to the system, and includes a built-in web interface so that you can access your system from anywhere there's a network connection. Thanks to its popularity and extensible design, a large number of third-party plug-ins are also available that add additional capabilities.
For more details and the latest skinny, be sure to consult HomeSeer's help system. It's available from the Help menu in the application or online at http://HomeSeer.com/products/homeseer/WebHelp/homeseer.htm.
HomeSeer adeptly can handle all the home automation tasks you can throw at it, but to send commands to X10 modules, it needs a power-line interface [Hack #16] . HomeSeer works with several controllers, including the CM11A, LynX-10, and LynX-10 PLC, which are standard serial devices. If your computer has a USB port, you can use a SmartLinc USB or another controller that works with USB.
After you've connected the power-line interface to your computer, you'll need to configure HomeSeer. Choose Options from the View menu and then click the Interfaces tab. Click the Device list and select the interface you're using, such as a CM11A, and then select the Port where you've connected the power-line interface, as shown in Figure 1-47.
Figure 1-47: Selecting a home automation interface
HomeSeer also works with wireless X10 receivers [Hack #5] . These are excellent ways to improve your wireless motion detectors and the like, but wireless X10 is not a replacement for the power-line interfaces discussed earlier. If you're just getting started, don't worry about wireless X10 yet. Just know that it will work with HomeSeer when you're ready to go there.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Sync with the Sun
One of the best things about a smart home is that you never have to bother turning on lights when it starts to get dark or turning them off if you're an early riser and the sun is making them unnecessary.
All the home automation software packages make it easy to control your lights automatically, or to perform virtually any other task, when the sun rises and sets. In fact, it's the perfect task for a computer-based home automation system; the computer can accurately calculate the sun times for your exact location and time of year, and then do your bidding with clockwork precision.
You need to make sure your computer's clock and location are set correctly so that the time calculations are reliable, but other than that it's simply a matter of configuring your home automation software and deciding what you want done. The latter bit is the hardest part: what do you want to do?
The most obvious sunset action is to turn on some lights in the home so that people on the inside can see what they're doing. You probably don't want the entire household to light up, so focus on ambient lighting. An efficient way to do this is to spend a couple of minutes every night and note which lights you and your family have turned on manually and which ones tend to stay in use until bedtime. For example, the small lamp in the family room, the light over the sink in the kitchen, and the front porch light might be good candidates for automation.
Next, identify the lights you might want to come on sometime after sunset. In addition to having lights turned on at sunset, it's simple to schedule events that occur a set number of minutes later. As the house gets darker, do additional lights provide comfort or safety? The lights over the stairway or the landscape lighting in the backyard are likely candidates.
Finally, consider more than just lighting. If you have a webcam on the bird-bath outdoors, you probably want to turn it off after nightfall. Perhaps you want to mute the sound on your home automation system so that you're not bothered by the audible notification of incoming email and faxes. If you want to use the scheduler in your home automation software to run a script that backs up your hard drive, sunset might be a good time to do that, too.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Choose the Right Controller
To some extent, the home automation controller you use defines your system. It also determines which home automation software you choose because not all programs work with every controller.
Your choice of home automation controller determines the expandability, flexibility, and reliability of your system, and it might be the single most expensive item you have to buy to automate your home. This hack helps you make the right decision for your particular needs.
A smart controller is a software-programmable X10 transmitter and receiver. The word smart in the term distinguishes these controllers from devices such as minicontrollers [Hack #4] , which can transmit commands but cannot be controlled by a computer. Let's take a systematic look at the most common smart controllers that are available and rate each of them based on these criteria.
Price
This will tell you quickly if you should consider a particular controller, depending on your budget.
Features
Does the controller offer a comparative richness of features when compared to others in its category?
Flexibility and expandability
How scalable and modular is the device?
Reliability
Are there any known bugs or issues that you should be aware of or that are not commonly documented?
Support and application base
This is a popularity measure, which indicates bang-for-buck. A better supported controller will give you more options to choose from.
This hack rates each controller with a score from 1 to 5 against each criterion, with an overall score that's an approximate, opinionated, and weighted sum of the controller's score in each area. The result should be helpful in deciding which controller to use when compared against your needs and requirements.
Now that we've laid the ground rules, let's get started.
Controllers in this category will enable you to get a feel for what home automation is like, but their limited capabilities prevent many basic techniques.

Section 1.22.1.1: The FireCracker (CM17A/CM18A).

The CM17A, also called the FireCracker (http://www.x10.com/automation/firecracker.htm
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Maintain an X10 Library
You'll save yourself some hassle, and the need to memorize esoterics, by keeping an up-to-date collection of X10 and related modules.
There's one thing you'll learn quickly about using X10: it's a world that's filled with hard-to-remember details that, if you forget them, result in hard-to-diagnose problems or bothersome procedures. For example, if you use a computer-based controller that's based on the TW523 two-way interface [Hack #21] , you won't be able to use modules that work with extended X10 commands. That's fine if you don't have any when you first set up your system, but if you later add a two-way light switch, you might spend a lot of time troubleshooting the problem before you remember why it doesn't work correctly.
More commonly, when it comes time to replace the batteries in your X10 motion detector [Hack #6] , you'll have to remember the correct sequence in which to push its buttons to restore its settings. And the options are numerous: you have to reset its address, select whether it ignores motion during daylight, and determine how soon after the last time it senses motion it sends an