[Nut-upsdev] 2.0.3-pre
Alfred Ganz
alfred-ganz+nut at agci.com
Sun Oct 2 17:08:59 UTC 2005
Gentlemen,
I just had time to start looking at the latest version of the development
tree. I have built the apc-hid part of newhidups from the development tree
and I am in the process of testing it with my "Back-UPS ES 650".
As of right now I have incorporated the attached changes to apc-hid.c.
I have been using the corresponding changes together with some changes
from Arnaud with the 2.0.2 sources for more than a month.
Unfortunately I may not be able to do all my tests before Arnaud does
the backport, but I would much appreciate it if the changes, which I have
reported earlier, could be included. The changes add the following:
1) my "Back-UPS ES 650" is capable of accepting changes to
battery.charge.low and battery.runtime.low,
so I have made them writable, I hope correctly, but if the experts
suggest changes I would like to know about it
2) the rather lengthy, unsolicited status messages from my "Back-UPS ES 650"
return two variables that are not contained in the current table,
adding them avoids the indications that newhidups doesn't know what
to do with the variables, although the current change doesn't affect
status evaluation in any way either.
I am sorry that I may be late with testing these changes, which I have
been using with the 2.0.2 sources, against the development code, I hope
to be done with testing by the end of this week.
Anyhow, the patch is appended, AG
------------------------------------------------------------------------------
diff -ru nut-2.1.dev.orig/drivers/apc-hid.c nut-2.1.dev/drivers/apc-hid.c
--- nut-2.1.dev.orig/drivers/apc-hid.c 2005-09-24 00:37:25.000000000 -0400
+++ nut-2.1.dev/drivers/apc-hid.c 2005-10-01 22:56:37.000000000 -0400
@@ -115,11 +115,14 @@
/* Battery page */
{ "battery.charge", 0, 1, "UPS.PowerSummary.RemainingCapacity", NULL, "%.0f", HU_FLAG_OK, NULL },
- { "battery.charge.low", ST_FLAG_STRING, 5, "UPS.PowerSummary.RemainingCapacityLimit", NULL,
- "%.0f", HU_FLAG_OK, NULL }, /* Read only */
+ /* the following is writeable for the Back-UPS ES 650 */
+ { "battery.charge.low", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerSummary.RemainingCapacityLimit", NULL,
+ "%.0f", HU_FLAG_OK | HU_FLAG_SEMI_STATIC, NULL },
{ "battery.charge.warning", ST_FLAG_STRING, 5, "UPS.PowerSummary.WarningCapacityLimit", NULL, "%.0f", HU_FLAG_OK, NULL }, /* Read only */
{ "battery.runtime", 0, 0, "UPS.PowerSummary.RunTimeToEmpty", NULL, "%.0f", HU_FLAG_OK, NULL },
- { "battery.runtime.low", 0, 0, "UPS.Battery.RemainingTimeLimit", NULL, "%.0f", HU_FLAG_OK, NULL },
+ /* the following is writeable for the Back-UPS ES 650 */
+ { "battery.runtime.low", ST_FLAG_RW | ST_FLAG_STRING, 5, "UPS.PowerSummary.RemainingTimeLimit", NULL,
+ "%.0f", HU_FLAG_OK | HU_FLAG_SEMI_STATIC, NULL },
{ "battery.voltage", 0, 0, "UPS.PowerSummary.Voltage", NULL, "%.1f", HU_FLAG_OK, NULL },
{ "battery.voltage.nominal", 0, 0, "UPS.Battery.ConfigVoltage", NULL,
"%.1f", HU_FLAG_OK, NULL },
@@ -161,6 +164,11 @@
"%.0f", HU_FLAG_OK, &overbatt_info[0] },
{ "ups.status", 0, 1, "UPS.PowerSummary.PresentStatus.NeedReplacement", NULL,
"%.0f", HU_FLAG_OK, &replacebatt_info[0] },
+ /* The following two are returned with long notification from Back-UPS ES 650 */
+ { "ups.status", 0, 1, "UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired", NULL,
+ "%.0f", HU_FLAG_OK, NULL },
+ { "ups.status", 0, 1, "UPS.PowerSummary.PresentStatus.BatteryPresent", NULL,
+ "%.0f", HU_FLAG_OK, NULL },
/* Input page */
{ "input.voltage", 0, 0, "UPS.Input.Voltage", NULL, "%.1f", HU_FLAG_OK, NULL },
------------------------------------------------------------------------------
--
----------------------------------------------------------------------
Alfred Ganz alfred-ganz at agci.com
AG Consulting, Inc. (203) 624-9667
440 Prospect Street # 11
New Haven, CT 06511
----------------------------------------------------------------------
More information about the Nut-upsdev
mailing list