man x10 (Commandes) - operate X-10 electrical power control modules
NAME
x10 - operate X-10 electrical power control modules
SYNOPSIS
x10 [-v] [-c housecode] [-n list] [-f list] [-d dimlevel,list] [file]
DESCRIPTION
An X10 Module is a device that you plug into your AC wall socket. It allows you to do two things: (1) Turn appliances in your home on and off and (2) dim and brighten lights. There are three classes of X10 devices: (1) X10 controlling device (2) X10 on/off switch (3) X10 on/off/dimmer. Within these classes there are many many many types of specific devices. Some with built in alarm clocks. A wireless alarm system has sensors for allowing you to install an alarm in your home with loud sirens that you can use to scare off burglars, etc.
You can buy all of the X10 devices from Radio Shack in the States or you can mail order them from several different mail order catalogs.
There is one device that you absolutely need. That's the X10 computer control device. Also know as the X10 home automation control interface.
The model number of the controller device is CP-290. The CP-290 has two wires hanging out of it. One is a serial connector that connects to your computer. The other is a standard wall plug.
This (X10-AMH) software messages across one of your computer's serial ports to the CP-290. From there the CP-290 sends messages across your AC wiring to turn on/off appliances plugged in to X10 appliance modules or to dim/brighten lights attached to one of the X10 dimmer modules.
Appliances are plugged into the appliance module, and the appliance module plugs into the wall outlet.
The CP-290P is available from both Radio Shack and from Altex Electronics in Dallas (US phone 1-800-531-5369). Currently they are US $45 at Altex and come with Windoze Software (model CP-290P). Make sure you don't get the Mac software (CP-290M) by mistake.
Radio Shack has usually has them, but they were more than US $60 last time I checked.
Bottom line? Get it at Altex mail order and make sure you get the CP-290P.
DISCLAIMER:
I do not have any affiliation to Altex other than they are a few blocks from where I live. You may find them cheaper/better or whatever, this is just to limit the amount of mail I get asking where the CP-290 can be found.
USING THE X10 SOFTWARE:
The first thing you need to do is find a free serial port to hook up your CP-290. Follow the instructions with your CP-290 to do that.
After you know the device name of the CPU-290 (EG: /dev/ttyS3) you can do one of two things.
Assume your CP-290 is hooked up to /dev/ttyS3:
-
(1) setenv X10_PORTNAME /dev/ttyS3
(2) su ; ln -s /dev/ttyS3 /dev/x10
If you choose option (1), you'll need to modify your ~/.login to do this each time you login. I, personally, prefer option 2.
To get help, run the application with no options, and a help screen will be printed listing sample uses of the application.
You can use x10 from the shell or from a crontab to wake yourself up in the morning with lights or your stereo, or you could turn your monitor off at the times you usually forget to do so, or your TV.
BUGS
This app doesn't do any kind of serial port locking, so if you run it twice at one, it might barf.
Please report bugs and bug fixes to aaron@paradigmsim.com.
OPTIONS
- -v
- verbose
- -t
- self-test
- -q
- query CP-290's day and time
- -s
- set CP-290's time according to CPU's day and time
- -z [a-p]
- set the rocker button housecode for the CP290
- -c [a-p]
- use alternate house code (default "a")
- -n list
- turn oN devices in list
- -f list
- turn oFf devices in list
- -e
- empty contents of CP-290's internal events
- -l
- list contents of CP-290 to stdout
- -d dimlevel,list
- dim devices in list to dimlevel. list is a comma separated list of devices, each ranging from 1 to 16. dimlevel is an integer from 0 to 15 (0 brightest.)
- file
- read programming commands from file. See below for details.
EXAMPLES
- x10 -n 1,2,3
- Turn on devices a1 a2 a3.
- x10 -c b -f 4,6
- Turn off devices b4 b6.
- x10 -d 5,2,3
- Dim lights 2 and 3 to 5th brightest setting.
Note: All commands use house code a unless you use the -c argument. The house code set by the -z command is for the buttons on the CP-290.
INPUT FILE
This application will give you full control over your X10 modules. In fact it will now even let you set up events in the CP-290's local RAM so that you can leave your computer turned off and still have the CP-290 control your home appliances. This can save you a lot of electricity if your computer sucks the juice.
Here's an example .x10 file called "sample.x10" that you can send.
event { devmap 2 daymap 1,2,3,4,5,6,7 housecode p mode today minute 39 hour 23 function dim dimlevel 5 }
event { devmap 2 daymap 1,2,3,4,5,6,7 housecode p mode today minute 0 hour 5 function off }
You'd send the above file using the command:
- % x10 sample.x10
NOTE: You need to set the clock before sending a file to the CP-290's memory. See /sbin/clock for writing the CMOS clock. clock --help for info. Once your clock is set, use "x10 -s" to set the CP-290's clock based on the system's date.
If you want to get the contents of memory and save it to a file:
% x10 -l > file.x10
SEE ALSO
AUTHOR
Program written by Aaron Hightower (aaron@paradigmsim.com), credits also to Stew Bendict (benedict@netcom.com), Bruce Perens (bruce@beagle.pixar.com), Terry Carlin (tcarlin@continental.com).
This manual page was written by Mark W. Eichin <eichin@kitten.gen.ma.us>, for the Debian GNU/Linux system, based on Bruce's old manpage, the README, and the usage messages in the code.