X-10

From Noah.org
Revision as of 17:01, 11 December 2009 by Root (talk | contribs) (→‎Bottlerocket)
Jump to navigationJump to search

This has nothing to do with X11 (X window system). This is for remote control of hardware.

X-10 or X10 Powerhouse is a cheap and simple home appliance remote control and automation system. I didn't say it was good, but it is cheap and simple. There's a fairly good chance that your signal will get lost when you send a message to turn ON or OFF a device.

Bottlerocket

Bottlerocket is a command-line tool for sending commands to a Firecracker device. The ones I have seen were all RS-232 serial with a DE-9 connector on each end. They might have graduated to USB by this time. If they did, then I would bet that they simply implemented a USB-to-RS-232 interface, so the following instructions will probably still work. These days chances are that you do not have a RS-232 serial port. All you need to do is attach a USB-to-RS-232 adapter. Plug it in -- no drivers usually needed -- and you should now have a serial port. Under Ubuntu Linux the first USB dynamic serial port will show up as /dev/ttyUSB0.

The X-10 Firecracker Transceiver module also has a built-in lamp switch. You can set the House Code, but for some reason you cannot set the Device Number. The Transceiver lamp switch has a factory default device number set to #1.

The Bottlerocket command is br. Examples are the best way to describe how to use it.

Turn all lights on in house A
br --port=/dev/ttyUSB0 --house=A --ON
Turn all lights off in house A
br --port=/dev/ttyUSB0 --house=A --OFF
Turn just light #1 on in house A
br --port=/dev/ttyUSB0 --house=A --on=1
Turn just light #1 off in house A
br --port=/dev/ttyUSB0 --house=A --off=1

The Ubuntu bottlerocket package will create a device link in /dev/firecracker, but it just assumes an old-fashioned ttyS0 port. If you don't want to specify the port on the command-line every time then you have the option to update this link. If your USB serial port is not /dev/ttyUSB0 then change the following to the appropriate device:

sudo ln -sf /dev/ttyUSB0 /dev/firecracker

If you do that then you may run br commands without specifying the port. Additionally, if you are using house code A then you don't need to specify that either since br defaults to A if you don't specify. The following turns all lights on:

br --ON