         Release notes for Heyu 2.0beta.7.2
                 12/01/2006

File heyu-2.0beta.7.2.tgz will un-TAR into directory
./heyu-2.0beta.7.2

What's Fixed
------------
Schedule file timers with timer options were not being
being correctly processed for uploading to the CM11A
EEPROM.  Thanks to Roy Badami for reporting this and
providing the fix.

The 'heyu upload croncheck' command was not honoring
an override of the MODE directive in the schedule
file.

What's New
----------
Added experimental commands 'heyu ri_disable' and
'heyu ri_enable' for disabling or enabling the Ring
Indicator (RI) serial line on the CM11A.  For PCs 
which have a "Start up on Telephone Ring" or "Start
up on Modem Ring" feature, disabling the CM11A RI line
prior to shutting down the PC prevents the CM11A from
inadvertantly starting it up again when an X10 signal
is received over the AC power line.

Added experimental command 'heyu port_line_test' for
testing whether a serial port supports the Ring 
Indicator (RI) input status line and/or other input
status lines.  The test requires jumpering two pins
on the serial port connector.  See the instructions
for this command in the section "EXPERIMENTAL STUFF"
in man page heyu(1).  This test command was added 
because the RI line on some USB->Serial adapters using
an older Prolific chip isn't properly supported (at
least under Linux).

Added the configuration directive SEND_RETRIES for
changing the number of times (default is 3) Heyu will
attempt to transmit an X10 command from the command
line before giving up.  (This feature was actually
added in beta.7 but not mentioned in the release notes.)

         Release notes for Heyu 2.0beta.7.1
                 11/25/2006

File heyu-2.0beta.7.1.tgz will un-TAR into directory
./heyu-2.0beta.7.1

(beta.7.1 fixed a one line compile error in beta.7 on
some non-Linux OSes.)

Reminder: When upgrading from a previous release of
Heyu, be sure to run 'heyu stop' with the previous
release before installing the newer release.


What's New
----------
Added support for the AT&T SysV r4 operating system.
Thanks to Michael Grigoni for supplying the required
patch.  Note that this configuration has thusfar been
tested only on a CM10A (IBM HD16).

Added keyword TRIGEMU for script launch conditions to
emulate the conditions under which an uploaded macro
will be triggered by a powerline signal.  See the
x10scripts(5) man page for a more detailed explanation.

The 'heyu show launchers' command now displays the 
script command line.

Added experimental command 'heyu powerfailtest boot|notboot'
to emulate interruption of AC power to the CM11A.  This
allows testing of -powerfail scripts without actually
interrupting the power.  For details see the EXPERIMENTAL
STUFF section of man page heyu(1).

Added function 'vdata' and a virtual module type VDATA. The
command will store a data byte 0-255 in that module as if it
were a brightness level. (Nothing is sent to the CM11A.)

Added Alpha support for OpenBSD to the Configure file
thanks to inputs from Julien Touche.  (This is as yet
untested with actual hardware.)

What's Fixed
------------
Removed the superfluous declaration of the write()
library function in module setclock.c which caused
a build failure on an AMD 64 bit system under FreeBSD
(and probably under other operating systems as well).
Thanks to Michael Stowe for reporting this.
 
Removed a cable connection test for the CM10A which
fails on versions of the CM10A which use a 4-pin
modular handset connector (as on the CM11A) rather
than the 6-pin RJ12 connector on the CM10A version
available for Heyu development.

Increased the timeout on some state functions which
failed on slow systems.

Removed a disfunctional Ring Indicator (RI) serial line
check for incoming X10 signals from the serial port
write function.  This had the effect only of greatly
slowing down Heyu commands on systems where the serial
port does not support modem control lines.

Thanks to Michael Grigoni for reporting this and the
previous two problems.

Added a RI check for incoming X10 signals in higher level
sending functions which should help prevent collisions
between incoming and outgoing X10 data. (It should not
do anything if the serial port does not support the RI
line, but the config file directive 'CHECK_RI_LINE NO'
is available to disable this check in case of problems.)
Known BUG: Either the hardware or Linux support is
buggy for USB-Serial adapters using an older Prolific
chip - the RI line appears to be stuck in the active
state.

Fixed a large number of compiler warnings which were
displayed when building with some compilers.

Intervals of Daylight and Standard Time were not being
correctly determined for schedules when the ASIF_DATE
configuration directive (used for testing) specified a
year other than the current year.

The header file linux/serial_reg.h included in four of
the Heyu source modules seems to have been dropped from
later Linux kernels, e.g., 2.6.18-1.2798.fc6  supplied
with the Fedora Core 6 distro. Its removal appears to
have no effect for kernels at least as early as 2.4.20,
so it was removed from the Heyu code.

The installation script failed because it tried to set
the group ownership for heyu to 'root', which group
does not exist on some operating systems. The group is
now customized for each OS.  Thanks to Henry Butz,
Brian Holmes, and Michael Stowe for identifying and
helping resolve this problem.

Fixed a problem with USB->Serial adapters on Linux
systems which became evident in the Heyu monitor, which
displayed a very high percentage of 'Poll received
unknown value" messages.

Fixed a problem with Mac OS X (and probably other
non-Linux systems) when using a USB->Serial adapter.
If the adapter was unplugged from the USB port, Heyu
would go into an endless loop.  (Now Heyu will
terminate.)  Thanks to Henry Butz for reporting this.

Replaced strcpy() and strcat() functions in several
files with the more secure strncpy() and strncat()
functions.  Thanks to Julien Touche for his inputs
regarding this matter.


============================================
Release notes for previous heyu2/heyu 2 releases,
in chronological order.
============================================

            Release Notes for Heyu2 Alpha-1
                   3/10/2003

The ALPHA release of HEYU Version 2 is now available
at http://heyu.tanj.com/heyu2 as the compressed tar file
heyu2.alpha.tgz (143 KB) containing the source code.

Heyu is open source free software which runs under 
Unix/Linux to control the operation of the CM11A computer 
interface manufactured by X10.

Heyu Version 2 provides greatly enhanced capability
over Version 1 for timers and fast macros uploaded to
the CM11A computer interface.

