UPS Daemon 0.9d for eComStation (Test Version)

Please read this entire document to understand
the function of UPS Daemon.

This version of UPS Daemon is for contact closure
type interfaces and supports UPS like APC (simple
signaling), Belkin, Tripplite, IBM, CyberPower, etc.

NOTE: You must determine the proper command line
switches before running UPSDAEM.EXE. Improper
switches may start a system shutdown within 20
seconds. If that happens, UPSDAEM.EXE can be
terminated by pressing CTRL Q.


Contents:

1. Installation
2. UPS Daemon Command Line Switches
3. UPS Daemon Log File
4. CAUTION
5. Running UPS Daemon
6. Displaying UPS Status - UPSCONFIG.EXE
7. Legal
8. Contact
9. History


1. Installation

Copy the files to any new folder on your system.
Run UPSDAEM.EXE and UPSCONFIG.EXE from the open
folder. Once proper command line options have
been determined, UPSDaem.exe can be run from
the Start-up folder. Use the session properties
of UPSDaem.exe to enable "Start Minimized"
and "Close window on exit".

An installation program will be added later on.


2. UPS Daemon Command Line Switches

UPSDAEM.EXE [-comx] [-ACfn] [-LBn] [-SDn] [-NoLog] [-OFF] [-Zxxx] [-X]

-comx  x = 2-5 (COM2 through COM5; default if omitted is COM1)
-ACfn  AC Fail polarity is negative (default = positive)
-LBn   Low Battery polarity is negative (default = positive)
-SDn   UPS Shutdown polarity is negative (default = positive)
-NOLOG Turn UPS event log off (default = on)
-OFF   Turns UPS off after shutdown (default is no UPS turn off)
       Some UPS may immediately turn off after UPS Shutdown signal
       is activated. This will interfere with OS shutdown. Use this
       option to prevent UPS turn off.
-Zxxx  Timed shutdown after AC Fail detect. Starts count down for
       shutdown. If a low battery signal is detected, shut down
       will be activated within 6 seconds provided the count down
       hasn't reached less than 10 seconds.
       If xxx is omitted or zero, then the shutdown delay is 20 seconds.
       If xxx is between 1 and 600 then the shutdown delay is the
       given value in seconds.
-Uxx   Time delay at startup. Will wait xx seconds before connecting
       to serial port on start-up. The delay value xx may be set
       anywhere from zero to 30 seconds.
-ES    Use this option for APC Back-UPS ES models only.
-X     Don't shutdown operating system. To be used for testing only
       AND computer power is NOT connected to UPS outlets.
-H     shows help (/H is not implemented).

Command line switches are case insensitive. You may use - or / as
option separator.

Pressing CTRL Q will quit UPS Daemon.


Timing Details:

UPSDAEM UPS status polling rate:
every 5 seconds when no AC Fail. Every 1 second during AC Fail.

Timed shutdown:
20 seconds after AC Fail has been detected and no -Zxxx
option given. Should a low battery alarm be detected during
AC fail, then UPSDAEM will shut down system within 6 seconds.

AC Fail then Low Battery alarm to shutdown (no -Zxxx option): 10 seconds.

UPSCONFIG polling rate of UPSDAEM status: every 4 seconds


3. UPS Daemon Log File

UPSMON.LOG located where upsdaem.exe is running at. It's a plain
text file. This log is not checked for size and continues growing
until manually deleted.


4. CAUTION

NOTE: You must determine the proper command line
switches before running UPSDAEM.EXE. Improper
switches may start a system shutdown within 20
seconds. If that happens, terminate UPSDAEM.EXE by
pressing CTRL Q.


5. Running UPS Daemon

By default, the UPSDAEM.EXE selects positive AC Fail
and positive Low Battery polarity. This prevents
the UPSDAEM.EXE from activating shutdown when
started into an unconnected serial port.

Most UPS require negative AC Fail and Low Battery
polarity. Make sure the UPS is properly connected
to the serial port and powered up before running
UPS Daemon with the negative polarities.

UPSDAEM.EXE is a VIO program handling all interfacing
to the UPS. UPSDaem.exe can be run from the Start-up
folder once the proper command line switches have been
determined. Use the session properties of UPSDaem.exe
to enable "Start Minimized" and "Close window on exit".

UPS Daemon needs to know your UPS signal polarity. This is
a manual process and can't be done automatically because
of the simple nature of the interface. You can use
UPSCONFIG.EXE to find out the correct command line parameters.
First, connect your UPS to a free serial port. Then simply
run UPSDAEM.EXE -COMx where -COMx is the serial port you
have the UPS connected to (i.e. UPSDAEM -COM2). If UPS
Daemon displays "Power failure detected" terminate it by
pressing CTRL Q. Add -ACfn to the UPSDAEM.EXE command line
(i.e. upsdaem -COM2 -ACfn). Run UPSDAEM.EXE again and no
power failure should be detected.

If you get a "Low battery alarm" at this point, add -LBn
to the command line of UPSDAEM.EXE.

Once you get no power failure or low battery alarm, it is
time to test the UPS for real. Pull the plug on the UPS and
check if UPSDAEM.EXE reports a power failure. This will take up
to 5 seconds to detect. If a power failure is detected, plug the
UPS in again. You are done!

If no power failure is detected, your UPS may not be supported.

Test shutdown by unplugging the UPS for 20 seconds.
UPS Daemon will shut down the operating system.
Inspect the UPSMON.LOG with a text editor for entries.


6. Displaying UPS Status - UPSCONFIG.EXE

This GUI program lets you select various command line
options and then starts UPSDAEM to test them. If
UPSDAEM is already running, UPSCONFIG will stop
and restart it with the new settings.

The selected command line parameters are displayed
in the text box and can be highlighted and copied
to the clipboard. (Use CTRL-INS to copy,
SHIFT-INS to paste)

UPS line and battery status is displayed with
this program as well.

All *.dat files contain preconfigured and tested settings for
certain UPS models. Use File - Open UPS Configuration
to select from different models. When UPSCONFIG is closed,
the chosen settings will automatically be saved to the file
default.dat and be reloaded the next time UPSCONFIG is used.

New icons have been added. Only upsdaem.ico is currently used
as the main program icon. Others can be used to indicate
AC fail, low battery, error or shutdown with your own program.


7. Legal

UPSDAEM.EXE and UPSCONFIG.EXE are copyright
2004 by Lone Peak Automation, LLC.

UPSDAEM.EXE and UPSCONFIG.EXE are programs under development.

Tests with these programs have been successfully completed on
a limited amount of hardware platforms and software configurations.
However, we do not guarantee proper operation on all possible
configurations UPSDAEM.EXE and UPSCONFIG.EXE can run on.
You assume responsibility on your own when you use these programs
and they should cause damage to data, equipment or personnel.


UPSDAEM.EXE and UPSCONFIG.EXE are currently freeware and may be
used at no charge (surprise!).

All icons are provided by Eugene Gorbunoff.


8. Contact

Email: LPAInfo@att.net
Website: http://home.att.net/~LPAInfo/upsmonitor.html

Include upsdaem log file, UPS brand and model when reporting errors.


9. History

March 8, 2004  0.9   Initial test release.

June 15, 2004  0.9d  Fixed crash when started from Start-up folder.
                     Added icons.

