Hi,
I have been using NUT 1.4 for many years which has worked flawlessly.
The hardware are two old UPS:es, APC Matrix UPS 3000 and APC Matrix UPS
5000. When upgrading to NUT 2.2 many variables was lost.
Running upsc in 1.4 gives the following (serial censored):
battery.alarm.threshold: 0
battery.charge: 100.0
battery.charge.restart: 00
battery.date: 10/25/93
battery.voltage: 55.62
driver.name: apcsmart
driver.parameter.port: /dev/ttyS0
driver.version: 1.4.0
driver.version.internal: 0.72
input.frequency: 50.00
input.sensitivity: A
input.transfer.high: 253
input.transfer.low: 176
input.voltage: 233.7
output.voltage: 226.2
ups.delay.shutdown: 600
ups.delay.start: 000
ups.id: 79<><>/\
ups.load: 049.4
ups.mfr: APC
ups.model: Matrix-UPS
ups.serial: ********
ups.status: OL
ups.temperature: 022.5
The same command in 2.2 gives far less variables:
driver.name: apcsmart
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.2.0-
driver.version.internal: 1.99.8
input.voltage: 231.8
output.current: 09.31
ups.mfr: APC
ups.model: Matrix-UPS
ups.serial: ********
ups.status: OL
So I decided to troubleshoot the code and have found a solution which
gives the following output:
battery.alarm.threshold: L
battery.charge: 100.0
battery.charge.restart: 00
battery.date: 04/07/03
battery.packs: 003
battery.packs.bad: 000
battery.runtime: 22560
battery.runtime.low: 600
battery.voltage: 55.36
battery.voltage.nominal: 048
driver.name: apcsmart
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ttyS0
driver.version: 2.2.0
driver.version.internal: 1.99.8
input.frequency: 50.00
input.quality: FF
input.sensitivity: H
input.transfer.high: 264
input.transfer.low: 176
input.transfer.reason: T
input.voltage: 231.8
input.voltage.maximum: 231.8
input.voltage.minimum: 231.8
output.current: 05.43
output.voltage: 239.3
output.voltage.nominal: 230
ups.delay.shutdown: 180
ups.delay.start: 000
ups.id: UPS_IDEN
ups.load: 039.0
ups.mfr: APC
ups.mfr.date: 10/18/99
ups.model: Smart-UPS
ups.serial: ********
ups.status: OL
ups.temperature: 021.6
ups.test.interval: 1209600
ups.test.result: NO
As a bonus I got a couple of new variables that was not part of the old
version.
The modification is quite small, about 6 lines in drivers/apcsmart.{c,h}
and uses the same workaround as the other vintage APC boxes. Patch is
attached.
If possible please add the modification to the development branch so
other can take advantage of the fix.
I apologize for the low signal to noise ratio in the text.
Regards,
Marcus
--
Marcus Wellhardh e-mail: [EMAIL PROTECTED]
Roxen Internet Software AB Support: +46 13 376804
Index: drivers/apcsmart.c
===================================================================
--- drivers/apcsmart.c (revision 1554)
+++ drivers/apcsmart.c (working copy)
@@ -545,7 +545,9 @@
!strcmp(buf, "8QD") || /* (SmartUPS 1250, vintage 07/94.) */
!strcmp(buf, "8TI") || /* (SmartUPS 1250, vintage 08/24/95.) */
!strcmp(buf, "6TI") || /* (APC600.) */
- !strcmp(buf, "6QI")) { /* (APC600.) */
+ !strcmp(buf, "6QI") || /* (APC600.) */
+ !strcmp(buf, "0ZI") || /* (APC Matrix 3000, vintage 10/99.) */
+ !strcmp(buf, "5UI")) { /* (APC Matrix 5000, vintage 10/93.) */
upsdebugx(1, "Found Smart-UPS");
dstate_setinfo("ups.model", "Smart-UPS");
}
Index: drivers/apcsmart.h
===================================================================
--- drivers/apcsmart.h (revision 1554)
+++ drivers/apcsmart.h (working copy)
@@ -264,6 +264,9 @@
/* SmartUPS 1250. */
{ "8QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
{ "8TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
+ /* APC Matrix */
+ { "0ZI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 },
+ { "5UI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz/<>", 0 },
{ NULL, NULL, 0 },
};
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev