.TH HEYU 1 local .SH NAME .B heyu\^ - control program for the X10 CM11A serial interface .SH SYNOPSIS .B heyu [-v] address \fIunit-specifier\fP .br .B heyu [-v] date .br .B heyu [-v] erase .br .B heyu [-v] function \fIunit-specifier\fP \fIstate\fP .br .B heyu [-v] info .br .B heyu help .br .B heyu [-v] monitor .br .B heyu [-v] preset \fIunit-specifier\fP \fIpreset-dim\fP .br .B heyu [-v] reset [\fIhousecode\fP] .br .B heyu [-v] setclock .br .B heyu [-v] status [\fIunit-specifier\fP] .br .B heyu [-v] stop .br .B heyu [-v] turn \fIunit-specifier\fP \fIstate\fP [\fIamount\fP] .br .B heyu [-v] upload [\fIcheck\fP] .br .B heyu [-v] version .SH DESCRIPTION .I heyu is a little program for controlling a X10 "CM11A" home control device. This is the control device found in the "Activehome" package from X10. The CM11A can remotely control lights and appliances in your house by signaling over the house wiring. It can respond to some X10 signals by sending out other X10 signals. .PP The -v option puts the program into a very verbose mode, mainly used for debugging. .PP Heyu depends on a config file to tell it where your CM11A is connected and what aliases you are using. It will not run without the config file. See x10config(5) for more information. .PP The X10 CM11A connects to a computer with an RS232 interface. It can store about 128 events; each event can turn on, turn off, or dim up to sixteen X10 modules . The CM11A box has a battery backed clock which the computer can read. The data is also battery backed. .PP X10 modules are identified by a one-letter housecode ranging from A to P (for 16 different codes) and a number from 1 to 16, for a total of 256 possible unit codes. .PP You could just put a bunch of "x10 turn" commands in your crontab, but this doesn't work if your system is down for backups, or has crashed, or if someone's tripped over the RS232 cable and unplugged it, and it clutters up your crontab something awful. For most uses, it's much easier to just load the events into the X10. .PP As of version 1.28, heyu will load events into the CM11A. I have established that there is no command that will dump the contents of the CM11A to the serial port. This makes it impossible to alter discrete events or macros unless the entire table is known. This means that we can't set the macros using another program (Activehome, for instance) and then add a new macro from heyu. .PP The timers and macros are stored in a file. The default is $HOME/.x10sched.conf. See x10sched(5) for the layout of the file. .PP As of version 1.6, a relay daemon is spawned that gathers the CM11A output for any process that wants it. This allows you to run monitor while sending on/off commands. Just as important is that it also catches the power fail messages and responds to it immediately. .PP As of version 1.34, you can use more than one CM11. Use different x10config files for each one and set the X10CONFIG environmental variable to access the second one. Version 1.34 also added the ability to send just an address or just a function. Version 1.35 added the ability to execute an external program (\fIheyuhelper\fP)each time an event was received or triggered. See the heyuhelper man page for more information about that. .SH COMMANDS .IP \fBaddress\fP Sends the specified address without a functon. This may be useful to people who have scene setting switches. .PP .IP \fBdate\fP Gets current date and time from CM11 and displays it in a form suitable for feeding to \fIdate(1)\fP as input. Thus, you can set your system clock by saying "date `heyu date`". It gets the year from your local computer time. I'd not recommend using this feature. .PP .IP \fBerase\fP Erases the CM11A's eeprom. All events, macro, etc are permanently gone. .PP .IP \fBfunction\fP Sends just an on/off functon for the specified housecode. A dummy unit code is required to simplify the coding. For example, use "n1" for housecode n. .PP .IP \fBinfo\fP Displays current setting of CM11A's clock and housecode. .PP .IP \fBhelp\fP Displays a list of the commands that are available. .PP .IP \fBupload\fP The upload command reads timers and macros from the .x10sched.conf file. If there are no errors, it will load the data into the CM11A for you. If there are errors the load will abort without changing anything. Heyu will report the macro names and memory locations as it loads. These memory locations can be used when the monitor command output shows something like: "macro executed at eeprom address 996". The upload command with the check option (heyu upload check) will check the config file and report out the macro locations. It will also print a map of what it will write to the eeprom if the environmental variable "X10DEBUG" is set, as in "X10DEBUG=1 heyu upload check". .PP .IP \fBmonitor\fP Monitors all events reported by the CM11A module. The output goes to stdout, so you may redirect it to a file. The events are time-stamped. .PP .IP \fBpreset\fP Preset dim works with 2way lamp modules like the PLM24. It allows you to specify exactly what level the light will come on to if you send a dim command. .PP .IP \fBreset\fP The default action for \fIreset\fR is to reset the counters in the the CM11A and to set it to the default housecode. If a housecode is specified as an argument, the CM11A will be set to track state changes on that house code. .PP .IP \fBstatus\fP Queries the module specified and reports on it's current state. This only works with certain modules, like the LM14a and RR501. .PP .IP \fBstop\fP Kills the relay daemon that gathers input from the tty port. This will also cause any monitors to stop. It can only kill the processes that you have permissions to stop. .PP .IP \fBsetclock\fP Reads the system clock and loads it into the CM11A. This is adjusted for local daylight savings time. .PP .IP \fBturn\fP Sets the specified unit to the specified state. It turns them on, off, dims or brightens them. The special names lightson, lightsoff, allon and alloff also work. .PP .IP \fBversion\fP Prints the version number and then exits. .PP .IP \fB-v\fP This option can be used before any others (heyu -v info) to print a verbose listing of what is happening. .PP .SH ARGUMENTS Most heyu commands require arguments. They are as follows: .TP 5 \fIbinary-state\fP binary-state is either \fBon\fR or \fBoff\fR. .TP 5 \fIchange-state\fP change-state is either \fBup\fR or \fBdown\fR followed by number of steps. You can use \fBdim\fR instead of down or \fBbright\fR instead of up. .TP 5 \fIhousecode\fP housecode is a letter from a-p. .TP 5 \fIpreset-dim\fP A preset dim falls into the range of \fB1\fR to \fB32\fR. The next dim or bright command will jump to that level. .TP 5 \fIstate\fP state is in the form: (function) ([value]) .RS 5 .B on .br .B off .br .B up (value) .RS 5 value is a number from 1-22 .br .RE .B down (value) .RS 5 value is a number from 1-22 .RE .RE .TP 5 \fIunit-specifier\fP A specifier for one or more X10 modules, in the form (housecode)(unit-number[,unit-number...]). If the x10config file is present, and contains aliases, the unit-specifier may be one of those aliases instead of (housecode)(unit-number). .br There are special aliases lightson, lightsoff, allon and alloff. These allow you to execute 'heyu turn lightson' to turn on all lights assigned to the default housecode in your x10config file. .br If you want to use a special alias with a different housecode, you would specifiy a dummy unit as in 'heyu turn d1 allon'. .TP 5 \fIunit-number\fP A unit number is within the range of 1 to 16. The character '*' can be used to mean all unit numbers. One or more X10 modules is usually assigned a unit number. .SH EXAMPLES .TP 5 heyu turn a5 on Turns X10 module A5 on. .TP 5 heyu turn b7 down 8 Dims X10 module B7 by 8/22 of it's total range. .TP 5 heyu info Displays CM11A clock time, base housecode and unit status. It also has a bitmap that shows what it thinks is the state of the X10modules on the same housecode. .TP 5 heyu status B1 Returns the status of the X10 module B1 if the unit replies. .TP 5 heyu stop Stops the relay daemon that monitors the tty port. The monitor program will also stop if you are running it. I need to stop the program before I install a new version to avoid 'text busy' messages. .TP 5 heyu setclock Sets CM11A's clock to current (system) time of day. This is adjusted for daylight savings time. .TP 5 heyu reset Sets the CM11A to the default housecode specified in the x10config file. .br (This does not clobber the X10 clock) .TP 5 heyu reset c Sets the CM11A to track events on housecode C .br (This does not clobber clock) .TP 5 heyu date Displays date in date(1) input format. The year is taken from your system clock. Please don't use this to set your computer's clock. .SH ENVIRONMENT .br X10CONFIG - Points to a fully qualified file name of your configuration file. See \fix10config(5)\fR for more information on it's makeup. .br X10SCHED - Points to a fully qualified file name of your schedule file (timers, and macros). See \fix10sched(5)\fR for more information on it's layout. .SH FILES .br .x10config - X10 unit description file .br .x10sched.conf - CM11A schedule information for timers and macros. .br /var/lock/LCK..heyu.mon - lock file for monitor process .br /var/tmp/heyu.out - fifo file for relay process .br /var/tmp/heyu.write - lock file for processes that write to the CM11A .SH BUGS Occasionally the interface will not accept the first command after a reboot of the CM11A or the computer. This is due to a controller in a strange state. .SH AUTHORS Re-written to use the CM11A interface by Daniel B. Suthers (dbs@tanj.com). Originally written (Known as X10) by Larry Campbell (maynard!campbell). System V port, ID file, improved display formats, and other cleanup by John Chmielewski (rogue!jlc). Module aliasing additions by Paul Fox (pgf@foxharp.boston.ma.us) .SH SEE ALSO ftp://www.x10-beta.com/ftp .br http://heyu.tanj.com/heyu/ (faq) .br http://heyu.tanj.com/heyu/protocol.txt .br date(1), x10config(5), x10sched(5), heyuhelper(1)