=^.^=

Everything I Wanted to Tell You About X10 Home Automation

karma

...But Didn't Have the Time to Say

I had been meaning to chronicle my tinkering with Home Automation in the same way I have been documenting my ongoing experience with Electronic Cigarettes. Unfortunately, I never found the time to post as I made my installations and I will be moving soon, leaving most of them behind. I want to make sure the 100th post on foxpa.ws has substance so without further carry-on may I present unto you my complete experience with X10:

What Are X10 and Home Automation?

Home Automation is the art of modifying and integrating household systems (lighting, HVAC, etc.) to respond to events automatically (timers, security sensors, etc.) or methods of control not already provided (computer, remote control, etc.).

X10 is a power-line and wireless communications standard for home automation. Developed in 1975, X10 is widely deployed and devices that use it are relatively inexpensive.

How Does X10 Work?

X10 devices communicate digital information over your house's power lines at the zero-crossing point of the (60 Hz) AC current by either sending a 1ms long 120 kHz pulse to represent a 1 bit or not sending anything to indicate a 0. Each device is configured with a 4-bit "house" code (A-P) and a 5-bit "key" code (1-16, always ends in 0). Additionally, there are 16 global commands which are also 5-bits and always end in 1. The house code is intended to prevent conflicts with neighbouring houses or units but is more commonly used to group different sets of devices together in larger installations.

House Code Device Code Binary Value Function Binary Value
A 1 0110 All Units Off 0000
B 2 1110 All Lights On 0001
C 3 0010 On 0010
D 4 1010 Off 0011
E 5 0001 Dim 0100
F 6 1001 Bright 0101
G 7 0101 All Lights Off 0110
H 8 1101 Extended Code 0111
I 9 0111 Hail Request 1000
J 10 1111 Hail Acknowledge 1001
K 11 0011 Pre-set Dim (1) 1010
L 12 1011 Pre-set Dim (2) 1011
M 13 0000 Extended Data Transfer 1100
N 14 1000 Status On 1101
O 15 0100 Status Off 1110
P 16 1100 Status Request 1111

To grab the attention of the devices all commands are preceded with a start code, 1110. Since the idle data-stream consists of an absence of 120kHz pulses or 0s, devices can be sure if they see three 1s in a row that a command is being sent and they are not simply picking up noise. To improve reliability all commands are sent twice, with a three cycle delay in between. An X10 frame might look like this:

1110  0110  01100 000   1110  0110  01100
start house  key  pause start house  key

X10 also has a radio frequency specification that lets remote controls and computer attachments send X10 commands via a radio receiver plugged into the house wiring.

My Installaton

My installation started small and increased in stages as I became more aware of the capabilities of X10. My first order was for:

  • TM751 Mini Transciever - This is the device that takes wireless X10 signals and repeats them on the wire.
  • HR12A PalmPad Remote Control - These are large RF "clickers"
  • KR22A Credit Card Controller - A less bulky RF controller that only covers 4 units
  • AM466 3 Pin Grounded Appliance Module - A grounded module is slightly more expensive than a 2-prong "lamp" module
  • WS12A 3-Way Dimmers - I didn't use their 3-way capability. Annoying one-pole switch requires double tap to adjust light in opposite direction

As you can see, some modules are designed to be wired into the electrical box and others are designed to plug into pre-existing sockets. There are some light modules that even screw into the Edison-type connector typical North American light bulbs use for easy installation in fixtures and lamps. Maliciously, these dimmers have cover plates which are shaped to provide the appearance of rocker switches. In truth, they are one-poll switches. A single tap to turn the light on or off, hold to dim or brighten the light or - this is my favourite part - hold to see if the current "direction" is dim or brighten, release, very quickly press and hold to go in the opposite direction.

It should be noted that most dimmers - including the ones I purchased - do NOT work with fluorescent lighting. I use the 20A rated on/off wall-switches which are usually advertised for appliances where there are fluorescent lights or fans. The drawback to this is every few moments the CFL may flicker very dimly while the switch is "off" due to the switch itself drawing a small amount of current. The other caveat in using the 20A switches is that they must be wired into both hot and neutral; this presents a problem in electrical boxes where both are not accessible. It is perfectly safe to use a 20A rated switch in a 15A circuit; overload protection is provided by the breaker which only means the switch has leftover potential capacity on a 15A circuit.