(There are some enhancement patches which have been 
submitted by users against Version 1 stable releases 
which have not yet been implemented in this ALPHA 
release.)

After downloading this file, running the command:
  tar -zxf heyu2.alpha.tgz 
will unpack the source code into subdirectory
./heyu2.alpha.dir under the current working directory.

See the file INSTALL there for instructions on
how to compile and install this release.

Users currently running an earlier version of heyu
should see the file README2 for a discussion of
backward compatibility issues.  

*** Note in particular that the ALPHA executable has 
temporarily been given the name 'heyu2' instead of 
'heyu', so both the existing and this new ALPHA
versions can coexist for testing purposes.

And of course all users should read the man pages
heyu(1), x10config(5), and x10sched(5), which
explain all the existing and new features.

Questions, comments, or other issues which arise 
with this ALPHA release may be posted to this group.

============================================

            Release Notes for Heyu2 Alpha-2
                   4/4/2003

A new build of the heyu version 2 ALPHA release is
now available on website http://heyu.tanj.com/heyu2

The file name is heyu2.alpha-2.tgz.  It will unpack 
into the same directory (heyu2.alpha.dir) as the
original alpha release, so it would probably be a good 
idea to delete, rename, or 'make clean' the original
alpha directory, especially if you've done any fiddling
with the source.

As with the original ALPHA release, the executable has
been temporarily named heyu2.

Changes from the original alpha release are as follows:

  A bug with wrap-around ("reverse") dates, i.e. 
  end MM/DD < start MM/DD, and leap years has been corrected.

  The uploadable macro "dim" command is now compatible 
  with heyu version 1 and with the "dim" issued from 
  the command line.  The uploadable macro command "dimb"
  has been added which dims after first brightening to
  100%.  In short, what was previously "dim" is now "dimb"
  and what was previously "dim!" is now "dim".  Note
  that the "dim" issued from the command line is unchanged,
  and that "dimb" is not yet implemented for the command line.

  A bug with case-sensitivity of aliases defined in the
  configuration file has been fixed.  Aliases are now
  properly case-sensistive.

  (Thanks to Tom for pointing out the above 3 problems.)

  A code bug which caused the compile to fail on
  some non-Linux compilers has been corrected. 

  (Thanks to Chuck for reporting the above.  Note: some
  further suggestions by Chuck have been temporarily 
  deferred for additional study.)

  A code bug with the potential for causing heyu2 run-time 
  problems with uploadable macros under some circumstances
  has been discovered and fixed.

  The extended code preset dim command (for LM14A/PLM21
  2-way lamp modules) is now available for uploadable
  macros as command "xpreset".  It is not yet implemented
  for command line operation.  Note: this is different 
  than the existing "preset" command line command.


==============================================

            Release Notes for Heyu2 Alpha-3
                     8/22/2003

The third heyu2 alpha release is now available for 
download on the Heyu website (http://heyu.tanj.com)
as 'heyu2.alpha-3.tgz'.

It will un-TAR into directory './heyu2.alpha-3.dir'
(which is different from the two prior alphas).

As always, feedback and bug reports from users are
welcomed. Thanks in advance to our testers/users for
giving this release a thorough workout.

What's New:
----------
Heyu2 can now execute a number of new commands directly
from the command line.  The order of the arguments is 
similar to that used for elements of uploaded macros, e.g.,

   heyu2  dim  b1,2  5

Available commands include _all_ native commands the CM11A
is capable of sending to the power line, including a lot
most users will never care about.  But they're there - 
run 'heyu2 help' to see the list.

Many commands have synonyms, which some users may find
easier to remember or type than the original command name.
Run 'heyu2 syn' to see them. 

Two of the original heyu commands, 'preset' and 'status',
were recoded along with the other new commands.  The
original code is still accessable for comparison purposes
by prefixing the commands with an underscore, i.e.
'_preset' and '_status'.

A few "higher level" commands have been added, including
the 'address' and 'function' commands requested by
several users (and available in heyu version 1.35).
Also a couple of others I thought _someone_ might come
up with a use for - please let me know.

What's Fixed:
------------
This version will hopefully now compile without errors
or warnings on FreeBSD systems. (FreeBSD users - please
confirm or refute.)  Thanks to users Jim and TJ for
reporting this problem.

An array overflow condition which occurred when a
very large number of timers was specified in the schedule
file has been corrected.

Another array overflow condition which ocurred when
a macro with a very large number of elements was specified
in the schedule file has been corrected.

Macro names longer than about 20 characters were being
truncated even though the allowable length is 31 
characters.  Thanks to user Steve for reporting this
and identifying the line of bad code.

The CM11A legal date reported by heyu2 was off by one
day when both: 1. No schedule was uploaded to the
CM11A EEPROM and 2. The local time was between 00:00 and
01:00 hours during Daylight Savings Time.  It's now been
fixed.  Thanks to TJ for spotting this. 

The 'preset' command will now flag an error if the user
attempts to set the dim level to 0.  (Legal values are
1 through 32 inclusive.)  Thanks to TJ for reporting
this.

BTW, if anyone has a device which responds to this
old-style 'preset' (not extended preset) command and is
willing to run a few special tests, please email me at
'cwsulliv@triad.rr.com'. (X10 is not known to have ever
released any modules which responds to this command, but
it's used by some other manufacturers for things like 
thermostats.)

Known Bugs:
----------
The section of heyu2 code for the direct commands is not
yet fully merged with the code for uploading macros.
(And is by no means yet integrated with Daniel's changes
in heyu versions 1.34 and 1.35).  There are some direct
commands which are not yet available for uploaded macros,
but will be.  (There are some other direct commands which
cannot be programmed as uploadable macros - at least without
a kluge - but that's a limitation of the CM11A rather
than the code.)

During testing I discovered that standard X10 lamp 
modules do not respond to the 'lightsoff' (all_lights_off)
command.  I've tried both new and quite old (mid-1980s
vintage) modules with the same result.  Two-way modules
like the LM14A do respond to this command.
Both standard and two-way lamp modules respond to the 
'lightson' (all_lights_on) and 'alloff' (all_units_off)
commands.  So this would appear to be module hardware
bug/feature.

================================================

            Release Notes for Heyu2 Alpha-4
                    11/09/2003

