$50 Home Automation
So who wouldn’t love to pull up to your house, get out of your car, walk in your house and all the lights and devices you love are already on? Or maybe your just want to save on your electric bill, either way with about 50 bucks you’ll be on your way to home automation paradise. This guide is not exactly intended from someone not at least kinda familiar with linux, and you should have at least used a screwdriver once or twice.
This requires:
- Linux computer (I’m using Ubuntu 7.10, also works with CentOS5)
- WS467 Modules – Their either 7 bucks a piece off eBay or 3 for 15 – Replacement wall switches
- CM11a – About 10 bucks, runs the computer interface for the x10 control, stores macros. Uses a serial port, make sure you got one still!
- Optional – Remotes -
- Very little experience with wiring.
- 1 Flat-head & 1 Phillips screwdriver
- A volt-meter is a GREAT investment, not necessary, but can eliminate questions and problems very quickly.
Let’s start with the CM11A. This little module will be the heartbeat to the whole system. You’ll want to plug in directly to the wall, try to avoid power strips and such. Plug it in to your linux box. Now we need the software to run it, I use heyu, very effective command line tool. You can download from http://heyu.tanj.com/download/heyu-2.1.2.tgz
You can use the below to setup the program.
cd ~
wget http://heyu.tanj.com/download/heyu-2.1.2.tgz
tar -zxvf heyu-2.1.2.tgz
./Configure
make
make install (make sure your root or using sudo)
It should ask you where you would like to store the config file, I tend to use /etc/heyu.
The default housecode is set to A, so assuming you use A, the only thing you may need to change is the serial port which is set to /dev/ttyS0 by default, but normally it’s good to go. Let’s install a module and see what happens.
So, your got your WS467 out of the box and you can’t wait to see this in action, let’s just make this clear early, if you shock yourself, that’s your problem. That being said, let’s find the circuit in your breaker that your going to be working on. Clearly if your breaker is labeled this should be easy, if not, leave the light on, and turn off the circuit, if the light goes out, your ready to go, otherwise keep going until you got the right one. Once you’ve found it, unscrew the two screws holding in the plate, pull the plate off and you should see two more screws, remove those as well, and pull the switch out enough to see how the wires are attached, generally it’s just wrapped around a screw and tightened. You may also have a copper wire run with other two, that would be a ground wire, the X10 module has a connection for it on the side. You’ll want to take the two wires off the original switch and twist one wire of the X10 module to each one, and I can’t stress enough it’s important to have a GOOD connection, make sure the wire nut is twisted on very tight. Make sure to set the housecode (A,B,C…) and the unit number (1-16) and write this down somewhere. Now before you push it all back in the wall you may want to turn on the circuit, test the light and test the automation. Back to the computer! Pull up a terminal and type:
heyu on A# (change # to your module number)
—-Watch light—-
heyu off A#
—-Watch light—-
Hopefully you just saw the lights go on and off. If it did not, some common problems:
- Check the serial port
- Check to make sure you have the right unit number
- The signal will degrade over distance, large houses may require boosters or repeaters to get from end to end.
So ahead and replace those other two switches to wanted to automate, carry the keychain with your keys, turn on your lights when you walk up. In time I’ll go into scheduling lights on and off at certain times, tying some of your modules to your bluetooth proximity, very cheap motion sensors, and more than just a couple light switches. Maybe even setup a special IVR on your Asterisk server to control your home while your away from home!

Amazing entry, I wait for more info on the next info about what is happening, this is precisely what i have been looking for. I think it would be nice to go a bit more step by step on what is happening, the keyfob programming and more as im not sure how it is started. very nice, i will definately try though
I will certainly go into more depth, it’s just a lengthy project to write up, will work on getting more detailed steps out the next few days.
From the manual:
If you want to change the Housecode:
•
Press and hold the first (top) ON button. The red LED blinks once. 3 seconds later, the LED
blinks the current setting: 1 blink for Housecode A, 2 blinks for B….. 16 blinks for P.
•
Release the first (top) ON button.
•
Press and release the first (top) ON button the appropriate number of times for the Housecode
you want to set. Once for A, twice for B, etc. The LED blinks for each press. IMPORTANT:
Hold the button on your last press. 3 seconds later, the red LED blinks back the new setting, e.g.
3 blinks for Housecode C.
If you do not follow this programming sequence, the LED will stay on for 1 second and your existing setting will not be changed.
If you want to change the Unit Code for the top two buttons (the second pair of buttons are always
one # higher than the top pair, i.e. if you set the top button to 6, the second button controls 7, etc.).
•
Press and hold the top OFF button. The red LED blinks once. 3 seconds later, the LED blinks
the current setting: 1 blink for Unit Code 1, 2 blinks for 2, 16 blinks for 16.
•
Release the top OFF button.
•
Press and release the top OFF button the appropriate number of times for the Unit Code you
want. IMPORTANT: Hold the button on your last press. 3 seconds later new code blinks back.
If you do not follow this programming sequence, the LED will stay on for 1 second and your existing setting will not be changed.
That’s great. But what if I don’t want an entire breaker switch to be turned on or off. I still have a tivo I leave on as well as things like the refrigerator, computers, clocks.
I think you misunderstand, this doesn’t control the whole breaker, or even have anything to do with it. I use these devices to control single lights or appliances. If say you wanted to control only one PLUG in a receptacle, you can use a x10 wall plug (SR227). All the x10 devices generally only control the one device you plug it to, I leave many things on all day such as my computer, my AC, and of course, my refrigerator, I would be very upset to open my fridge and it be spoiled
i will wait for the movie
Dan Grahn,
He mentioned the breaker only so that you’d avoid electrocuting yourself while you were working on the circuit. The WS467 module replaces a standard wall switch, so whatever your switch does now is what you’ll be able to do from your computer.
Great article.
I recently did an article on my blog about unique virtual machines, and the idea of using a virtual machine for home automation was one of the virtual machines I discussed.
With virtualization, you could load up a copy of Linux inside a window on a windows system, allowing you to run Linux without having a spare computer.
Brad
http://x86virtualization.com
Oh, I must of misread that.
Props for the post. I imagine most houses will be default with this stuff in about 10 years.
In 1985 I use a 128 tandy color computer to time and control every light in my home. I had 23 module hooked up – both wall switches and plug recept.. This is old stuff to me. I even created a complete floor plan of the house. Some of the light switches had 0 – 100% dimming for various rooms, dinning, etc… Cool stuff – I will have to check this out!