                                  Heyu Faq
                        (Frequently Asked Questions)
                           Last updated 12-12-1999

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,
   FreeBSD, SunOS, Solaris 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 tar file will recreate the subdirectory heyu.dir.
   Cd to the directory of your choice.  Copy the tarred file there then type:
   gunzip -c x10_heyu.tgz | tar xvf -

   The compiled program is no longer included in the tar file, just the
   complete source code.  The compiled program can be downloaded from
   the heyu web site.

   To compile the program, edit the Makefile (unless you are using Linux)
   and then type 'make'.  The resulting 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?

   First, stop the running version of the program with 'heyu stop'.

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

   When satisfied with the modifications, type 'make install' while
   logged in as root.

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.
   d)  You may be running another program (getty or a mouse driver) on the
       same port.

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 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.

    You can also get it with just the option 'version'

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

    See my website for current links.

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've barely 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.

    You have to have permissions to kill(1) the daemon to stop it.

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

20) My CM11A stopped working correctly on new years day.

    It appears that the internal clock doesn't handle end of year
    very well.  I added the following to my crontab to fix it.

    1 1 1 1 * X10CONFIG=/usr/dbs/.x10config heyu setclock
    2 1 1 1 * X10CONFIG=/usr/dbs/.x10config heyu macro

21) Does HEYU do schedules, as in timers and macros?

   As of version 1.28, it does schedules.  See the man page for 
   information about how it should be set up.  The man page is
   x10sched.conf(5)

   There's a sample .x10sched.conf file in the source tar file.

22) I just installed heyu and only an 'info' will work (but takes about
   10 seconds), all other commands fail.  Activehome works fine on the
   same machine under Win95.

   The clue here is 'real slow'.  Sometimes plug and play systems change
   the interrupts on the serial ports.  Sometimes you end up sharing 
   interrupts with another device.  When that happens, you may end up having
   to wait for the other device to need attention before your system will
   look at the serial port.

23) Heyu works, but it take 6 to 10 seconds to send a command.

   See #22.  Heyu should take about 1 second to send an on or off comamnd.
   The only exception is the very first time as it sets up the daemon.

   Dim and bright may take a few seconds longer, but not much more than 
   4 seconds.

24) Does heyu handle leap year properly?  How about Daylight Savings Time?

   Well, sort of.  The CM11 has no idea about what year it is, so it doesn't
   track leap days.  It also doesn't adjust for DST.  My work around is to
   refresh the clock May 1, and the day of the time change.

25) I don't need the heyu program anymore.  I like windows better.  How 
   do I get rid of it?

   There is an uninstall option built into the Makefile.  Cd to the
   source directtory for heyu and type 'make uninstall'.


Copyright 1996, 1997, 1998, 1999 Daniel B. Suthers,
Pleasanton Ca, 94588 USA
E-mail dbs@tanj.com