Here's a shot of the dimmer and 20A switch I installed in my ensuite. The dimmer is rated for 500watts so it runs my 4x100Watt vanity strip perfectly. I'm sure the ladies can appreciate the kind of light range that can give you in a bathroom. The fan, being an induction-driven appliance, does not like TRIAC-based dimmers so it goes on on a simple 20A switch (WS13A).

It wasn't long before I noticed there were intermittent problems getting the signals across to certain parts of the house from the RF receiver. Many household devices, particularly: televisions, PCs and uninterruptible power supplies will absorb X10 signals passing through them. The most effective solution is to put them on a filter. X10 filters block the frequency X10 devices use from entering the connected device(s) at the wall. Unfortunately, while the modules in the first two pictures averaged $10 each filters are much more expensive.

An XPPF 5 amp plug-in filter (far below) runs upward of $15 and an AF120 15 amp filter (above) runs upward of $35. Given I use two 1400VA UPSes for my workstation and networking I was forced to get the full 15A filters. These come with a screw hole in a tab at the top aligned so that the screw of a standard receptacle faceplate can be used to secure the filter into the wall. Given its size and weight, I highly recommend doing this. Smaller, singular appliances should be fine with the 5A rated units but check your documentation. I have seen folks out there wire what is intended to be an inline (in the wall) 20A filter into a power strip and use this instead. It is cheaper than the 15A plug-in filters; it is also ballsier.

It didn't take long for me to get interested in the security applications of X10. To start off I purchased a security console (PS561) and two cheap magnetic sensors (DS10A). The security consoles seem to operate using a proprietary (non-X10 specification) wireless protocol. Sensors and remotes are configured using two-button authentication; first the console is put into a programming mode then the test button or equivalent is pressed on the device to be registered. This particular unit will dial up to 4 numbers until one of the dialled people presses 0 to confirm they are listening to the call. At that point one can listen in on what's happening in the vicinity of the console. This is severely hindered by the fact that there are two piezoelectric sirens mounted in the same chassis going off at the same time (and optionally additional alarms).

Like an idiot I didn't realize the console would not come with at least one controller. This set back installation by T+shipping.

The peizo sirens in the security console don't penetrate much farther than the room it's in if the door is closed. Apparently the solution to this is throwing more sirens at it. I purchased the X10 PowerHorn (SH10A) which can be installed anywhere in the house by plugging it into the mains. The security console is configured to send alternating on and off commands to a certain house and device code. The original purpose of this was to flash lights on and off to make your house more visible to law enforcement. The PowerHorn takes advantage of this by sitting on the same house and device code as your lights and waiting for a pattern of on and off codes to activate. This sort of brute-force approach has two major limitations: the PowerHorn will lag behind your security console when the alarm is tripped and if you turn the lights with the same code on and off too many times too quickly by hand you can easily produce a false positive. This happened to me twice at poorly chosen hours before I decided to live without the horn. It deactivates shortly after the alternating pattern ceases.

I find the door sensor I installed falls out of sync once every two months or so; this is inconvenient enough to make it not worth using. Often I just don't have the time to re-program the unit when I'm on my way out the door.

  • XPPA Plug-In Filter Module - A grounded, 5 amp plug-in X10 signal filter.
  • SS13A 3 Unit + Dim RF Style Switch - A wireless X10 switch that can be mounted anywhere
  • SC546A Remote Chime - A doorbell-type module which responds to the ON command

To use the SS13A modules as doorbells I had to open them and slice out the rubber tab that produces the rocker-switch effect that makes one side of the button "on" and the other "off." I then taped over the "off" contacts on the circuit board so no matter what side the button is physically pressed only the "on" command is sent.

The 15A filters helped my signal problems a lot but there was still the odd blip in service so I went ahead and bought two 5A filters to dick around with. The chimes take a simple on command and - contrary to some advertising - have only one, non-selectable "melody." The wireless switches can be programmed to take any 3 consecutive key IDs and any of the 16 house codes. The bottom button is a toggle pad for bright and dim commands. The cool thing about them is they stick on to the wall using an adhesive backing and are thin enough to provide the illusion that they are the faceplate of a recessed electrical box without having to smash into the wall. They take a CR-32 battery in the bottom tray and communicate using the RF->mains receiver.

