The CM17A is a dongle that sends X10 commands (ON, OFF, BRIGHT, DIM) via RF to X10 receivers. The receivers then send signals down the house wiring to control lights and appliances. The CM17A is relatively cheap (about 10USD on eBay).
This technique is a good safe way to (wirelessly) control devices connected to the house wiring.
Two digital pins and GND on the the Arduino are connected to the RTS, DTR, and GND pins on a DB9 connector which is plugged into the CM17A. (See "CONNECTION:" in the header comments of the sketch below.)
I used the common reference for the CM17A protocol from ftp://ftp.x10.com/pub/manuals/cm17a_protocol.txt .
Originally I posted the CM17A function and example here, but DaveK was nice enough to turn it into a class so it could be used as a library.
The sketch below shows how to use the "X10Firecracker" library and provides the basics you will need to control the CM17A. Change the sample commands in loop() as required.
You'll find the library with a similar example here: X10Firecracker.zip
(1/18/2011) While working with the CM17A in battery driven project, I found that the RTS and DTS lines will remain HIGH after the first transmission. For a savings of ~.5mA during idle, you can pull these lines LOW after transmission. If you do this, keep in mind that the CM17A needs some time after power-up before transmitting.
The source code here is released under the Terms of the GNU Lesser General Public License version 3.0.