The fourth heyu2 alpha release is now available for 
download on the Heyu website (http://heyu.tanj.com)
as 'heyu2.alpha-4.tgz'.

It will un-TAR into directory './heyu2.alpha-4.dir'
(which is different from the prior alphas).

*** Note: the man pages for heyu2 alpha have now been
given a '2' suffix so they won't overwrite Daniel's man
pages for heyu 1.35.  So when looking for info on
heyu2, run 'man heyu2', 'man x10config2', or 'man x10sched2'.
(Once heyu and heyu2 have been integrated as heyu version 2,
we will revert to the old names - I hope this doesn't cause
confusion for anyone.)  The configuration and schedule files
for heyu and heyu2 alpha have always been stored in different
locations so there's no conflict there.

As always, suggestions, feedback, and bug reports from users
are welcomed. Thanks in advance to our testers/users for
giving this release a thorough workout.

What's New:
----------
The command line and macro upload features of heyu2
have now been merged, so that all commands executable
from the command line are now also usable in uploaded
macros (to the extent the CM11A firmware supports these
commands in macros - for example, there's no way I know
of to make an uploaded CM11A macro send only addresses
without functions.)

SCENES and USERSYNS:
Heyu2 now supports scenes and usersyns (user-defined
synonyms).  A user can define a sequence of semicolon-
delimited commands as either a "scene" or a "usersyn"
in the configuration file, then execute the whole
sequence by entering the scene or usersyn label as if
it were a normal Heyu command.  Or the scene or
usersyn can be used in a macro in a schedule file.

There is currently no difference between scenes and
usersyns except the menus in which they appear when
the 'heyu2 show' command is run.  This will probably
change in the future, based on suggestions and
feedback from users.  Perhaps the use of dummy
parameters (see below) ought to be restricted to
usersyns, but that is a choice users can make
for themselves.

Both scenes and usersyns support the use of aliases
and dummy positional parameters, which are replaced
by actual parameters at the time of execution. 

Example: The user could define in the configuration
file:
  alias porch_light a1
  usersyn  blinker  on $1; off $1; on $1; off $1

and then enter at the command line either:
  heyu2  blinker a1
or
  heyu2  blinker porch_light

and watch the porch light blink on and off.

The rules for defining and using scenes and usersyns are
described in 'man x10config2'.

MACROS
Macros in a schedule file can now refer to aliases, as
well as to scenes and usersyns.  (The report.txt file
will continue to display the actual x10 commands and 
housecode|unit addresses.)

"SHOW" COMMAND
The new command 'heyu2 show [alias scene usersyn]' will
display aliases, scenes, and/or usersyns defined in
the user's config file.  This is more convenient than
pulling up the x10config file and searching it for
these entries.  

TEMPERATURE REPORTING
Having acquired a new toy, a TempLinc 1625 remote
thermometer, I added the capability for Heyu2 to
decode and display the temperature (encoded
in a Preset command) based on the conversion algorithm
used by the TempLinc.  (The RCS TX-15B thermostat 
uses the same encoding.)  See the description of
the config directive RCS_TEMPERATURE in 'man x10config2'
and of the command 'temp_req' in 'man heyu2'.

ADDRESS COMMAND
The heyu2 'address' command now supports sending 
multiple address bytes (housecodes can be mixed) at
a time. (I'm surprised no SwitchLinc users suggested
this improvement to the previous alpha release.
Is anyone bothering to try out these releases?)

MAN PAGES
The man pages heyu2(1), x10config2(5) and x10sched2(5)
have been updated.


What's fixed
------------
The installation script has been upgraded to 
hopefully reduce confusion, and also fix a bug
which omitted creation of the ~/.heyu directory.
Thanks to user Dave Crosby for reporting this
problem.

When a 'status' command was issued for some
SwitchLinc modules, Heyu2 was timing out before 
the status reply from the module could be reported
on the command line (although it appeared in the
Heyu2 monitor).  A config directive, STATUS_TIMEOUT
has been added to enable increasing this time from the
the default of 2 seconds.  Change it to 3 if 
necessary.  Thanks to Marko Ruokonen for reporting
this problem.

A bug with previous heyu2 ALPHA releases allowed
uploaded macros to be executed at the wrong time
under some circumstances.  This has now been fixed.
Thanks to user Steve Wallace for raising the issue.

An undocumented "feature" of the CM11A was discovered:
If the "start" and "stop" events within a given uploaded
timer have the same time, then the "stop" macro is
never executed.  Heyu2 now reassigns events between
timers necessary to prevent this situation.

The name displayed in the monitor when the function
All_Lights_On is received by the CM11A over the power
line has been changed from "All On" to All Lights On".
This is to avoid confusion with the Heyu2 command
'allon', which in fact does turn on all units, not
just lights.

The 'dimb' and 'brightb' command-line commands were
duplicating the address transmissions between the
'bright to 100%' and 'dim'/'bright' commands.  This
has been fixed.
(Note: the 'dimb' command-line command emulates the
native CM11A macro 'dim' command with the 'brighten
before dimming' bit set.  The 'brightb' command is
pretty much worthless, and is defined only because
it's native to the CM11A.)

==============================================

            Release Notes for Heyu2 Alpha-5
                    3/02/2004

The fifth heyu2 alpha release is now available for 
download on the Heyu website (http://heyu.tanj.com)
as 'heyu2.alpha-5.tgz'.

It will un-TAR into directory './heyu2.alpha-5.dir'
(which is different from the prior alphas).

*** Note: the man pages for heyu2 alpha have been
given a '2' suffix so they won't overwrite Daniel's man
pages for heyu 1.35.  So when looking for info on
heyu2, run 'man heyu2', 'man x10config2', 'man x10sched2',
and now, 'man x10scripts2'.
(Once heyu and heyu2 have been integrated as heyu version 2,
we will revert to the old names - I hope this doesn't cause
confusion for anyone.)  The configuration and schedule files
for heyu and heyu2 alpha have always been stored in different
locations so there's no conflict there.

As always, suggestions, feedback, and bug reports from users
are welcomed. Thanks in advance to our testers/users for
giving this release a thorough workout.


What's New:
----------
MAC OS X
Alpha support has been added for the Macintosh running OS X.
Thanks to user Tom S. for the information on how to get
this working.  See the notes at the bottom of the INSTALL
file.

STATE ENGINE
Heyu2 can now keep track of the state of the various
modules on the user's system with its "state engine",
a background process which is optionally started (or
restarted) by running 'heyu2 engine'. The attributes
of the specific modules on the user's system are
provided to Heyu by appending the model type to the
ALIAS directive for its housecode|unit in the configuration
file. See 'man x10config2' for a list of the supported
model types. (The default for unspecified model types is
the standard X10 Lamp Module.)

Whenever changes are made to the configuration file,
re-run 'heyu2 engine'.  This will stop and restart the
state engine with the changes incorporated.

SCRIPTS
The heyu2 state engine can launch scripts (or any Unix
commands) when it sees specific X10 signals, in a manner
similar to David Shaw's Xtend software but with many
enhancements.  There is however an option to create an
environment compatible with that used by Xtend.

There is also an option to run 'heyuhelper' in a manner
similar to heyu 1.35.  See the new man page
'man x10scripts2' (x10scripts2(5)) and the 'man x10config2'
configuration directive SCRIPT_MODE for details.

LOG FILE
If the user specifies a (writable) directory with the
directive LOGFILE_DIR in the configuration file, the
state engine will write the file 'heyu.log' there.  The
entries will be similar to those which appear in the
heyu2 monitor, with one addition: the log file will
have an entry when a script is launched.  The default
is to not write a log file.

Note that the log file will continue to grow.  Either
manually delete or truncate it from time to time, or
use 'logrotate' or the equivalent utility software
to manage it.

MONITOR
The heyu2 monitor now displays both sent and received
X10 signals in human-readable form. It also displays
the detailed X10 signals sent when an uploaded macro
is executed.  Sources of signals are identified with
the following codes:
  sndc  Sent from the heyu2 command line
  snds  Sent from the heyu2 command line when heyu2
        is executed by a script launched by the heyu2
        state engine.
  sndm  Sent from an uploaded macro executed by a Timer.
  sndt  Sent from an uploaded macro executed by a Trigger.
  rcvi  Received over the AC power line.
  rcvt  The trigger signal which executed the uploaded macro.

Note: A CM11A reports neither the details of a macro
execution nor the received trigger signal which executed it,
only the fact that a macro at EEPROM location XXX has been
executed.  Heyu2 saves a copy of the EEPROM memory image
as binary file "x10image" in the heyu2 base directory when
a schedule is uploaded to the CM11A, and from that determines
the detailed command info.

MONITOR FORMAT
Heyu2 alpha-5 no longer supports the two older display formats
in the monitor.  The directive NEWFORMAT is now obsolete and
is ignored (with a warning message) if encountered in the
configuration file.

SHOW COMMAND - changed
The heyu2 show command now has a lot more options, including
displaying the state of the system in various formats.
Run 'heyu2 show' with no parameters for a description of
the options.

COMMAND LINE OPTIONS
Users can now specify the pathnames of the configuration
and/or schedule files at the command line by using the
'-c <pathname>' and/or '-s <pathname>' options, if those
files are not in the standard places with the standard
filenames.

Also new are the command line options '-0' ... '-9'
which indicate to heyu2 that the configuration file
is to be found in subdirectory '/0' ... '/9' of the
standard places, e.g., $HOME/.heyu/3/x10config or
/etc/heyu/3/x10.conf.  So you can have quick access
to up to 10 different configuration files. (I hate
typing long pathnames.)  Note that these options are
incompatible with the '-c' option.
(The primary intended use for this option is in the
future, when heyu2 will have heyu version 1.35's
capability to simultaneously run multiple CM11As on
different serial ports.)

The config file pathname could in the past (and can still)
be specified with the X10CONFIG environment variable.
If the the config file is specified on the command line
with either the '-c' or '-0' ... '-9' options, its full
pathname is put back into the environment as X10CONFIG
when a script is launched by the state engine in case
that script needs to execute heyu2.

SCHEDULE FILES - configuration
A subset of the configuration directives can now be 
put into a schedule file by prefixing them with
the word 'config', e.g.,
  config  MODE COMPATIBLE
and will override those same directives (or their defaults)
in the configuration file when the schedule is uploaded.

The only directives which can be used in this manner are those
which govern how heyu2 processes the timer, trigger, and
macros in the schedule file to create the EEPROM image.
See 'man x10sched2' for a list.

This feature is intended for use if you frequently upload
different schedules requiring different configuration
directives.  Most users will want to forego this feature
and rely only on the directivies in the configuration file.

SCHEDULE FILES - timers
For testing a proposed schedule without having to
wait around all day, heyu2 will accept the word 'now'
or 'now+NN' in place of a clock time in a timer, where NN
is in minutes.  Heyu2 will replace 'now' with the current
system time rounded up to the next whole minute, with a
minimum of 15 seconds allowed for the actual uploading.
A message will alert you to the exact time the first
of these will occur.

(Once you're satisfied that the macros in the schedule
are doing what you expect, go back and change the 'now's
to the actual times.)

SCHEDULE FILES - duplicate timer or trigger warning.
Heyu will issue a warning message if duplicate timer
or trigger commands are found in a schedule file.

UPLOADED SCHEDULE - report.txt
The hexadecimal EEPROM addresses of uploaded timers,
triggers, and macros are now displayed in the report
('report.txt') generated when a schedule is uploaded.

A detailed summary of the EEPROM usage has been added
at the end of the report.

NEW COMMAND - "catchup"
This command will read the copy of the EEPROM image saved
in file 'x10image' when a schedule is uploaded and 
immediately execute in chronological order each macro
scheduled for execution between 00:00 hours and the current
system time on today's date.  This will put the modules in
your house in the same state as if you had uploaded the schedule
at 00:00 hours (Standard Time).  If your schedule is anything
like mine, there will be a lot of lights blinking on and off
as the macros are executed. :-) 

Included are any delayed macros which would be executed
before the current system time, but not those delayed macros
initiated by a timer but with an execution time delayed beyond
the current system time. "Security" events are executed
at their nominal times.

MAXIMUM LABEL LENGTH
The maximum length of all labels - aliases, macros, scenes,
scripts, etc., has now been set at 32 characters.

ACKNOWLEDGE HAILS
The heyu2 state engine daemon can be instructed to 
send a hail_ack whenever it receives a hail signal
over the power line.  Set config directive ACK_HAILS
to YES to enable this feature.

What's Fixed
------------
The previous version choked when mixed-case alias, scene,
or usersyn labels were used in the schedule file.

A check wasn't being made for maximum alias label length.

An error check for the LONGITUDE config directive was
buggy.

The configuration directive REPORT_PATH was erroneously
listed as REPORT_FILES in the man page x10config2(5).

Regards,
Charles Sullivan  (cwsulliv01@triad.rr.com)
==============================================

        Release notes for Heyu 2.0-Beta
                 01/02/2005

HEYU2 finally becomes HEYU Version 2.0 (Beta)

File heyu-2.0beta.tgz will un-TAR into directory
'heyu-2.0beta'.  (The '.dir' extension to the installation 
directory name used in prior heyu and heyu2 releases is being
omitted for consistancy with common Linux practice.)

Please note these IMPORTANT CHANGES if you are currently
running heyu 1.xx or heyu2:

1. A number of new environment variables have been added
for use by scripts.  In order to avoid possible confusion
with user aliases, the prefix used for alias environment
variables has been changed from the upper case "X10_" to
lower case "x10_". Thus if you've defined the alias:
  ALIAS porch_light A6
in your configuration file, the environment variable supplied
for heyu scripts will now be named "x10_porch_light" instead 
of "X10_porch_light".  The variable for the housecode|unit
itself (and other variables) will remain upper case, e.g.,
"X10_A6".

2. If you have been running heyu 1.xx or heyu2 on your
system, run 'heyu stop' or 'heyu2 stop' to terminate the
heyu_relay and/or heyu engine background processes before
installing heyu 2.0 Beta.

3. The names of the heyu executable and man pages no longer
have the '2' suffix.  Run 'heyu' instead of 'heyu2'. The man
pages are now heyu(1), x10config(5), x10sched(5), and
x10scripts(5).  If your script has been executing heyu2,
remember to change it to heyu.

What's New:
----------
MULTIPLE CM11A SUPPORT
Heyu version 2.0 supports simultaneous use of multiple CM11A's
(connected to different serial ports) on the same computer.

Except for communication over the AC power line, the operation
of each CM11A is independant of the others.  The configuration
file for each CM11A must be stored in a separate directory,
most conveniently in subdirectories ./0 through ./9 under
the usual $HOME/.heyu/ or /etc/heyu/ base directory. (Then
the specific CM11A can be accessed with the heyu command
line switch -0 through -9.)  Of course if you have only one
CM11A you can maintain the configuration file in the same
directory as previously.

The most noticeable difference for the average user
is that Heyu's log file now has an extension indicating
the serial port to which the CM11A is connected, e.g.,
"heyu.log.ttyS0".  Check the FILES section of manpage heyu(1)
for other filenames.


PRESET COMMAND FOR MACROS
The command 'mpreset' has been added which implements the
very limited (old-style) Preset Dim support for uploaded
macros by the CM11A's firmware.  Only two preset levels are
supported, and the specific level is inseparably linked to
the housecode, e.g., levels 7 and 23 are supported only on
housecode A and levels 6 and 22 are supported only on
housecode D.  (The two supported levels always differ by 16.)

This is obviously not a very flexible command but it's the
best we can do given the CM11A's firmware limitation, and
it may suffice for some situations when SwitchLinc and
other similar lamp modules don't respond reliably to the
standard dim or bright signals.  (The normal 'preset' command
doesn't have these limitations but is only available from
the Heyu command line.)

See the heyu(1) manpage for a table listing the supported
levels for each housecode.

TIMER OPTIONS
The user can now specify in the schedule file the clock time
limits for Dawn and/or Dusk within which any specific event
will be executed.  For example you may want a lamp to turn
ON at Dusk and OFF at 9 PM.  But if in the middle of the 
summer Dusk falls after 9 PM at your latitude, the lamp
would ordinarily stay on all night and through most of the
following day.  The new timer options allow you to specify
that neither event will be executed unless Dusk falls earlier
than 9 PM.  See manpage x10sched(5) for details.

Note: Users employing this new feature will usually want
to set the MIN_DAWN, MAX_DAWN, etc, directives in the
configuration file to OFF.

SCRIPT ENVIRONMENT
As mentioned above, environment variables for user-defined
aliases will have the lower case 'x10_' prefix.  The
configuration directive 'ENV_ALIAS_PREFIX UPPER' can be used
in the short term to revert to the previous behavior but
is deprecated.

A fairly complete set of calendar/clock environment
variables has been added, e.g., X10_Month, X10_Hour, etc.
See man page x10scripts(5) for the complete list.

Two new logical variables have been added:
  X10_isNightTime has the value TRUE if the time is between
    Dusk and the following Dawn.
  X10_isDarkTime has the value TRUE for times from 30 minutes
    after Dusk until 30 minutes before Dawn. (This default
    offset from Dusk and Dawn can be changed with the config
    file directive ISDARK_OFFSET.)

Either of these can be used in place of more cumbersome
expressions, e.g., (($X10_isNightTime)) can be used in place of
( (($X10_SysTime > $X10_DuskTime)) ||
                   (($X10_SysTime < $X10_DawnTime)) )

The variable X10_Expire contains the number of days before
expiration of an uploaded schedule, or an error code.
Its value is the same as would be obtained by running
'heyu upload cronstatus'.

EXPANDED SUPPORT FOR RCS THERMOSTATS
Heyu will now translate into human-readable form the other
status reports in addition to temperature available from
RCS 2-way thermostats, e.g. Fan On/Off.

What's Changed:
---------------
The DAWN_SUBSTITUTE and DUSK_SUBSTITUTE configuration
directives have been obsoleted and will be ignored if
encountered in the config file.  They didn't actually work
as intended anyway.  Instead, heyu creates a ficticious
Dawn and/or Dusk when necessary for polar latitudes, at
the hours 00:01 or 23:58 as the situation dictates.

What's Fixed:
-------------
A few bugs in heyu2.alpha-5.0 (which were fixed in the
interim releases alpha-5.1 and 5.2.)

Added the state file pathname to the error message 
displayed when that file cannot be opened by heyu.

When a script is launched, the heyu engine would
previously create an alias environment variable only
for the first instance of a multiply-defined alias
for a specific housecode|unit.  Now it will create
a separate variable for each instance.

The code for launching scripts was revised to avoid
leaving zombie processes under NETBSD and probably
other systems.  Thanks to Ari Reen for spotting this
and supplying the patch.

An array overflow resulted in the wrong starting date
for uploaded schedules. This became evident only for
some compilers.  Thanks to Will McCown for identifying
the problem an supplying the patch.

Updated man pages.

Regards,
Charles Sullivan

==============================================

         Release notes for Heyu 2.0-Beta.2
                 01/13/2005
               (Bugfix Release)

File heyu-2.0beta.2.tgz will un-TAR into directory
heyu-2.0beta.2

What's Fixed:
-------------
A missing declaration for variable 'envp' resulted 
in a fatal compilation error on non-POSIX systems.
Thanks to Charlie Murray for reporting this.

An error message was not displayed when the general
extended code 'xfunc' command was issued without
specifying a unit code with the housecode. (heyu
would return normally but no code was transmitted.)

The (new) command 'rcs_req' wasn't recognized as a
valid heyu command.

Under some circumstances heyu could attempt to
display the individual commands comprising a timed
or triggered macro in the monitor using the wrong
x10image file for reference (usually resulting in
many screens full of gibberish commands).

Incorrect checksums were displayed in the monitor
when a schedule was being uploaded.

Fixed 'target' module REMOTE6 (and added REMOTE4).
See man config(5) for new info on these.

==============================================

         Release notes for Heyu 2.0-Beta.3
This was a private release.  Changes are included
in the release note for Beta.4

==============================================

         Release notes for Heyu 2.0-Beta.4
                 01/20/2006

File heyu-2.0beta.4.tgz will un-TAR into directory
heyu-2.0beta.4

What's Changed:
---------------
The heyu spoolfile and statefile are now maintained in
subdirectory 'heyu' of their previous location.  E.g., for
Linux in /var/tmp/heyu/ instead of /var/tmp/

The heyu executable is installed with group ownership
'root' instead of 'sys'.

The various Heyu state commands, e.g., onstate, dimstate,
etc., formerly (and usually unnecessarily) updated the state
file on the hard drive each time they were called.  Since
the state file is automatically updated whenever an X10
function signal is sent or received, there was no need to
do this under most circumstances.  So it's no longer done
_except_ for state or show commands which return a value which
includes the addressed state of a module or modules, to wit:
the 'addrstate', 'heyu_state', 'xtend_state' 'show housemap H',
and 'show others' commands.  A new configuration directive,
"AUTOFETCH NO", allows the update to be disabled for these
commands also, and a new command 'fetchstate' allows manually
updating the state file if necessary.
(Some users are interrogating Heyu hundreds or thousands
of times a day for state information, thus causing the spool
file to rapidly reach its maximum size.  Most users should
not have to be concerned.)

The state commands 'onstate', 'dimstate', 'chgstate', and 
'addrstate' have been changed.  They now display only 1 or 0
when entered with a housecode|unit instead of the "heyuhelper"
style token. When entered with only the housecode, they display
a decimal integer which is a bitmap for all 16 units on that
housecode.  (For compatibility, the configuration directive
"STATE_FORMAT OLD" allows reverting to the previous behavior.)

Removed SIREN module type, which cannot be adequately
modeled due to multi-command and timing issues.

The delay time for macro definitions in schedule files
may optionally be omitted if it is zero.

Keywords and day-of-week mask in schedule files are
now case-insensitive, e.g., TIMER, timer, tiMer are
now equally acceptable.

The internal code for starting or restarting the Heyu state
engine with the 'heyu engine' command has been simplified.
A noticeable difference is that the state engine daemon will
now appear in the process table as 'heyu engine' rather
than 'heyu monitor -engine'.

Found (to my chagrin) that standard X10 wall switch dimmers
do in fact respond to the lightsoff (All_Lights_Off) command
even though standard plug-in lamp modules don't.  The note
in the Heyu help menu has been revised.

What's New:
-----------
Added optional support for the X-10 CM17A "Firecracker", a
small serial dongle which can transmit X10 commands via RF
to a transceiver plugged into your power line.  The CM17A
and CM11A coexist on the same serial port - no additional
serial port is required.  Some Heyu users may find this
useful for actuating modules on a branch of their power line
when there's not a good signal path from the CM11A.
See the new man page x10cm17a(5) for details.

(Note: The CM17A is only available in North America.  There
is no equivalent device which operates at RF frequencies
used for X10 transceivers in other parts of the world and
a compile option is available to compile Heyu without
CM17A support.  See the file INSTALL in the distribution
directory.)

Added REMOTE3 'target' module type.

Added AMEXC4, AMEXC8, and AMEXC16 module types for
appliance-type modules with exclusive addressing, such as
X10's camera power supplies and the WGL Rain8 irrigation
controller. (An on command to these modules turns On only the
last unit addressed within its group of 4, 8, or 16 units,
e.g., 1-4, 5-8, 9-16, while all other modules of the same
module type within the same group on the same housecode turn
themselves Off.)

Added LM15A module type for the X-10 Socket Rocket, a screw-in
lamp module which has no dimming capability.

Added module type WS/StdWS/WS467 for X10 wall switches which 
support the lightsoff (All_Lights_Off) command.

Added command 'logmsg' to add a time-stamped user
comment to the Heyu log file and monitor screen.  This
is primarily intended for making notes while testing
and may or may not play well if executed in the midst
of heavy X10 activity.

Added command 'readclock' to display the date and time
from both the CM11A and System clocks in an easy-to-compare
format.

Added built-in support for the CM10A interface, an early
version of the IBM Home Director without clock or battery
backup.  (Support is limited to direct commands - uploaded
trigger macros are not supported.) See man page heyu(1) and
directive TTY in x10config(5) for configuration instructions.

Some purists have argued that the usual definitions of Dawn
and Dusk are not Sunrise and Sunset.  So a configuration file
option has been added to globally change the definitions
of Dawn and Dusk from the default Sunrise and Sunset
to the times of Civil, Nautical, or Astronomical Twilight.
See directive DAWNDUSK_DEF in man page x10config(5).  The
'heyu utility suntable' command has options to tabulate
any of these times in an appropriately named file.

The state table now also maintains a cumulative ("sticky")
map of X10 housecode|unit addresses received over the power line.
The map is displayed with the command 'heyu show o[thers]'
and cleared only after either the command 'heyu initothers'
or 'heyu initstate'.  This may be useful for distinguishing
whether unexpected lighting or appliance activity is caused
by actual X10 signals (e.g., from a neighbor's house) or by
the effect on modules of random noise or spikes on the power
line.

Added state command 'heyu statestr H' to display the complete
state for all units in a housecode as a 16 character ASCII
string.  Each character in the string is a hexadecimal digit
which is a mini-bitmap with bits indicating the On, Dimmed,
Changed, and Addressed states of the corresponding unit.

Documented some new and some heretofore undocumented old
commands and configuration directives in the heyu(1) and
x10config(5) man pages, in sections near the end labeled
"EXPERIMENTAL STUFF".

What's Fixed:
-------------
The buffer size for some pathnames was too short,
possibly causing a crash on some non-Linux systems.

An empty command in a scene or usersyn could
cause a crash. Thanks to Neil Tiffin for reporting
this.

An unwritable log directory caused the Heyu engine
to crash.  Heyu now checks for this.  Thanks to user
Ben for reporting this problem.

==============================================

         Release notes for Heyu 2.0beta.5
                 02/23/2006

File heyu-2.0beta.5.tgz will un-TAR into directory
heyu-2.0beta.5

Reminder: When upgrading from a previous release of
Heyu, be sure to run 'heyu stop' with the previous
release before installing the newer release.

What's Changed:
---------------
The lock directory for FreeBSD has been changed from
the default /var/lock to /var/spool/lock at the request of 
Michael Stowe, the Heyu port maintainer for FreeBSD.

For compatibility with other software (e.g., minicom),
the <tty> suffix for Heyu lock, spool, and state file
names for multi-level device names now uses just the last 
component of the name.  E.g., the lock file for device
/dev/usb/ttyUSB0 is now LCK..ttyUSB0 instead of the
previous LCK..usb.ttyUSB0

What's Fixed:
-------------
Compilation of Heyu with GCC 4.0.2 under FC 4 generated
a large number of compiler warnings about "signedness".
Although the warnings appear to be harmless, the code
was fixed to eliminate them.  Thanks to Richard Millard
for reporting this problem.

What's New:
-----------
Added the command 'heyu wait' to allow determining when
execution of an uploaded macro by the CM11A has been
completed.

==============================================

         Release notes for Heyu 2.0beta.6.1
                 07/10/2006

File heyu-2.0beta.6.1.tgz will un-TAR into directory
./heyu-2.0beta.6.1

Note: 2.0beta.6 was replaced to fix a minor bug which
showed up within about 10 minutes after its release
on the website.

What's New:
-----------
Added 16 software boolean flags (numbered 1-16) to the
state table which can be set or cleared with the new
'heyu setflag n[,n...]' and 'heyu clrflag n[,n...]'
commands.  Tests for these flags can be included in the
launch conditions to determine whether a script or shell
command is to be launched by the Heyu state engine daemon.
The values of the flags are also included as environment
variables provided when scripts are launched by the Heyu
state engine daemon.  See man page x10scripts(5) for
details.

Also added are the commands 'heyu flagstate n' for testing
a flag by an external script and 'heyu show flags' for a
human-readable display of all 16 flags.

Added a special "status-pending" software flag for each
unit. This flag is automatically set by a status or
xstatus command and reset when the StatusOn, StatusOff,
or xStatusAck signal is returned by a 2-way module.
(A flag which remains set for a 2-way module after the
expected response time is an indication that something
has gone wrong, like a tripped circuit breaker perhaps.)
A new state command 'heyu statusstate H[u]' will return the
state(s) of the status-pending flag(s) and the direct
command 'heyu clrstatus H[U]' will reset them if necessary.

A new state command 'heyu enginestate' can be used by
external scripts to determine whether the state engine
daemon is running.

The Heyu state engine daemon now has the added capability
of launching scripts under two new types of launch
conditions: the first when only an address signal is
encountered; the second when the CM11A reports an
interruption of AC power.  See the information about
"ADDRESS" scripts and "POWERFAIL" scripts in man pages
x10config(5) and x10scripts(5) for details and options.
X10 signals sent by powerfail scripts are identified in
the monitor and log file as having source SNDP.  The
address-only launch conditions were requested by user
simon_seys2000.

Added extended code type 0 commands for shutters and
shades and the module type SHUTTER (SW10) to track these
commands.  Although Marmitek keeps it a secret, these
commands are supported at least in part by their SW10
Shutter Controller.  Since this module is available only
for 230 Volt, 50 Hz operation and no other module is
known to support the extended type 0 commands, an option
is available to compile Heyu without support for these
commands or module type.  See the file INSTALL in the
distribution directory. (I don't own or have personal
access to one of these controllers, so this support must
be considered "Alpha".)

Added an option for Heyu RF commands sent by the CM17A
enabling them to be transceived by the TM751 and RR501
without affecting the built-in appliance module switch.
(If you are using these devices strictly as transceivers
with nothing connected to this switch and are disturbed
by the audible 'click' of the switch, you'll appreciate
this option.)  Note: Whereas the TM751 switch responds
only to RF signals, the RR501 switch also responds to
powerline signals - this option does not affect its
response to powerline signals.  See the RF_NOSWITCH
directive in man page x10config(5) for details.

Added the direct command 'xpowerup' which is the
extended code signal sent by X-10 2-way modules like the
LM14A when AC power to them is first applied or has
been interrupted for more than a few seconds.  There's
usually little need to ever send this command - its
primary reason for existance in Heyu is so that the
function can be used in the launch conditions for normal
scripts. (Use of this command in normal scripts is
unrelated to powerfail scripts.)

When a script is launched, the log file normally displays
the script label and the command line which is executed.
With a new script option '-quiet', only the script label
is displayed.  This is useful if you have a frequently-
executed very long command line which tends to clutter up
the log file.

For lamp and shutter module types which have a memory,
i.e., support a "resume" or "onlevel" or "limit" feature,
new state commands 'heyu memlevel Hu' and 'heyu
rawmemlevel Hu' can be used to recover the "remembered"
percent brightness and native levels which Heyu stores in
the state table for these module types.  This command is
intended primarily for testing purposes.

Added keyword "SECTION" which can be used in both schedule
and configuration files.  Lines beginning with this keyword
are like comment lines and totally ignored by Heyu.  The use
to which this feature is put is completely up to the user.

Added command 'heyu trigger Hu on|off' which emulates a
trigger signal received over the powerline.  Using the
files x10image and x10macroxref saved when a schedule is 
uploaded, Heyu looks up the commands which would be executed
from the CM11A memory if an actual powerline trigger were
received and immediately executes them as direct commands.

What's Changed:
---------------
Code changes were made to resolve a specific CM11A
quirk which resulted in "Poll received unknown value ..."
messages appearing in the monitor and log file. Note
however that these messages can appear for reasons 
other than this particular quirk (or bug perhaps - it isn't
well understood).

The 'heyu show launchers' display format has been revised
to make it easier to see more than one launcher on the
screen at a time.  And it can now be run without 
specifying a housecode and will display all the 
launchers defined in the configuration file, including
powerfail launchers.

The state file (a binary table of the On/Off/Dim
states of modules) has been moved into the Heyu base 
directory (either home or system-wide) and renamed
'x10state'.  (It was previously named heyu.state.<tty>
and maintained in the spool directory, SPOOLDIR.)

The Heyu state engine daemon will now appear in the
process status table ('ps aux') as 'heyu_engine' instead
of 'heyu engine'.

FreeBSD - Changed the Heyu system-wide base directory
for this OS from /etc/heyu to /usr/local/etc/heyu as
requested by Michael Stowe, the Heyu port maintainer
for FreeBSD.

The 'heyu list' command will now additionally display the
definition of the system-wide base directory (SYSBASEDIR)
as compiled into Heyu.  (Its appearance does not imply
the directory necessarily exists or the configuration file
is necessarily located there instead of in the home base
directory - that's strictly up to the user.)

The term "Legal Time" in man pages and when displayed on
the screen has been changed to the more familiar "Civil Time".
Both were/are intended to be synonymous with wall-clock
time, i.e., reflecting periods of Daylight Time
(AKA Summer Time).  Despite the terminology change, Heyu
continues to maintain the CM11A clock on Standard Time
throughout the year and merely adjusts the displayed
times during periods of Daylight Time.

The Dawn/Dusk table generated by 'heyu utility suntable'
has been changed by default to a more convenient 80 column
format and the times are displayed as Civil Time instead
of the previous Standard Time throughout the year.
The versions with Standard Time and wide format remains
available with suntable switches -s and -w respectively.  
 
What's Fixed:
-------------
Scripts were not being launched when the signal source
was SNDS (sent by a script launched by the Heyu state 
engine daemon).  Thanks to user Jean-Charles Pernot for
reporting this bug.

Heyu was erroneously attempting to interpret macro
commands when an "_Unknown_" macro was reported by the
CM11A, usually resulting in many lines of false 'sndm'
or 'sndt' messages in the monitor and log file.  Thanks to
user Fred Foss for bringing this problem to light.

Added note to the x10config(5) man page that an ALIAS
directive in the configuration file must be defined before
any other directive (SCENE, USERSYN, SCRIPT, etc.) which
references that alias in place of a Housecode|Unit
address.

The module type LM15A for the X-10 "Socket Rocket" did not
correctly model this device's response to all_lights_on
or all_lights_off commands.

The module types for the X-10 camera power supplies
included a response to the all_units_off command, which
these supplies do not support.

Fixed some problems with the CM10A (IBM HD16) controller
initialization. Many thanks to user Steve Sykes for
donating his old HD16 to the Heyu project so that the
code could be properly debugged.

The 'heyu stop' command would fail if there were errors in
the configuration file.  This command now searches the
file only for the directives it needs for the task.

The first address or function sent following a 'heyu wait'
command was being ignored by the CM11A.

Heyu would crash once the spool file reached a certain
large size limit.  The spool file size will now be
checked during idle periods and the file rewound if the
limit is reached.  For testing purposes, the default
size limit of 1000000 bytes can be changed with the
configuration file directive SPOOLFILE_MAX.  (For changes
in this directive to become effective, Heyu must be
stopped and restarted).

Heyu would previously double-count sent dim commands for
certain combinations of housecode and dim level. 

If timer options resulted in no timers at all, Heyu was
not skipping these timers.  Additionally, skipped timers
were not correctly listed in the report.txt file.  Thanks
to user Doug Latornell for reporting this problem.

Blocks of EEPROM memory with checksum 0x5A were not being
uploaded correctly. Thanks to Fred Foss and Gary Toth for
submitting config and schedule files which allowed
reproducing this problem on my system.

==============================================

         Release notes for Heyu 2.0beta.6.2
                 07/22/2006

File heyu-2.0beta.6.2.tgz will un-TAR into directory
./heyu-2.0beta.6.2

What's Fixed:
-------------
When the configuration file contained an error, the
error message erroneously indicated that the pathname
of the configuration file was that of the state file.

Heyu would flag an error if an ALIAS label contained
the hyphen ('-') character.  (An ALIAS label may not
_begin_ with a hyphen but it's allowed within the
label string.) Thanks to K. McWhirter for reporting
this and the previous bug.

Compilation of the file x10state.c failed under some
non-Linux operating systems, notably FreeBSD.  Thanks
to Michael Stowe for reporting this.

Heyu wasn't properly reorganizing the timers in a
schedule, possibly resulting in the assigned daily
times of Dawn or Dusk differing by a few minutes for
different timer events in the same schedule.  (This
bug was fixed in Heyu 2.0beta.6.1 but with no explanation
in the release notes.)

==============================================
