I'd like to talk about X10. X10 equipment is the best-known (and probably best-selling) home automation equipment around. It may surprise you that it is also very inexpensive, and that inexpensive computer interfaces are available, and that there are (free) open-source software packages to work with that computer interface. I think that for the money, X10 is the best home automation solution out there. However, there are some definite limitations, so I'll be acting both as evangelist and critic here.
First off, let me explain what X10 can do for you. If you hear a sound in your house at night, you could press a button on a panel by your bed and have all the lights come on. The X10 security system can detect motion in your house (or the opening of a door, or the pressing of a panic button), sound an alarm, flash the lights in the house to attract attention, call you on your cell phone or pager, then try contacting your neighbor in case you're away on vacation; once it reaches someone, they can listen in on what's going on in your house! With a computer interface, the possibilities are almost limitless. You could turn on your MP3 player with your remote, and start listening to music. At 0700 you could have it start your coffee, then at 0720 have your computer play an audio file of "reveille", turn on the lights in your bedroom, and at 0745 open your garage door. One person I know has a "panic button" near his door that signals his computer to wipe his hard drive, just in case the feds find him and serve him with a warrant. One organization I heard about wanted to have an IDS turn off their computers at the first sign of attack; you could use X10 to do it. And then there's the simple pleasure of turning off all the lights in your house from the comfort of your couch, just before lying down for a nap.
Simply put, X10 allows your computer to do "real" stuff, to interact with your environment, to extend your control from bits and bytes to anything electrically powered.
How inexpensive is it? By the prices on their web site today, you could set up a house for remote control of two lamps and five overhead lights for $92. You can get the starter home security package with remote, console, one motion detector, two door/window sensors for $100 as well. The computer interface is going for $20 on Ebay.
It is difficult to know where to begin when discussing X10. X10 is first and foremost a company. This company produces low-cost home automation equipment, including a computer interface. This makes them interesting to the gadget-hungry technophile; the computer interface provides literally links the flexibility of a general-purpose computer, while the low cost means you can afford to play with it, and modify (hack) a piece of equipment without worrying about the cost. X10 has been so successful that there are several companies producing compatible pieces of equipment. These pieces of equipment communicate with one another using either a wired protocol over your house wiring or a wireless protocol through the ether.
There is so much information on X10 on the web, and there are so many pieces of X10-compatible equipment out there that it is very difficult to generalize about it or reduce it to the point that you don't get information overload.
A note about the X10 web site: X10 has one of the most confusing and distracting web sites and you will find it very difficult to navigate. You might also want to check out SmartHome.
A note about X10's "deals": X10 is continually having some kind of "deal". Frequently, they have a dynamically generated page which makes it appear that the deal ends at midnight; do not be fooled. However, their package deals usually have a significant discount, so if you're looking to buy, pay attention to the loudly-promoted package deals to see if you can get what you want for less. Also, don't forget about E-bay; since X10 sells so much in "bundles", there's an active used component market.
A note about X10's use of email addresses:X10 will spam you senseless. If you don't have a good way of filtering your email, use a fake address, perhaps email@example.com so the email doesn't actually leave their system.
Basically, what you should take away from that is that there are 16 "house codes" and 16 "unit codes", and that means 256 different "addresses". It is very common to use letters for the house code and numbers for the unit codes, together to form an address like "A5" or "K10". You may send a variety of commands, the most important of which are "on" and "off", and some special codes like "bright" and "dim", "all lights on" and "all units off" (note: that is not "all units on" nor "all lights off").
There is no way to know if the message was received properly. This is because communication is unidirectional, from the X10 transmitter to an X10 receiver.
It can take a second or two for a command to be sent. This is because it can send only one bit per zero-crossing of a 60Hz signal, that's just 120 bps, and even that bandwidth is reduced significantly by dramatic duplication of data for reliability.
You shouldn't have two transmitters sending at once, because there is no collision detection.
The signal is small; 5V on a 110V sine wave, so range is limited. In particular, most houses have two "hot" (black) 110V wires and one neutral (gray). The two hot wires are out of phase, and this gives the ability to have 220V circuits like for your washer and dryer. However, an X10 signal must travel from one 110V circuit back to the power distribution panel and "jump" to the other circuit, and travel back into the house; depending on where you place the X10 transmitter, this may be too far. Also, for houses with a large number of TVs and computers, you may find that their power supplies absorb the signal, and so you may need an expensive ($150-200) amplifying coupler between the two 110V phases of your wiring.
There are essentially two types of X10 receivers; lamp modules and appliance modules.
Note that even though you can send dim/brighten commands to any house code and unit code, only lamp modules dim/brighten. They do this by clamping the 60Hz sine wave, which means they can be used safely only with incandescent lamps. Lamp modules are tricky, in that they can detect when you've used the local control (switch) on the lamp to turn it on or off, and so you don't need to use X10. Let me rephrase that for clarity; when you turn the lamp off, then on again, the lamp module "knows" that you're fiddling with the switch, and it acts like a normal lamp again. However, you need to leave the switch "on" in order to regain X10 control over it (obviously). I'm not sure exactly how this works, but it does. Note that this is not the same thing as saying you can use either X10 or the switch at will.
Of course, there are "appliance modules" which can turn on and off flourescent lamps, motors, fans, and even computers. Basically appliance modules are X10-controlled relays that turn the power on or off. They make a loud click which may annoy you (it doesn't bother me).
Any X10 equipment with an antenna acts as bridge from RF to wire protocol (but usually only for its assigned house code). These are called "transceivers" because they both transmit (on the house wiring) and receive (from wireless remotes).
Most units with an antenna (e.g. TM751) can only have one unit code, others (e.g. RR501) only two unit codes; these arbitrary restrictions on ID assignment remind me of trying to make sure you don't have IRQ conflicts on ISA hardware. For some reason, every module I've seen with an antennae is either a security console or a appliance module (no lamp modules).
You may be familiar with X10 because of the $5 firecracker set, which contained a remote, lamp module and a wireless serial transmitter. The $5 firecracker combo was a "loss-leader".
The firecracker is basically a wireless transmitter, but not a wireless receiver, so it is not a substitute for the CM11A computer interface. It is output-only.
Security components use a novel method for communicating because X10 did not want others to be able to turn off your alarm system using standard equipment. For this reason, the security components generate unique IDs and "register" them with the security console (only when it is in "install" mode). I am not sure how secure this really is.
Most pieces of security equipment do not generate wire protocol commands. The alarm console generates X10 commands, but it only does this when the alarm goes off (it flashes all the lights).
The X10 security system can be set off by either door/window sensors (when it's in "home" mode) or door/window sensors and motion detectors (when it's in "away" mode). This is so that you can turn on the alarm while you're asleep, and not have to worry about setting it off if you get up to use the bathroom. When it detects an intruder, it sounds an alarm, starts sending "all lights on" followed by "all units off" (to attract attention, and scare intruders away), and starts to call the pre-programmed numbers (it can hold four). Once it reaches someone, they can press a key, which will turn off the siren and allow them to listen to the microphone on the alarm console.
Note that there are two motion detectors; one generates X10 wireless commands, the other X10 wireless security alarms. Note also that the motion detectors will probably not function properly outside if the ambient temperature gets above body temperature.
They could really have made the security console a little better; for one thing, there's no ability to delay dialing, so that it could send numeric messages to pagers. Also, the recorded message starts when it starts dialing, not when the callees pick up the phone. It would be nice if they had added a way to disable the alarm by punching in DTMF codes, or if you could talk to an intruder (rather than just being able to listen in).
The wireless security panic button is an exception to the rule, in that a light touch will be converted into an X10 wireline command to turn on a certain address. If you hold it down, however, it will set off the alarm (and the chain of events that normally follows the alarm). It appears that there are not many ID codes for panic buttons, because I have had problems with certain mixes of panic buttons; this manifests itself as panic buttons that do not "register" with the security console when it is in install mode.
The "wireless" X10 cameras require a wire for power, but virtually none of the pictures on the web site show it. I don't have any cameras so I can't tell you any more.
One trick you could do is rig up several wireline modules (appliance or lamp) in series so that it took a certain combination of commands to turn on a device. Of course the "wall-warts" aren't made for this so in reality you'd need some short extension cords or a soldering gun.
Another trick you could do is use an appliance module to connect power to a fan, and have the fan wind up a rope or string to make linear motion.
For the security wireless door/window sensors, they are normally closed (NC) contacts, so you could wire up a variety of things:
Neil Cherry has a plan for a modified TW523 that allows you to "sniff" X10 data from the power line using some hacks to the two-way X10 interface module.
Here's a whole ton of modifications: http://www.geocities.com/ido_bartana/toc.htm#Module modifications
Note that the computer interface in particular only sees house wiring signals. It cannot "see" RF commands (except those bridged to the house wiring by an appropriate module with an antenna). The computer interface package currently comes with the computer interface, a keychain remote, a wireless transceiver, a 6-in-1 learning remote, software and a lamp module for about $50!
All software below assumes that you have the CM11A computer interface.
The author explains the silly name:
My kids are grown and on their own, and I kind of missed being able to shout out "Hey You! Turn the lights off!"Basically this program allows your computer to:
Here's what the author says about heyu:
With heyu, you can:
There are two demo programs included with heyu, monit and x10biff:
- Get the date and time from the interface
- Get information about current settings and module states
- Turn an X10 module on or off
- Dim or brighten an X10 module
- Monitor all data sent to or from the CM11A
- Get the status of intelligent X10 modules (rr501 for instance)
- Set the X10 clock from the computer's clock (time and date)
- Zero out the macro and event memory of the X10
- The monit program will turn off the power to your monitor based on idle time. It's the ultimate screen saver.
- The x10biff program will flash a lamp to let you know that you have E-mail.
You might wonder about the CM11A. It is a small microcontroller (?) that connects to your computer via an RS-232 serial cable (they actually use phone wire and modular connectors). It can store up to 128 "events". Events are timers, triggers, and macros. Timers and triggers invoke macros, and macros can send a series of X10 commands. A macro can turn on, off, dim, or brighten up to 16 units. The CM11A has a battery-backed clock to support timers.
The xtend program is named to evoke thoughts about inetd; it works similarly. Instead of waiting for network connections then invoking programs, it waits for X10 commands and invokes programs in response to them.
- Using a X10 motion detector (it switches a particular address "on" when it detects motion) you could have your computer say hello when you enter the room.
- Or how about putting the X10 motion sensor near your front door and having the system mail you whenever it is tripped.
- You can do complex conditionals like "If it is after 10pm, and light B2 is off, then brighten A7 by 20%, wait 5 minutes and then turn it off."
- There is a dry-contact adapter available, so perhaps you could wire that to a water sensor.
- Using Xtend with heyu, you can create lighting "scenes":
- How about something complicated and silly? When you enter the room, the computer should say hello, dim the doorway light to nothing, brighten the room light to 50%, turn the radio on, wait a few seconds and then start a PPP connection so you can read your mail!
I've saved the best for last. I haven't actually tried MisterHouse yet, but I will soon. For now I'll just quote their web page:
MisterHouse is an open source home automation program. It's fun, it's free, and it's entirely geeky. Written in Perl, it fires events based on time, web, socket, voice, and serial data. It currently runs on Windows 95/98/NT/2k/XP and on most Unix based platforms, including Linux and Mac OSX.
Perl subroutines and objects are used to give a powerful programming interface. Here is some example code:$fountain = new X10_Item 'B1'; set $fountain ON if time_now '6:00 PM'; $movement_sensor = new Serial_Item 'XA2', 'stair'; play(file => 'stairs_creek*.wav') if state_now $movement_sensor eq 'stair'; $v_bedroom_curtain = new Voice_Cmd '[open,close] the bedroom curtains'; curtain('bedroom', $state) if $state = said $v_bedroom_curtain;
And, it talks!
- Executes actions based on voice input, time of day, file data, serial port data, and socket data. Serial and speech data can also be read or written to proxies on remote boxes.
- It has a web interface to allow control and feedback from any browser, either on a local intranet or on the internet. Check the Winter's house at http://misterhouse.net:8080
- On Windows systems, it uses OLE calls to the free MS VR and TTS engines for voice recognition and text->speech. The high quality AT&T NaturalVoices TTS engine may also be used. If using IE, you can enable remote VR and TTS using an MS Agent.
- On Unix systems, it uses the free Festival, flite, IBM ViaVoice and non-free AT&T NaturalVoices TTS speech engines for text->speech and on Linux IBM's ViaVoice engine for voice recognition. These engines can also be called from Windows version of mh.
- Reads/writes any data from any serial attached device.
- Speaks the speed, course, and position of vehicles, by interfacing to a ham radio modem (TNC). Brian Klier wrote has a nice article about it. You can see our car position logs here
- Sends/receives X10 data from the X10 CM11 (ActiveHome) interface
- Sends wireless X10 data using the X10 CM17 (Firecracker) interface
- Send/receive data to the Ibutton family of devices, including the weather station.
- Reads/writes data from the JDS interfaces (Stargate, Time Commandar, HomeBase) interface
- Reads/writes data from the HomeVision interfaces
- Reads/writes serial port data from the Weeder Technologies PIC kits that can process X10, digital, analog, callerID, and outgoing phone data.
- Reads/writes to Applied Digital's CPU-XA and Ocelot interfaces via the cpuxad socket deamon.
- Reads data from IRman infrared receiver serial interface and writes to X10 IR Commander wireless interface.
- Code has been written for DSC Alarm pannels, Stargate LCD displays, Slinke IR send/receive, Marrick X10, RCI X10 sprinklers, Xantech preamps, ISDN modems, voice modems, ComPool and Aqualink pool equipment.
- Reads and writes from the lcdproc server which interfaces to inexpensive LCD modules and keypads.
- Shares a modem for caller ID and paging.
- Reads/writes internet mail, http, and ftp files unattended.
- Sends/receive instant messages using AIM, MSN, or Jabber
- Reads MS Outlook, Unix ical, or the built in Organizer calendar for event reminders and VCR programing.
- Uses free internet TV web pages to allow for VCR programing and show reminders.
- Has an entertaining 'chatbox' web page that will listen to all your problems.
- Can monitor NetGear RT311 / RT314 or LinkSys syslog router traffic, so you can track stuff like incoming web hits and online game time.
- Uses Voice XML to interface to tellme.com. To try it, dial 1-800-555-Tell, then after you ear 'tellme more', enter 1-46630 (1-HOME0). With a XML browser (e.g. IE), you can see a test vxml menu here
- Use simple menu templates to generate menus for LCD, VXML, or WAP phones. If you have a WAP phone or WAP browser, you can see this test menu with this url: href=http://misterhouse.net:8080/sub?menu_wml. You can also walk the menus with an html browser here. These menus can also be controled with a single switch (e.g. air sip switch for the disabled), using audible feedback to select items/states.
- Logs weather data to the wunderground personal weather project. Here's weather logs from my house
- Here is a list of some users written code files along with standard code files that demonstrate some other MisterHouse features.