Xtend: The X10 to UNIX controller

Version 1.1

by David Shaw

There are a bunch of ways to control X10 gadgets via a UNIX box, but there isn't a way to turn it about and have X10 commands control the UNIX box. Now there is!

This is an easy way of interfacing your computer to the outside world. Forget needing special hardware - all of this stuff is available off the shelf at your friendly neighborhood Radio Shack.

Xtend is compatible with heyu, to allow both sending and receiving X10 commands!

Xtend requires a CM11a serial interface. You can buy them in various places on the net (Smarthome, for example) or from Radio Shack (part # 61-2417). The best prices by far are from X10 themselves. If you get on their mailing list, they'll mail you with special deals every now and then. These people just love to give away free stuff.

NEW for version 1.1: Xtend now keeps track of the state of all X10 devices. This allows you to have conditional execution of commands (e.g. "do this only if lights A1 and P7 are on"). This data is also made available to all programs run by Xtend and to any interested process running on the computer.

Information made available to programs:

Sample Uses

Since Xtend works with the standard X10 protocol, there are countless gizmos available that it can receive information from. For example, I have a TV remote that can send X10 commands as well (from One For All) so I can cause my computer to dial in and check mail for me by pushing a button on the remote.
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:

cat hellomaster.au > /dev/audio

Or how about putting the X10 motion sensor near your front door and having the system mail you whenever it is tripped:

echo "it's `date` and someone tripped the motion sensor!" | mail root

Using the new features in version 1.1, 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."

[ `date +%H` -ge 20 ] && [ $(($X10_B2)) -lt 128 ] && heyu turn a7 bright 5; sleep 300 ; heyu turn a7 off

There is a dry-contact adapter available, so perhaps you could wire that to a water sensor.

echo "it's `date` and the basement is flooding!" | mail root

Using Xtend with heyu, you can create lighting "scenes":

heyu turn a1 on; sleep 10; heyu turn a1 off; heyu turn a2 on; sleep 300; heyu turn a3 off

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!

cat hello.au > /dev/audio ; heyu turn doorway dim 22; heyu turn room bright 11; heyu turn radio on; sleep 15; ifup ppp0
Use your imagination - there are a lot of fun possibilities.



To get a copy: Xtend is Copyright © 1998 by David Shaw, and is being released under the Free Software Foundation's GNU public license.

Prev 5 | Prev | List | Next | Next 5


Return to Software
Return to Jabberwocky