                                  Heyu Faq
                        (Frequently Asked Questions)
                              updated 1-15-1998
                              updated 4-16-1998

1) What is Heyu?

   Heyu is a program that allows your computer to control devices by
   transmitting information over your house's power lines.

2) What hardware is needed?

   The CM11A power-line communications module from X10 connects to a
   serial port on your computer.  It translates your computer's commands
   to a signal that's transmitted over the AC wiring in your house.

   The X10 receiver modules (lamp, appliance, etc) listen for the signal
   on the AC lines.

3) What OS will Heyu run on?

   The program was developed on a Linux system.  The compiled program
   should work on any Linux system, although some of the directories
   may differ between Slackware, Redhat and Debian.  Check the system
   logs if the program does not run as expected.

   The program may be portable to other Unix variants.  The source code
   is included on the web site.

   It has been reported that the program compiles (and runs) on Linux, BSD,
   SunOS and NEXTSTEP 3.3

4) I down-loaded the file, now what?

   The whole package is included in the file x10_heyu.tgz  This is a
   tar file that has been gzipped.  Some of the individual parts are
   also available from the web site.

   The most portable way to unpack the file is to create a subdirectory,
   cd to that directory, copy the tarred file to then type:
   gunzip -c x10_heyu.tgz | tar xvf -

   The compiled program is included, as well as the complete source
   code.  The program is simply heyu.  Copy the x10config file to your
   home directory under the name .x10config and edit it to suit your
   environment.

   To install the program and man pages, type 'make install' while logged
   in as root.

5) What is the .x10config file?

   The x10config file is used to set certain definitions for the program.
   X10 devices are normally addressed by a code represented by a letter
   and a number.  The x10config file provides a way to associate 'names'
   with devices.

   For example, the name lamp can be used instead of D4, or porch-light
   could be used instead of device K15.

6) I made a local modification.  How do I build the program?

   A make file is included that will create the program.  Just type the
   command 'make' in the directory where you unpacked the source.

7) What's the heyu_relay process that's always running?

   This is the process that gathers the output from the CM11 and stores
   it for any program that may need it.  It also responds to the CM11's
   requests for time updates and power failures.

   The relay allows several programs to communicate with the CM11.
   As an example, you can run the program in monitor mode in one window
   to watch what's happening with the CM11, while cron's sending a
   a command to the CM11 based on the system clock.

8) When does the relay program get started?

   The relay is automatically started the first time the program runs.
   If it's killed for any reason, it will start up again the next time
   the program runs.

9) I'm running the program for the first time, and it's saying:
   "Invalid status response (was 0 bytes instead of 14)" and it's
   not turning anything on or off.

   This may indicate several things.
   a)  The CM11 may not be connected to the correct serial port.  Com1
       in DOS is ttyS0 in Linux. 
   b)  The CM11 may not be plugged into the wall or the outlet may be
       turned off.
   c)  The CM11 may need to be prodded.  Some CM11's go to sleep when
       first plugged in.  They wake up when they see the first X10 traffic
       on the AC lines.  Use a mini-controller or wireless transmitter
       to turn an X10 module on or off.

10) I have my CM11 set to house code A.  Will it report X10 events for
    other housecodes?

    Yes, any activity will be reported.  The 'monitored devices' line
    of the info report only applies to devices set to the same housecode 
    as CM11.

11) Why the silly name?

    My kids are grown and on their own, and I kind of missed being able
    to shout out "Hey You! Turn the lights off!"

12) Is there a web page?
    
    Yes.  http://heyu.tanj.com~/dbs should bring you to the web page.
    
13) I run the program and get the output:
    read: Bad file number

    This generally means that the program can't open a necessary file.
    Check the log files in /var/adm for error messages complaining about
    files or directories.  Unfortunately, not all Unix systems use the
    same directories for temp files, lock files and such.

14) I have a CP290 instead of a CM11.  Will heyu work with it?

    No.  Check the web page of Paul Fox.  There's a pointer to it at the
    heyu web page listed above.

15) What version number am I running?

    Use the -v (verbose) option to see the version number.  It's the
    first line to print out.

16) Are there other Linux programs that will run a CM11?

    There is another one called x10d that uses a network driver approach,
    so you set up a network service and telnet to that port to issue
    commands.  The author is Daniel D. Lanciani and a modified version
    was posted to the net by Neil Cherry.
    
    The web location for Dan Lanciani's x10d is http://www.danlan.com/

    There's a web site at
    http://cesdis.gsfc.nasa.gov/linux-web/beowulf/x10.html that has a
    program which also acts as a daemon.  I haven't looked at it yet.

    There's the freeBSD daemon also called x10d at 
    http://freebsd.org/~fsmp/HomeAuto/HomeAuto.html

17) I want to control programs based on X10 signals.  Can I?

    The Xtend program will read the spool file and launch an appropriate
    program based on X10 messages received over the power bus.  I haven't 
    used the program, but it sounds good.  The URL is:

    http://www.jabberwocky.com/software/xtend/

18) The daemon doesn't die when I do a 'heyu stop'.

    There code didn't always work in versions prior to 1.16.  Please
    let me know if it happens with 1.6 or later.

19) The program does not work from my crontab.

    Most likely problem is that the x10config file is not found.
    Add the X10CONFIG variable to your crontab command.
    This crontab does work where my home directory is /usr/dbs:

    10 17 * * * X10CONFIG=/usr/dbs/.x10config heyu  turn a1 off
