![]() |
![]()
| ![]() |
![]()
NAMEx10aux - Auxiliary input to Heyu via RF DESCRIPTIONHeyu is a program for controlling an X-10 "CM11A" home control device. See the heyu(1) man page for usage information. This page contains information about the capability of Heyu to receive and process signals from RF remotes and sensors using a WGL W800RF32A, an X-10 MR26A, or an RFXCOM X10 RF receiver connected to a second serial port, or an RFXLAN network version of the RFXCOM connected to a local network. HARDWAREThe W800RF32A is manufactured by WGL & Associates (http://www.wgldesigns.com). Two models are available - the US/Canada model operates at a frequency of 310 MHz and the International model (W800RF32AE) at 433.92 MHz. It is capable of receiving signals from standard X10 RF remotes and sensors like the X-10 HR12A "PalmPad", from security X10 remotes and sensors like the X-10 DS10A Door/Window Sensor, and from older entertainment X-10 remotes like the UR81A Universal Remote which are designed to be used in conjunction with an X-10 MR26A Receiver. Its receiving range is excellent. The X-10 MR26A is capable of receiving standard X10 and the older entertainment X10 signals, but not the security X10 signals. Its receiving range is somewhat limited, perhaps 20-30 feet. The RFXCOM X10 receiver (http://www.rfxcom.com) is available in a US/Canada 310MHz version, an International 433.92 MHz version, and a dual-frequency version. All versions receive signals from standard, entertainment, and security RF remotes and sensors (which transmit at their frequency). The 433.92 MHz and dual-frequency versions can additionally receive signals from various other sensors like Oregon Temperature/Humidity/Barometric Pressure sensors. The RFXCOM X10 receiver is supported by Heyu in both variable length packet and 32 bit (W800 emulation) modes. The RFXCOM is a USB device but has a built-in FTDI USB-to-Serial converter and communication with it is the same as with a serial port (assuming your OS supports the FTDI chipset, as does Linux). All of these devices are strictly RF receivers and have no transmitting capability. The RFXLAN version of the RFXCOM receiver connects to a local network and is accessible over a TCP socket. Its optional transmitter part, if present, is not supported. QUICK STARTStop Heyu (if already running) with the command 'heyu stop'. Plug a W800RF32A/AE or MR26A receiver into a serial port. Or plug an RFXCOM receiver into a USB port and determine the serial device assigned by the OS. (Under Linux, the first USB device plugged in will normally be assigned to /dev/ttyUSB0, or possibly to /dev/usb/ttyUSB0, the second USB device to /dev/ttyUSB1, etc.). Or connect an RFXLAN receiver to your local network and configure of verify its network address and port it listens on. Describe for Heyu the port and receiver being used with the
following directive in the Heyu configuration file:
The configuration directives TRANSCEIVE and RFFORWARD determine whether signals from a Standard X10 transmitter (like the HR12A PalmPad) are directly transceived to the powerline or are forwarded to the Heyu Engine for processing. The defaults for these directives are "TRANSCEIVE ALL" and "RFFORWARD NONE". Run ´heyu start´, and in another xterm ´heyu monitor´. Verify that the RF signals are being correctly received. Transceived signals will appear in the monitor window with source "snda", indicating they were sent by the auxilliary daemon heyu_aux. For transmissions from Security X10 sensors like the X10 DS10A
Door/Window sensor (with an RF receiver capable of receiving these
transmissions) the Heyu monitor will display an "RFdata" signal.
Before Heyu can decode the signal data it has to know the type of
sensor. This is accomplished by mapping the sensor module type and its ID
(0x23 in this example) to an otherwise unused housecode|unit address with an
ALIAS directive in the configuration file, e.g.,
Then after running ´heyu restart´, opening the door
will result in a monitor display like:
RF TRANSMITTERSIn addition to the various standard X10 remotes and sensors, Heyu currently includes RF decoder modules for the following RF security and entertainment remotes and sensors: North American models:
International models:
Decoders are also included for RFXSensor and RFXMeter signals, and signals from the DigiMax 210 Thermostat and Oregon sensors. Owners of these devices should see man pages x10rfxsensors(5), x10rfxmeters(5), x10digimax(5), and/or x10oregon(5). Modules for other remotes and sensors will be added once the RF code generated by each button-press or sensor action is known. (Heyu displays this information.) Security remote and sensor devices transmit two significant bytes of code at each button-press or sensor action. The first of these is an identification byte which is (nominally) unique for each individual device; the second describes the function of the particular button-press or sensor action. Older entertainment remotes like the UR81A transmit two significant bytes of code. The first of these is either constant or restricted to a few values; the second describes the function of the button-press. The way each of the bytes are encoded for RF transmission allows distinguishing between standard, security, and entertainment codes. MODULE OPTIONSREVERSE keyword.
MAIN keyword
BASIC OPERATIONIn order to receive RF signals, Heyu relies on the heyu_aux
daemon, which is started either manually with the ´heyu aux´
command or automatically in the startup sequence with the ´heyu
start´ command. The serial port, or network address in case of the
RFXLAN network receiver, and attached receiver device must be specified in
the Heyu configuration file with the TTY_AUX directive. The syntax for this
directive is:
RFXCOM defaults to the variable length packet mode model, RFXCOMVL. The 32 bit W800 emulation mode RFXCOM32 may be specified if necessary. There is no default for this directive. Standard X10 RF signals received by heyu_aux may either be
directly transceived to X10 powerline code or may be forwarded to the
heyu_engine and used to launch scripts without the delay inherent in X10
powerline communication. The alternatives are controlled by the two
configuration directives, TRANSCEIVE and RFFORWARD. The syntax for these
directives is:
Either of these directives may also use the keyword ALLEXCEPT
followed by the square bracketed housecode list to include all housecodes
except those in the list.
Any given housecode may not be both transceived and forwarded. The default for the TRANSCEIVE directive is ALL, and that for the RFFORWARD directive is NONE. Finer grained control is available from special module types used
in an ALIAS directive which can override the TRANSCEIVE and RFFORWARD
selections for specific units and functions within a housecode. These module
types are:
The MSxx module types differ from the KEYCHAIN module type only in that they are defined as "sensors" and will be listed in the table displayed by ´heyu show sensors´. Each of these special module types requires one of the parameters
TRANSCEIVE, RFFORWARD, or RFIGNORE to define its functionality.
Example:
If, for whatever reason, you have an external transceiver like a TM751 or RR501 in operation, Heyu should usually not transceive on the same housecode lest there be signal collisions on the AC power line. Note: Heyu identifies signals transceived by heyu_aux as having the source SNDA. Signals forwarded to heyu_engine are identified as having source RCVA. Remember this when using these signals to launch a script. Security and Entertainment X10 RF signals received by heyu_aux are decoded and processed by the Heyu State Engine daemon, heyu_engine. Since these types of signals contain no Housecode/Unit identification, the transmitting device must be mapped to a Housecode and Unit in an ALIAS configuration directive for the RF signal to be decoded by the Heyu Engine. Once decoded, the signals can be used to launch scripts or control various Heyu features like a home security system. Heyu identifies security and entertainment signals from heyu_aux as originating from source RCVA. Remember this when using these signals to launch a script. For security devices, the identification of the individual device
(or devices if you have more than one of the same type) must be provided
with the ALIAS directive. The syntax is:
Note: multiple device IDs are normally mapped to a single
housecode|unit address only for security remotes of the same model. Security
sensors must be mapped to different addresses so the signals from each can
be distinguished. Examples:
To determine the security ID of a device, start Heyu normally and
open a Heyu Monitor window. Operate the device(s) in question by pressing a
button, opening the door, or whatever it takes to make it send an RF signal.
Heyu will display the raw RF signal in the monitor window like this:
Most X10 Security devices actually send a 16-bit ID code, however the upper byte is received only with an RFXCOM receiver in variable length packet mode. The examples here illustrate only the 8-bit code which would be received by a W800RF32A/AE receiver or RFXCOM in 32 bit mode. In the ALIAS directive, use whatever ID code, 16-bit or 8-bit, is reported by Heyu from your RF receiver. For entertainment remotes like the UR81A, the ID doesn´t
change. It is built into the model and isn´t specified in the ALIAS.
So using the UR81A as an example, we could use the directive:
The RF signals from entertainment remotes are currently decoded by heyu_engine only as virtual data (´vdata´) signals. Heyu scripts can examine the data value (environment variable X10_Vdata) to determine what action to take for a particular button-press. An example script is UR81A_Action.sh found in the Utilities section of the Heyu website (http://www.heyu.org). SECURITY FUNCTIONS AND FLAGSThe "Arm" and "Disarm" RF signals from security remotes like the X-10 SH624 and KR10A correspond to functions "arm" and "disarm". They control Heyu´s global security flags ("armed", "disarmed", "armpending", "home", and "away") the same as if the corresponding ´heyu arm ...´ or ´heyu disarm ...´ commands were entered from the keyboard. (Global flags may be tested in the launch conditions for any script.) Signals from security remotes and sensors also set local flags for the actual or implied switches on the devices: "swmin", "swmax", "swhome", "swaway", and finally "lobat" for a sensor low-battery flag. (Local flags may only be tested in a launch condition based on a signal received from the particular device which set that flag.) Security sensors send the RF signals "Alert" or "Clear", corresponding to functions "alert" and "clear". They periodically repeat the current state of the device in a signal approximately every 60-90 minutes, just to let the host system (Heyu in this case) know they are functioning normally. Don't confuse the functions "arm" and "disarm" with the flags "armed" and "disarmed", and don't confuse the local flags "swhome" and "swaway" with the global flags "home" and "away". CONFIGURATION DIRECTIVESThe TTY_AUX, TRANSCEIVE, RFFORWARD, and ALIAS directives are described earlier in this document. TRANS_DIMLEVEL directive
AUX_REPCOUNTS directive
The purpose of the <MAX> count is to protect the system from being overwhelmed by an accidental (or deliberate) unbroken flood of RF bursts, e.g., from a stuck button on a remote. Once there's an interruption in the flood, the counting reverts back to <MIN>. Heyu can be configured to launch a "-rfflood" script when it receives a RF Flood Started or Ended signal. Most users won't need to change the defaults for this directive.
SUPPRESS_RFXJAM directive
HIDE_UNCHANGED directive
If the value of this directive is set to YES, then the signal will be displayed in the monitor and log file only when it represents a change from the previous state, or if the signal launches a script. Only the display is hidden - the processing by heyu_engine continues normally. DISPLAY_RAW_RF directive
The display of raw data is in addition to the normal decoded data display. Displaying raw data requires writing a _lot_ of data to the spool file which can interfere with CM11A communications, so this directive should be left at the default "NONE" (or "NOISE") except for testing and debugging (or just to see what it looks like). Note: Some versions of the W800RF32A are said to receive 4-byte RF data from newer X10 entertainment remotes like the CR14A "Pan 'n Tilt" remote and the UR89A "Lola" remote. With the current absence of models for these remotes in Heyu, heyu_aux is forced to classify RF data which might be received from these remotes as RF noise. SECURID_16 directive
SECURID_PARITY directive
LAUNCHING SCRIPTSIn addition to the standard X10 functions transceived by heyu_aux (with source SNDA), the following functions received by heyu_engine (with source RCVA) from heyu_aux are available for launching scripts: "arm", "disarm", "panic" "alert", "clear", "slightson", "slightsoff", "vdata", "test", and "tamper". Other special functions which can launch scripts are described in the Heyu man pages for RFXSensors, RFXMeters, Digimax, and Oregon sensors. Don´t forget to include the source keyword(s) in the launch conditions. The keywords and flags which can be tested in the launch
conditions for a script in addition to the usual keyword "changed"
and the common flags 1-16 are: "armed", "armpending",
"disarmed", "home", "away",
"swhome", "swaway", "swmin",
"swmax", "lobat", "tamper", "main",
and "aux". (The last three currently relate only to the DS90
Security Door/Window sensor.)
The special launcher type "-rfflood" will launch a
script when an RF Flood signal is received. The flags that can be tested in
the launch conditions for this launcher are the special flags
"started" or "ended", the common flags 1-16, and the
security flags "armed", "armpending",
"disarmed", "home", and "away". Example:
MS10A WARNINGWhen the total voltage of the four AA cells in the MS10A falls
below about 4.3 Volts, THE SENSOR WILL NO LONGER DETECT MOTION. Its
heartbeat signal then is always Alert with the LoBat flag, which continues
to be transmitted until the battery voltage is somewhat lower. To avoid
false alarms, Heyu scripts should always check for the Alert/LoBat condition
before checking for Alert alone, e.g.,
SPECIAL DS90/DS18-1 SETUPThe DS90 and DS18E Security Door/Window Sensors have two independent circuits. In addition to the main circuit which is actuated by the magnetic door/window switch, there is an auxiliary circuit actuated by connecting a switch to a pair of internal contacts. The DS90/DS18-1 also has a "tamper" switch actuated by removing the cover from the unit which will issue a "Tamper" command and set the Heyu tamper flag. (The tamper flag is sticky and must be cleared by executing a ´heyu clrtamper´ command.) Each circuit has its own security ID. The security IDs are related
by the following formula, so given one the other can be derived:
This sensor can be configured in Heyu several different ways: Map the main and aux circuits to different housecode|unit
addresses. Simply use the main ID in one ALIAS directive and the aux ID in
another ALIAS directive.
Map both main and aux circuits to the same housecode|unit address
by including both security IDs in the one ALIAS directive. The signals from
each will be distinguished by flags MAIN or AUX.
Note: A potential hazard with mapping both circuits to the same housecode|unit address is that they both use the same activity timer. So the failure of one circuit won't be tagged as "inactive" so long as the other circuit is still working. If both circuits are mapped to the same address, the raw data from the AUX sensor is stored in the "memory level" byte in the state table and can be recovered with ´heyu rawmemlevel Hu´. Use only one of the two circuits and ignore signals from the
other. To do this, include the security ID for whichever circuit you want to
use in the ALIAS directive. Tell Heyu which one it is by adding the keyword
either MAIN or AUX as a parameter to the directive.
SPECIAL SD90 SETUPThe Marmitek SD90 Smoke Detector transmits signals at two independent ID addresses, an "Emergency" or "Test" address and a "Sensor" address. Marmitek security base stations apparently use only the signal at the Emergency address, and with the factory default SD90 setting the signals at the Sensor address are disabled. This is unfortunate because the Sensor transmissions include two important features which are absent in the Emergency transmissions: a periodic "heartbeat" signal and a low battery flag. The Emergency and Sensor addresses may individually be programmed to a value 1 through 16. The following table displays the (8-bit) security ID for each programmed address. Note: An RFXCOM RF receiver in the default variable length mode will display a 16-bit security ID with a high byte of 0x54 and a low byte as shown in this table, e.g., 0x54C0 for Emergency address 1.
Each installed SD90 Smoke Detector unit should be set to its own unique addresses. It´s probably a good idea to check with nearby neighbors who may have a SD90 within range of your RF receiver. While the Emergency and Sensor addresses for a given SD90 can be set to different values, there´s no particular reason for doing so and the full functionality of the SD90 can be achieved by setting both Emergency and Sensor address to the same value from 2 through 15. Instructions for changing the Emergency and Sensor addresses are
provided in the Marmitek SD90 Advanced Use manual, which at the time of this
writing is available for download from URL:
Having decided on the Emergency and Sensor addresses to use,
perform the following steps:
After a delay of about 3 seconds, the LED will flash the Emergency address and after another few seconds will flash the Sensor address. If the Sensor address is anything other than 1, the LED will then flash rapidly a number of times to indicate the procedure has been completed. The programmed addresses can be recovered by pressing the Reset button. The LED will flash the Emergency address, then after a short delay the Sensor address. The Heyu SD90 model allows the Emergency and Sensor signals to be
mapped to the same or different housecode|unit addresses, depending on
whether one or both IDs are supplied as a parameter in the ALIAS directive.
(where 0x54CA and 0x54DA should be substituted for 0xCA and 0xDA respectively in the above when using an RFXCOM receive). The signal from the Emergency address appears in the Heyu monitor as "Test" when either the Test button is pressed or when the detector is actuated by smoke. (The SD90 makes no distinction between the two.) The signals from the Sensor address are "Alert" when the detector is actuated by smoke, and "Clear" when the smoke dissipates and also at the heartbeat intervals. When the SD90 determines that a low battery condition exists, it sends a single Sensor signal with the LoBat flag, then stops sending the heartbeat signal. (The detector will start issuing audible beeps at intervals.) SPECIAL BWR102 SETUPMapping the BWR102 scale data to a housecode|unit address with an ALIAS directive and module type ORE_WGT1 is similar to that for other Oregon sensors. For each weight measurement, the BWR102 retransmits the encoded weight data at intervals of 10 or 11 seconds, up to 7 times or until another weight measurement is started. The first of these transmissions will always have the ´changed´ flag set, even if the weight is identical to the previous weight measurement. Subsequent retransmissions will have this flag unset. The weight units slider switch on the scale controls only the unit
displayed on the scale´s LCD; the transmitted native units are always
kilograms, to 0.1 kg precision. The configuration directive ORE_WGTSCALE is
used to convert the native units to the user´s preferred units.
AUTHORSCharles W. Sullivan (cwsulliv01@heyu.org) SEE ALSOhttp://www.heyu.org
|