Hardware Reference
In-Depth Information
Heyu
Heyu is a simple command-line tool, available in most *nix systems (including most Linux distributions, BSD, and
Mac OS X), capable of performing two-way communication with an X10 computer module and of programming the
EEPROM with macros and scheduled events. You can also download it from the home page at www.heyu.org . This is
not free software or open source as the OSI would consider it, but the source is available for free, and it is free to use.
Once installed, the software auto-configures itself when first run. This takes a few seconds and involves opening
the serial port ( /dev/ttyS0 by default) and verifying that the CM11 is truly plugged in and working correctly. The best
way of doing this is to include Heyu in the startup sequence by running the following command:
heyu engine
This ensures that the Heyu background process is running, which allows incoming messages to be picked up,
triggering external scripts. The engine parameter also starts the state machine inside Heyu, allowing it to remember
the last setting for each lamp and appliance, which is useful since many devices (especially the cheaper ones) do not
let you query their status. In a noncomputerized environment, this feedback loop is unnecessary since, as a human,
you can see whether the light came on when you pressed the button, so you can see if you need to try again.
A computer is not as talented. It is also good design practice for any computer interface to indicate the module's
current state, making this feature more important. If you are likely to be using a lot of computer-based interfaces in
your home (say, through a web page), then it can be worth upgrading to the two-way lamp and appliance modules
covered earlier.
Configuration
The configuration is held within various files inside /etc/heyu , specifically x10.conf , which holds the serial device,
default house code, aliases, scenes, and scripts. By default all log information is written to /var/log/heyu .
Aliases, as the name suggests, provide a human-friendly form of the house and unit codes for each device you
want to set up in the x10.conf file along with whether the device is a lamp module ( StdLM ) or an appliance module
( StdAM ):
ALIAS lounge e5 StdLM
ALIAS stereo e6 StdAM
Once specified, the alias can be used within the configuration file and in the commands issued upon it.
This abstraction reduces the number of changes necessary should you ever need to renumber your house appliances.
Scenes are Heyu's way of describing relay messages or macros. Each line contains a label name and a list of
semicolon-separated commands:
SCENE movie_mode on tv; on stereo; dimb lounge 10;
The dim range in Heyu is between 1 and 22 and is supported by relative and absolute brightness change
commands ( dim and dimb , respectively). Note that if you change the Heyu configuration file while it's running, you
must issue the following command to refresh the parameters:
heyu restart
Search WWH ::




Custom Search