1GENERICUPS(8) Network UPS Tools (NUT) GENERICUPS(8)
2
3
4
6 genericups - Driver for contact‐closure UPS equipment
7
8
10 This man page only documents the specific features of the genericups
11 driver. For information about the core driver, see nutupsdrv(8).
12
13
15 This driver supports hardware from many different manufacturers as it
16 only uses the very simplest of signaling schemes. Contact closure
17 refers to a kind of interface where basic high/low signals are provided
18 to indicate status. This kind of UPS can only report line power and
19 battery status.
20
21 This means that you will only get the essentials in ups.status: OL, OB,
22 and LB. Anything else requires a smarter UPS.
23
24
26 Cabling is different for every kind of UPS. See the table below for
27 information on what is known to work with a given UPS type.
28
29
31 This driver supports the following settings in the ups.conf(5):
32
33
34 upstype=type
35
36 Required. Configures the driver for a specific kind of UPS.
37 See the UPS Types section below for more information on which
38 entries are available.
39
40
41 mfr=string
42
43 Optional. The very nature of a generic UPS driver sometimes
44 means that the stock manufacturer data has no relation to the
45 actual hardware that is attached. With the mfr setting, you can
46 change the value that is seen by clients that monitor this UPS.
47
48
49 model=string
50
51 Optional. This is like mfr above, but it overrides the model
52 string instead.
53
54
55 serial=string
56
57 Optional. This is like mfr above and intended to record the
58 identification string of the UPS. It is titled serial because
59 usually this string is referred to as the serial number.
60
61
62 sdtime=value
63
64 Optional. The driver will sleep for this many seconds after
65 setting the shutdown signal. This is necessary for some hard‐
66 ware which requires a sustained level to activate the shutdown
67 sequence.
68
69 The default behavior of the driver is to exit immediately. If
70 this doesn't reliably trigger a shutdown in your UPS hardware,
71 use this setting to give it more time to react.
72
73 Note: very large values for sdtime may create warnings from ups‐
74 drvctl if it gets tired of waiting for the driver to return.
75
76
78 You may override the values for CP, OL, LB, and SD by defining them in
79 the ups.conf after the upstype setting.
80
81 For example, to set the cable power to DTR and the low battery value to
82 DCD, it would look like this:
83
84 CP = DTR
85
86 LB = DCD
87
88 Recognized values for input lines are CTS, DCD, and RNG. Recognized
89 values for output lines are DTR, RTS, and ST. See below for more about
90 what these signals mean.
91
92 These values may be negated for active low signals. That is, "LB=-DCD"
93 recognizes a low battery condition when DCD is not held high.
94
95
97 The essence of a UPS definition in this driver is how it uses the
98 serial lines that are available. These are the abbreviations you will
99 see below:
100
101 OL ‐ On line (no power failure) (opposite of OB ‐ on battery)
102
103 LB ‐ Low battery
104
105 SD ‐ Shutdown load
106
107 CP ‐ Cable power (must be present for cable to have valid reading)
108
109 CTS ‐ Clear to Send. Received from the UPS.
110
111 RTS ‐ Ready to Send. Sent by the PC.
112
113 DCD ‐ Data Carrier Detect. Received from the UPS.
114
115 RNG ‐ Ring indicate. Received from the UPS.
116
117 DTR ‐ Data Terminal Ready. Sent by the PC.
118
119 ST ‐ Send a BREAK on the transmit data line
120
121 A - in front of a signal name (like -RNG) means that the indicated con‐
122 dition is signaled with an active low signal. For example, [LB=-RNG]
123 means the battery is low when the ring indicate line goes low, and that
124 the battery is OK when that line is held high.
125
126
128 0 = UPSonic LAN Saver 600
129 [CP=DTR+RTS] [OL=-CTS] [LB=DCD] [SD=DTR]
130
131 1 = APC Back‐UPS/Back‐UPS Pro/Smart‐UPS with 940-0095A/C cable
132 [CP=DTR] [OL=-RNG] [LB=DCD] [SD=RTS]
133
134 2 = APC Back‐UPS/Back‐UPS Pro/Smart‐UPS with 940-0020B cable
135 [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR+RTS]
136
137 Type 2 has also been reported to work with the 940-0020C cable.
138
139 3 = PowerTech Comp1000 with DTR cable power
140 [CP=DTR] [OL=CTS] [LB=DCD] [SD=DTR+RTS]
141
142 4 = Generic RUPS Model
143 [CP=RTS] [OL=CTS] [LB=-DCD] [SD=-RTS]
144
145 5 = Tripp Lite UPS with Lan2.2 interface (black 73-0844 cable)
146 [CP=DTR] [OL=CTS] [LB=-DCD] [SD=DTR+RTS]
147
148 6 = Best Patriot with INT51 cable
149 [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS]
150
151 7 = CyberPower Power99
152 also Upsonic Power Guardian PG-500
153
154 Also Belkin Belkin Home Office
155 F6H350-SER, F6H500-SER, F6H650-SER
156
157 [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]
158
159 8 = Nitram Elite 500
160 [CP=DTR] [OL=CTS] [LB=-DCD] [SD=???]
161
162 9 = APC Back‐UPS/Back‐UPS Pro/Smart‐UPS with 940-0023A cable
163 [CP=none] [OL=-DCD] [LB=CTS] [SD=RTS]
164
165 10 = Victron Lite with crack cable
166 [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]
167
168 11 = Powerware 3115
169 [CP=DTR] [OL=-CTS] [LB=-DCD] [SD=ST]
170
171 12 = APC Back-UPS Office with 940-0119A cable
172 [CP=RTS] [OL=-CTS] [LB=DCD] [SD=DTR]
173
174 13 = RPT Repoteck RPT-800A/RPT-162A
175 [CP=DTR+RTS] [OL=DCD] [LB=-CTS] [SD=ST]
176
177 14 = Online P-series
178 [CP=DTR] [OL=DCD] [LB=-CTS] [SD=RTS]
179
180 15 = Powerware 5119, 5125
181 [CP=DTR] [OL=CTS] [LB=-DCD] [SD=ST]
182
183 16 = Nitram Elite 2002
184 [CP=DTR+RTS] [OL=CTS] [LB=-DCD] [SD=???]
185
186 17 = PowerKinetics 9001
187 [CP=DTR] [OL=CTS] [LB=DCD] [SD=???]
188
189 18 = TrippLite Omni 450LAN with Martin's cabling
190 [CP=DTR] [OL=CTS] [LB=DCD] [SD=none]
191
192 http://lists.exploits.org/upsdev/Jul2002/00012.html
193
194 19 = Fideltronic Ares Series
195 [CP=DTR] [OL=CTS] [LB=-DCD] [SD=RTS]
196
197 20 = Powerware 5119 RM
198 [CP=DTR] [OL=-CTS] [LB=DCD] [SD=ST]
199
200 Check docs/cables/powerware.txt
201
202 21 = Generic RUPS 2000 (Megatec M2501 cable)
203 [CP=RTS] [OL=CTS] [LB=-DCD] [SD=RTS+DTR]
204
205 http://lists.exploits.org/upsdev/Oct2004/00004.html
206
207 22 = Gamatronic All models with alarm interface
208 also CyberPower SL series
209
210 [CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]
211
212
214 Many different UPS companies make models with similar interfaces. The
215 RUPS cable seems to be especially popular in the "power strip" variety
216 of UPS found in office supply stores. If your UPS works with an entry
217 in the table above, but the model or manufacturer information don't
218 match, don't despair. You can fix that easily by using the mfr and
219 model variables documented above in your ups.conf(5).
220
221
223 If your UPS isn't listed above, you can try going through the list
224 until you find one that works. There is a lot of cable and interface
225 reuse in the UPS world, and you may find a match.
226
227 To do this, first make sure nothing important is plugged into the out‐
228 lets on the UPS, as you may inadvertently switch it off. Definitely
229 make sure that the computer you're using is not plugged into that UPS.
230 Plug in something small like a lamp so you know when power is being
231 supplied to the outlets.
232
233 Now, you can either attempt to make an educated guess based on the doc‐
234 umentation your manufacturer has provided (if any), or just start going
235 down the list.
236
237 Step 1
238
239 Pick a driver to try from the list (genericups -h) and go to step 2.
240
241 Step 2
242
243 Start the driver with the type you want to try ‐
244
245 genericups -x upstype=n /dev/port
246
247 Let upsd sync up (watch the syslog), and then run upsc to see what it
248 found. If the STATUS is right (should be OL for on line), go to step
249 3, otherwise go back to step 1.
250
251 Step 3
252
253 Disconnect the UPS from the wall/mains power. This is easiest if you
254 have a switched outlet in between it and the wall, but you can also
255 just pull the plug to test. The lamp should stay lit, and the status
256 should switch to "OB". If the lamp went out or the status didn't go to
257 "OB" within about 15 seconds, go to step 1. Otherwise, continue to
258 step 4.
259
260 Step 4
261
262 At this point, we know that OL and OB work. If nothing else beyond
263 this point works, you at least know what your OL/OB value should be.
264
265 Wait for the UPS to start complaining about a low battery. Depending
266 on the size of your UPS battery and the lamp's bulb, this could take
267 awhile. It should start complaining audibly at some point. When this
268 happens, STATUS should show "OB LB" within 15 seconds. If not, go to
269 step 1, otherwise continue to step 5.
270
271 Step 5
272
273 So far: OL works, OB works, and LB works.
274
275 With the UPS running on battery, run the genericups driver with the -k
276 switch to shut it down.
277
278 genericups -x upstype=n -k /dev/port
279
280 If the UPS turns off the lamp, you're done. At this point, you have
281 verified that the shutdown sequence actually does what you want. You
282 can start using the genericups driver with this type number for normal
283 operations.
284
285 You should use your findings to add a section to your ups.conf. Here
286 is a quick example:
287
288 [myups]
289 driver = genericups
290 port = /dev/ttyS0
291 upstype = 1
292
293 Change the port and upstype values to match your system.
294
295
297 If the above testing sequence fails, you will probably need to create a
298 new entry to support your hardware. All UPS types are determined from
299 the table in the genericups.h file in the source tree.
300
301 On a standard 9 pin serial port, there are 6 lines that are used as the
302 standard "high/low" signal levels. 4 of them are incoming (to the PC,
303 from the UPS), and the other 2 are outgoing (to the UPS, from the PC).
304 The other 3 are the receive/transmit lines and the ground.
305
306 Be aware that many manufacturers remap pins within the cable. If you
307 have any doubts, a quick check with a multimeter should confirm whether
308 the cable is straight‐through or not. Another thing to keep in mind is
309 that some cables have electronics in them to do special things. Some
310 have resistors and transistors on board to change behavior depending on
311 what's being supplied by the PC.
312
313
315 These have been contributed by users of this driver.
316
317 The Centralion CL series may power down the load if the driver starts
318 up with the UPS running on battery as the default line settings contain
319 the shutdown sequence. ‐ Neil Muller
320
321 The Tripp‐Lite Internet Office 700 must be used with the black 73‐0844
322 cable instead of the gray 73‐0743 cable. This entry should work with
323 any of their models with the Lan 2.2 interface ‐ see the sticker by the
324 DB9 connector on the UPS. ‐ Stephen Brown
325
326 Type 5 should work with the Tripp‐Lite Lan 2.1 interface and the
327 73‐0724 cable. This was tested with the OmniSmart 675 PNP on Red Hat
328 7.2. ‐ Q Giese
329
330 Types 7 and 10 should both work with the PhoenixTec A1000.
331
332
334 There is no way to reliably detect a contact‐closure UPS. This means
335 the driver will start up happily even if no UPS is detected. It also
336 means that if the connection between the UPS and computer is inter‐
337 rupted, you may not be able to sense this in software.
338
339 Most contact‐closure UPSes will not power down the load if the line
340 power is present. This can create a race when using slave upsmon(8)
341 systems. See the upsmon(8) man page for more information.
342
343 The solution to both of these problems is to upgrade to a smart proto‐
344 col UPS of some kind that allows detection and proper load cycling on
345 command.
346
347
349 The core driver:
350 nutupsdrv(8)
351
352
353 Internet resources:
354 The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
355
356
357
358 Thu Aug 11 2005 GENERICUPS(8)