My final purchase was the MT13A Mini Timer. I had for some reason been under the impression that the PalmPad remote would be able to act as a timer, which was one of the main reasons I became interested in X10: it would be possible to automatically turn off the lights when I pass out with them on. I didn't have the time to do anything really sophisticated with computer automation and I needed a new alarm clock so I ponied up, plugged it in and never touched it again. I'm sure it's great, I just wouldn't know.

Controlling X10 Devices with your Computer

Obviously the really sweet part about Home Automation is interfacing your house with your computer. For about $5 you can pick up a wireless transmitter called a FireCracker (CM17A) that works with standard X10 wireless receivers and takes instructions from a standard serial port. I have found that there is an issue with the internal timing on one of my USB-serial cables' particular chips. The transmitter uses pins not normally used by serial devices to transmit data so it can be transparently daisy-chained with another serial device behind it. I have read that some USB-serial adapters drop one or more of these pins. If your USB-serial adapter does not seem to work with the transmitter be sure to do your research before selecting another one.

Other versions exist for USB which plug directly into the wall. I can only guess as to whether or not these use an embedded USB->serial adapter (linux compatible) or if they are intended for use with Windows based home automation software.

There are a couple of packages that can drive the FireCracker but I have only used bottlerocket

To compile on Gentoo run:

# emerge bottlerocket

Bottlerocket takes these options:

Usage: br [<options>][<housecode>(<list>) <native command> ...]

  Options:
  -v, --verbose                 add v's to increase verbosity
  -x, --port=PORT               set port to use
  -c, --house=[A-P]             use alternate house code (default "A")
  -n, --on=LIST                 turn on devices in LIST
  -f, --off=LIST                turn off devices in LIST
  -N, --ON                      turn on all devices in housecode
  -F, --OFF                     turn off all devices in housecode
  -d, --dim=LEVEL[,LIST]        dim devices in housecode to  relative LEVEL
  -B, --lamps_on                turn all lamps in housecode on
  -D, --lamps_off               turn all lamps in housecode off
  -r, --repeat=NUM              repeat commands NUM times (0 = ~ forever)
  -h, --help                    this help

          is a comma separated list of devices (no spaces),
                each ranging from 1 to 16
      is an integer from -12 to 12 (0 means no change)
     is a letter between A and P
    is one of ON, OFF, DIM, BRIGHT, ALL_ON, ALL_OFF,
                LAMPS_ON or LAMPS_OFF

For native commands,  should only be specified for ON or OFF.

In order to control the lights with a meta key on my mouse I had to wrap this in a little script so the KDE shortcut manager could reference it correctly:

mdma bin # cat x10on
#!/bin/bash
br -x /dev/firecracker k2 on

Where /dev/firecracker is, in my case, a symlink to /dev/ttyUSB0.

I've noticed that the device has little or no buffer; sending too many commands too quickly will cause the device to cease functioning, possibly temporarily. Unplugging and re-seating it seems to solve the problem every time. The lack of built in buffer or command queue (indeed, even the ability to ignore commands while one is being transmitted) is something which should probably be addressed in controller software or front-ends.

Neat Stuff I Wanted to Play With But Never Got the Chance

The coolest part about X10 if you're a real geek is its ability to remotely turn on or off anything that has an on or off switch through your house's existing wiring.

The so-called universal modules allow you to wire directly into an existing switch. They can be configured for normally open or normally closed operation. This means that you can control virtually any device which does not natively support X10 or remote control like, say, your old garage door opener. Or a hydroponics pump.

Coupled with computerized control it would not be hard to make a web interface that controls your coffee maker, or other sinister devices.

Conclusions

Since most houses have their three-phase input split into two two-phase segments signals from one side of the house may need to travel all the way down to the transformer at the end of the road then back into the house, by this time severely degraded. To remedy this a repeater can be installed across the phases at the breaker panel (about $30) but this is "serious business" and should only be performed by a real electrician. The safer alternative is a $100 (depending on three or four prong configuration) repeater that plugs into the dryer or stove outlet.

I look forward to trying one of the newer home automation protocols in the future. X10 is slow to the point of agony. To dim a 100W light bulb from maximum to minimum takes about a minute of repeat pressing on the buttons. The controllers either do not auto-repeat when the buttons are held down or they repeat so quickly the messages become garbled on the wire. In support of this theory, I have found that clicking the dim button then waiting for the reaction before clicking it again is far faster than mindless rapid clicking. This, combined with the poor quality of the entry level security modules and lacklustre signal performance make X10 a labour of love in my most humble of opinions.

 

Comments

There are no comments for this item.