nut/docs/man/genericups.txt

383 lines
12 KiB
Text
Raw Permalink Normal View History

2011-01-26 09:35:08 +00:00
GENERICUPS(8)
=============
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
NAME
----
genericups - Driver for contact-closure UPS equipment
NOTE
----
2010-03-25 23:20:59 +00:00
This man page only documents the specific features of the genericups
2011-01-26 09:35:08 +00:00
driver. For information about the core driver, see linkman:nutupsdrv[8].
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
SUPPORTED HARDWARE
------------------
2010-03-25 23:20:59 +00:00
This driver supports hardware from many different manufacturers as it only
uses the very simplest of signaling schemes. Contact closure refers to a
kind of interface where basic high/low signals are provided to indicate
status. This kind of UPS can only report line power and battery status.
This means that you will only get the essentials in ups.status: OL, OB,
and LB. Anything else requires a smarter UPS.
2011-01-26 09:35:08 +00:00
CABLING
-------
2010-03-25 23:20:59 +00:00
Cabling is different for every kind of UPS. See the table below for
information on what is known to work with a given UPS type.
2011-01-26 09:35:08 +00:00
EXTRA ARGUMENTS
---------------
This driver supports the following settings in the linkman:ups.conf[5]:
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
upstype='type'::
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Required. Configures the driver for a specific kind of UPS. See the
<<_ups_types,UPS Types>> section below for more information on which entries
are available.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
mfr='string'::
2010-03-25 23:20:59 +00:00
Optional. The very nature of a generic UPS driver sometimes means that
the stock manufacturer data has no relation to the actual hardware that is
2011-01-26 09:35:08 +00:00
attached. With the `mfr` setting, you can change the value that is seen by
2010-03-25 23:20:59 +00:00
clients that monitor this UPS.
2011-01-26 09:35:08 +00:00
model='string'::
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Optional. This is like `mfr` above, but it overrides the model string
2010-03-25 23:20:59 +00:00
instead.
2011-01-26 09:35:08 +00:00
serial='string'::
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Optional. This is like `mfr` above and intended to record the identification
string of the UPS. It is titled "serial" because usually this string is
2010-03-25 23:20:59 +00:00
referred to as the serial number.
2011-01-26 09:35:08 +00:00
sdtime='value'::
2010-03-25 23:20:59 +00:00
Optional. The driver will sleep for this many seconds after setting the
shutdown signal. This is necessary for some hardware which requires a
sustained level to activate the shutdown sequence.
2011-01-26 09:35:08 +00:00
+
2010-03-25 23:20:59 +00:00
The default behavior of the driver is to exit immediately. If this
doesn't reliably trigger a shutdown in your UPS hardware, use this
setting to give it more time to react.
2011-01-26 09:35:08 +00:00
NOTE: very large values for +sdtime+ may create warnings from upsdrvctl if
2010-03-25 23:20:59 +00:00
it gets tired of waiting for the driver to return.
2011-01-26 09:35:08 +00:00
CUSTOM CONFIGURATIONS
---------------------
2010-03-25 23:20:59 +00:00
You may override the values for CP, OL, LB, and SD by defining them in
2011-01-26 09:35:08 +00:00
the linkman:ups.conf[5] after the upstype setting.
2010-03-25 23:20:59 +00:00
For example, to set the cable power to DTR and the low battery value to
DCD, it would look like this:
CP = DTR
LB = DCD
Recognized values for input lines are CTS, DCD, and RNG. Recognized
values for output lines are DTR, RTS, and ST. See below for more about
what these signals mean.
2011-01-26 09:35:08 +00:00
These values may be negated for active low signals. That is, "LB=-DCD"
2010-03-25 23:20:59 +00:00
recognizes a low battery condition when DCD is not held high.
2011-01-26 09:35:08 +00:00
TYPE INFORMATION
----------------
2010-03-25 23:20:59 +00:00
The essence of a UPS definition in this driver is how it uses the serial
lines that are available. These are the abbreviations you will see below:
2011-01-26 09:35:08 +00:00
OL:: On line (no power failure) (opposite of OB - on battery)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
LB:: Low battery
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
SD:: Shutdown load
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
CP:: Cable power (must be present for cable to have valid reading)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
CTS:: Clear to Send. Received from the UPS.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
RTS:: Ready to Send. Sent by the PC.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
DCD:: Data Carrier Detect. Received from the UPS.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
RNG:: Ring indicate. Received from the UPS.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
DTR:: Data Terminal Ready. Sent by the PC.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
ST:: Send a BREAK on the transmit data line
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
A "-" in front of a signal name (like -RNG) means that the indicated
condition is signaled with an active low signal. For example, [LB=-RNG]
2010-03-25 23:20:59 +00:00
means the battery is low when the ring indicate line goes low, and that
the battery is OK when that line is held high.
2011-01-26 09:35:08 +00:00
UPS TYPES
---------
2010-03-25 23:20:59 +00:00
0 = UPSonic LAN Saver 600
2011-01-26 09:35:08 +00:00
[CP=DTR+RTS] [OL=-CTS] [LB=DCD] [SD=DTR]
1 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0095A/C cable
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=-RNG] [LB=DCD] [SD=RTS]
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
2 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0020B cable
[CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR+RTS]
Type 2 has also been reported to work with the 940-0020C cable.
2010-03-25 23:20:59 +00:00
3 = PowerTech Comp1000 with DTR cable power
2011-01-26 09:35:08 +00:00
2010-03-25 23:20:59 +00:00
[CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS]
4 = Generic RUPS Model
2011-01-26 09:35:08 +00:00
[CP=RTS] [OL=CTS] [LB=-DCD] [SD=-RTS]
5 = Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable)
[CP=DTR] [OL=CTS] [LB=-DCD] [SD=DTR+RTS]
2010-03-25 23:20:59 +00:00
6 = Best Patriot with INT51 cable
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS]
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
7 = CyberPower Power99
Also Upsonic Power Guardian PG-500, Belkin Belkin Home Office,
2013-11-24 15:00:12 +00:00
F6H350-SER, F6H500-SER, F6H650-SER, Eaton Management Card Contact - Config3
with cable 66033 (shutdown does not work)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
[CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]
2010-03-25 23:20:59 +00:00
8 = Nitram Elite 500
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=CTS] [LB=-DCD] [SD=???]
9 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0023A cable
[CP=none] [OL=-DCD] [LB=CTS] [SD=RTS]
2010-03-25 23:20:59 +00:00
10 = Victron Lite with crack cable
2011-01-26 09:35:08 +00:00
[CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]
2010-03-25 23:20:59 +00:00
11 = Powerware 3115
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=-CTS] [LB=-DCD] [SD=ST]
12 = APC Back-UPS Office with 940-0119A cable
[CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR]
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
13 = RPT Repoteck RPT-800A/RPT-162A
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
[CP=DTR+RTS] [OL=DCD] [LB=-CTS] [SD=ST]
14 = Online P-series
[CP=DTR] [OL=DCD] [LB=-CTS] [SD=RTS]
2010-03-25 23:20:59 +00:00
15 = Powerware 5119, 5125
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=CTS] [LB=-DCD] [SD=ST]
2010-03-25 23:20:59 +00:00
16 = Nitram Elite 2002
2011-01-26 09:35:08 +00:00
[CP=DTR+RTS] [OL=CTS] [LB=-DCD] [SD=???]
2010-03-25 23:20:59 +00:00
17 = PowerKinetics 9001
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=CTS] [LB=-DCD] [SD=???]
2010-03-25 23:20:59 +00:00
18 = TrippLite Omni 450LAN with Martin's cabling
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=CTS] [LB=DCD] [SD=none]
2010-03-25 23:20:59 +00:00
19 = Fideltronic Ares Series
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS]
2010-03-25 23:20:59 +00:00
20 = Powerware 5119 RM
2011-01-26 09:35:08 +00:00
[CP=DTR] [OL=-CTS] [LB=DCD] [SD=ST]
2010-03-25 23:20:59 +00:00
Check docs/cables/powerware.txt
21 = Generic RUPS 2000 (Megatec M2501 cable)
2011-01-26 09:35:08 +00:00
[CP=RTS] [OL=CTS] [LB=-DCD] [SD=RTS+DTR]
2010-03-25 23:20:59 +00:00
22 = Gamatronic All models with alarm interface
2011-01-26 09:35:08 +00:00
(also CyberPower SL series)
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
[CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
SIMILAR MODELS
--------------
2010-03-25 23:20:59 +00:00
Many different UPS companies make models with similar interfaces. The
RUPS cable seems to be especially popular in the "power strip" variety of
UPS found in office supply stores. If your UPS works with an entry in the
table above, but the model or manufacturer information don't match,
don't despair. You can fix that easily by using the mfr and model
2011-01-26 09:35:08 +00:00
variables documented above in your linkman:ups.conf[5].
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
TESTING COMPATIBILITY
---------------------
2010-03-25 23:20:59 +00:00
If your UPS isn't listed above, you can try going through the list until
you find one that works. There is a lot of cable and interface reuse in
the UPS world, and you may find a match.
To do this, first make sure nothing important is plugged into the
outlets on the UPS, as you may inadvertently switch it off. Definitely
make sure that the computer you're using is not plugged into that UPS.
Plug in something small like a lamp so you know when power is being
supplied to the outlets.
Now, you can either attempt to make an educated guess based on the
documentation your manufacturer has provided (if any), or just start
going down the list.
Step 1
2011-01-26 09:35:08 +00:00
~~~~~~
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Pick a driver to try from the list (genericups -h) and go to step 2.
2010-03-25 23:20:59 +00:00
Step 2
2011-01-26 09:35:08 +00:00
~~~~~~
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Start the driver with the type you want to try -
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
genericups -x upstype=n /dev/port
2010-03-25 23:20:59 +00:00
Let upsd sync up (watch the syslog), and then run upsc to see what it
2011-01-26 09:35:08 +00:00
found. If the STATUS is right (should be OL for on line), continue to
<<_step_3,Step 3>>, otherwise go back to step 1.
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Alternatively, you can run genericups in debug mode -
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
genericups -DDDDD -x upstype=n /dev/port
2010-03-25 23:20:59 +00:00
In this mode it will be running in the foreground and continuously
display the line and battery status of the UPS.
Step 3
2011-01-26 09:35:08 +00:00
~~~~~~
2010-03-25 23:20:59 +00:00
Disconnect the UPS from the wall/mains power. This is easiest if you
have a switched outlet in between it and the wall, but you can also just
pull the plug to test. The lamp should stay lit, and the status should
switch to "OB". If the lamp went out or the status didn't go to "OB"
2011-01-26 09:35:08 +00:00
within about 15 seconds, go to <<_step_1,Step 1>>. Otherwise, continue
to <<_step_4,Step 4>>.
2010-03-25 23:20:59 +00:00
Step 4
2011-01-26 09:35:08 +00:00
~~~~~~
2010-03-25 23:20:59 +00:00
At this point, we know that OL and OB work. If nothing else beyond
this point works, you at least know what your OL/OB value should be.
Wait for the UPS to start complaining about a low battery. Depending on
the size of your UPS battery and the lamp's bulb, this could take
awhile. It should start complaining audibly at some point. When this
happens, STATUS should show "OB LB" within 15 seconds. If not, go to
2011-01-26 09:35:08 +00:00
<<_step_1,Step 1>>, otherwise continue to <<_step_5,Step 5>>.
2010-03-25 23:20:59 +00:00
Step 5
2011-01-26 09:35:08 +00:00
~~~~~~
2010-03-25 23:20:59 +00:00
So far: OL works, OB works, and LB works.
2011-01-26 09:35:08 +00:00
With the UPS running on battery, run the genericups driver with the -k
2010-03-25 23:20:59 +00:00
switch to shut it down.
2011-01-26 09:35:08 +00:00
genericups -x upstype=n -k /dev/port
2010-03-25 23:20:59 +00:00
If the UPS turns off the lamp, you're done. At this point, you have
verified that the shutdown sequence actually does what you want. You
can start using the genericups driver with this type number for normal
operations.
You should use your findings to add a section to your ups.conf.
Here is a quick example:
[myups]
driver = genericups
port = /dev/ttyS0
upstype = 1
Change the port and upstype values to match your system.
2011-01-26 09:35:08 +00:00
NEW SUPPORT
-----------
2010-03-25 23:20:59 +00:00
If the above testing sequence fails, you will probably need to create a
new entry to support your hardware. All UPS types are determined from the
table in the genericups.h file in the source tree.
On a standard 9 pin serial port, there are 6 lines that are used as the
standard "high/low" signal levels. 4 of them are incoming (to the PC,
from the UPS), and the other 2 are outgoing (to the UPS, from the PC).
The other 3 are the receive/transmit lines and the ground.
Be aware that many manufacturers remap pins within the cable. If you have
any doubts, a quick check with a multimeter should confirm whether the
2011-01-26 09:35:08 +00:00
cable is straight-through or not. Another thing to keep in mind is that
2010-03-25 23:20:59 +00:00
some cables have electronics in them to do special things. Some have
resistors and transistors on board to change behavior depending on what's
being supplied by the PC.
2011-01-26 09:35:08 +00:00
SPECIFIC MODEL NOTES
--------------------
2010-03-25 23:20:59 +00:00
These have been contributed by users of this driver.
The Centralion CL series may power down the load if the driver starts up
with the UPS running on battery as the default line settings contain the
2011-01-26 09:35:08 +00:00
shutdown sequence. - Neil Muller
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The Tripp-Lite Internet Office 700 must be used with the black 73-0844
cable instead of the gray 73-0743 cable. This entry should work with any
of their models with the Lan 2.2 interface - see the sticker by the DB9
connector on the UPS. - Stephen Brown
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Type 5 should work with the Tripp-Lite Lan 2.1 interface and the 73-0724
cable. This was tested with the OmniSmart 675 PNP on Red Hat 7.2. - Q
2010-03-25 23:20:59 +00:00
Giese
Types 7 and 10 should both work with the PhoenixTec A1000.
2011-01-26 09:35:08 +00:00
BUGS
----
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
There is no way to reliably detect a contact-closure UPS. This means the
2010-03-25 23:20:59 +00:00
driver will start up happily even if no UPS is detected. It also means
that if the connection between the UPS and computer is interrupted, you
may not be able to sense this in software.
2011-01-26 09:35:08 +00:00
Most contact-closure UPSes will not power down the load if the line power
is present. This can create a race when using slave linkman:upsmon[8]
systems. See the linkman:upsmon[8] man page for more information.
2010-03-25 23:20:59 +00:00
The solution to both of these problems is to upgrade to a smart protocol
UPS of some kind that allows detection and proper load cycling on command.
2011-01-26 09:35:08 +00:00
SEE ALSO
--------
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
The core driver
~~~~~~~~~~~~~~~
linkman:nutupsdrv[8]
2010-03-25 23:20:59 +00:00
2011-01-26 09:35:08 +00:00
Internet resources
~~~~~~~~~~~~~~~~~~
2010-03-25 23:20:59 +00:00
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/