O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  

Buy the book!
Smart Home Hacks
By Gordon Meyer
October 2004
More Info

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!
[Discuss (0) | Link to this hack]

Although many of the hacks in this book use a computer to automate your home , 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 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.

  • 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 if you're using this technique in a larger room or in an area where you might not be moving around too much. This will ensure that the light won't be turned off when the room is still occupied.

The home automation software running on my computer will see this activity take place because it is listening to the power line and keeping track of all the X10 commands it receives, but it does not send any commands.

Involving the computer in this process would allow for a more sophisticated response , but would introduce an additional delay while it responded to the signals and made decisions about how to react.

O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.