The Files used in rc/etc: The distribution provides the following sample files: Sample.rc.local Sample.RCStrings Sample.X10Control Sample.X10KeyMap Sample.X10Map Sample.IRKeyMap Each should be copied into a runtime version and edited as appropriate. The runtime version is named by removing the "Sample." prefix, ie. "Sample.X10Map" becomes "X10Map". All Files: Comments are delimited by '#' ------------------------------------------------------------------------------- rc.local: This file should be edited and merged with your '/etc/rc.local' or '/etc/rc.serial' file. ------------------------------------------------------------------------------- RCStrings: This file defines system resources needed by the rc server and clients. READERPORT: port for SerPlix & TW X-10 controller, reader process. READERBAUD: baudrate for Serplix X-10 controller, reader process. WRITERPORT: port for SerPlix & TW X-10 controller, writer process. WRITERBAUD: baudrate for Serplix X-10 controller, writer process. IRTPORT: serial port for SIR IR transmitter. IRTBAUD: baudrate for SIR IR transmitter. IRRPORT: serial port for SIR IR receiver. IRRBAUD: baudrate for SIR IR receiver. IRPORT: serial port for LIR IR controller. IRBAUD: baudrate for LIR IR controller. EARSPORT: serial port for speech recognition engine. X10MAP: initialization COMMAND for X-10 command mapping. X10INIT: initialization COMMAND for startup of X-10 modules. X10KEYMAP: path to the X10KeyMap file. BINX10KEYMAP: path to the compiled X10KeyMap file. IRKEYMAP: path to the IRKeyMap file. BINIRKEYMAP: path to the compiled IRKeyMap file. IRTRAIN: (for LIR IR remotes) X10D_DG_PATH: 'well known address' of X-10 daemon. IRD_DG_PATH: 'well known address' of IR daemon. RCD_DG_TMP: temp socket name for clients. X10D_LOGFILE: log file for X-10 daemon activity. IRD_LOGFILE: log file for IR daemon activity. ------------------------------------------------------------------------------- X10Control: This file provides X-10 controller commands upon startup of the rcdaemon to place them in a known state. This 'raw' command would flash the light plugged into X-10 module A5 on, then off: a5 a19 a20 NOTES: See keyword "CONTROL" in file 'RCStrings'. ------------------------------------------------------------------------------- X10KeyMap: This file provides a mapping between X-10 controllers and command names for using them. Keywords: AREA, UNIT, FUNC AREA: specifies a physical device, X-10 module 'HOUSE CODE' UNIT: <1-16> specifies a physical device, X-10 module 'UNIT CODE' FUNC: X-10 command The following defines the X-10 controller addressed @HOUSE-C,UNIT-1 to be named 'frontroom.light' and gives names of 'on', 'off', 'bright' & 'dim' to those X-10 functions, respectively. AREA C: frontroom UNIT 1: light FUNC ON: on FUNC OFF: off FUNC BRIGHT: brigh FUNC DIM: dim To turn on the light, one could then use the command "frontroom.light frontroom.on", and dim it 2 steps with "frontroom.light frontroom.dim", "frontroom.light frontroom.dim". NOTES: You must use the command "x10namer' after editing this file to parse it into the file called 'X10KeyMap.bin'. Presently this MUST be done BEFORE starting the rc daemon. A future version should re-do this parsing pass upon receipt of a SIGHUP signal. ------------------------------------------------------------------------------- X10Map: This file creates a mapping of received X-10 commands to actions. Using either 'raw' X-10 commands (HOUSE/UNIT, HOUSE/COMMAND) or mapped commands (via X10KeyMap) you can define actions to be carried out upon their receipt. The general format is a SINGLE line containing: [action-option] pattern: Keys: [... key] Control: key: action: action-type: Message: [args] System: [args] action-option: Priority: priority-value: <-127 thru +127, where -127 := highest priority, +127 := lowest priority> The 'Control' action supports the X-10 protocal allowing multiple X-10 units to be controlled with keystroke groupings. Basically this means you can press multiple 'unit' keys followed by a 'commmand' key to cause all addressed units to respond to that command. For example, the action string: Control: frontroom.dininglight frontroom.on \ Message: - emit diningroom.light diningroom.on says that if the X-10 command sequence 'frontroom.dininglight','frontroom.on' is seen , the X-10 unit/key commands 'diningroom.light','diningroom.on' should be sent. An understanding of X-10 protocal is really needed to fully comprehend all of this! Other examples: 'raw' X-10 addressing: Keys: A16 A18 Message: - emit A14 A19 says that if the X-10 command UNIT:A-16, COMMAND:A-ON is seen that the X-10 command UNIT:A-14, COMMAND:A-OFF should be sent. running a unix command: Control: kitchen.checkemail kitchen.off \ System: - /usr/local/control/bin/verbalemail says that if the checkmail button of the kitchen X-10 minicontroller is pressed OFF that the unix program 'verbalemail' should be run via system(). This has the effect of checking whether I have waiting e-mail and notifying me via the text-to-speech device (details buried in verbalemail). NOTES: See keyword "MAP" in file 'RCStrings'. ------------------------------------------------------------------------------- IRKeyMap (SIR version): This file provides a mapping between SIR InfraRed controllers and key names for using them. Keywords: AREA, DEVICE, KEY, SAMPLE AREA: specifies a physical device associated with an area. DEVICE: specifies a 'personnality' of the device, eg. 'tv control mode' or 'vcr control mode'. KEY: specifies a label for executing that 'key press'. SAMPLE: specifies a series of HI/LO carrier samples. The following defines the first ir controller to be named 'tv' and gives names of 'on', 'vol_up' & 'vol_dn'. AREA: frontroom DEVICE: tv KEY: on SAMPLE: 150 16 32 16 16 64 16 16 64 16 48 64 200 KEY: vol_up SAMPLE: 150 16 32 16 32 64 16 16 64 16 16 64 200 KEY: vol_dn SAMPLE: 150 16 32 32 16 64 16 16 64 16 16 64 200 To turn on the tv, one could then use the command "tv.on", and crank up the volume 3 steps with "frontroom.tv.vol_up", "frontroom.tv.vol_up", "frontroom.tv.vol_up". NOTES: You must use the command "irnamer' after editing this file to parse it into the file called 'IRKeyMap.bin'. Presently this MUST be done BEFORE starting the rc daemon. A future version should re-do this parsing pass upon receipt of a SIGHUP signal. ------------------------------------------------------------------------------- IRKeyMap (LIR version): This file provides a mapping between LIR InfraRed controllers and key names for using them. Keywords: UNIT, DEVICE, KEY UNIT: specifies a physical device DEVICE: specifies a 'personnality' of the device, eg. 'tv control mode' or 'vcr control mode'. KEY: specifies a label for executing that 'key press'. The following defines the first ir controller to be named 'tv' and gives names of 'on', 'vol_up' & 'vol_dn'. UNIT: A DEVICE: tv KEY 1: on KEY 2: vol_up KEY 3: vol_dn To turn on the tv, one could then use the command "tv.on", and crank up the volume 3 steps with "tv.vol_up", "tv.vol_up", "tv.vol_up". NOTES: You must use the command "irnamer' after editing this file to parse it into the file called 'IRKeyMap.bin'. Presently this MUST be done BEFORE starting the rc daemon. A future version should re-do this parsing pass upon receipt of a SIGHUP signal.