From d0b0293c22535620f5c7969c24981c9f3531e2a0 Mon Sep 17 00:00:00 2001 From: user01010111 Date: Tue, 1 Sep 2026 10:56:31 +1200 Subject: [PATCH] apc: expose NMC3 ambient temperature APC Network Management Card 3 units expose universal I/O temperature at uioSensorStatusTemperatureDegC, but the APC subdriver does not map that OID to ambient.temperature. Add the OID as the first ambient provider, reject the MIB's -1 invalid sentinel, bump APCC_MIB_VERSION to 1.62, and document the addition. Fixes #3250 Signed-off-by: user01010111 --- NEWS.adoc | 2 ++ drivers/apc-mib.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.adoc b/NEWS.adoc index 8da073ce8e..9ebb129ecc 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -277,6 +277,8 @@ https://github.com/networkupstools/nut/milestone/13 `ups.realpower`. [issue #3580, PR #3581] - `snmp-ups` driver updates: + * `apc` subdriver: exposed `ambient.temperature` from universal I/O + sensors used with APC Network Management Card 3. [issue #3250] * Extended the XPPC-MIB subdriver (enterprise 935) to expose `battery.runtime`, `battery.voltage`, `input.frequency`, `output.voltage.nominal` and `ups.firmware.aux` from Phoenixtec diff --git a/drivers/apc-mib.c b/drivers/apc-mib.c index 4e7a776430..60f206baac 100644 --- a/drivers/apc-mib.c +++ b/drivers/apc-mib.c @@ -26,7 +26,7 @@ #include "apc-mib.h" -#define APCC_MIB_VERSION "1.61" +#define APCC_MIB_VERSION "1.62" #define APC_UPS_DEVICE_MODEL ".1.3.6.1.4.1.318.1.1.1.1.1.1.0" /* FIXME: Find a better oid_auto_check vs. sysOID for this one? */ @@ -290,6 +290,9 @@ static snmp_info_t apcc_mib[] = { snmp_info_default("output.L3.power.minimum.percent", 0, 1, ".1.3.6.1.4.1.318.1.1.1.9.3.3.1.12.1.1.3", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL), snmp_info_default("output.voltage.nominal", ST_FLAG_STRING | ST_FLAG_RW, 3, ".1.3.6.1.4.1.318.1.1.1.5.2.1.0", "", SU_TYPE_INT | SU_FLAG_OK, NULL), + /* Universal I/O ambient sensor */ + snmp_info_default("ambient.temperature", 0, 1, ".1.3.6.1.4.1.318.1.1.25.1.2.1.6.1.1", "", SU_FLAG_OK|SU_FLAG_NEGINVALID, NULL), + /* Measure-UPS ambient variables */ /* Environmental sensors (AP9612TH and others) */ snmp_info_default("ambient.temperature", 0, 1, ".1.3.6.1.4.1.318.1.1.2.1.1.0", "", SU_FLAG_OK, NULL),