Skip to content

apc: expose NMC3 ambient temperature - #3605

Open
user01010111 wants to merge 1 commit into
networkupstools:masterfrom
user01010111:fix/apc-nmc3-ambient-temperature
Open

apc: expose NMC3 ambient temperature#3605
user01010111 wants to merge 1 commit into
networkupstools:masterfrom
user01010111:fix/apc-nmc3-ambient-temperature

Conversation

@user01010111

Copy link
Copy Markdown

Summary

Fixes #3250.

APC Network Management Card 3 units expose universal I/O temperature through uioSensorStatusTemperatureDegC, but the APC subdriver does not currently map that value to ambient.temperature.

This adds the Universal I/O Celsius OID as the first ambient-temperature provider, rejects the MIB-defined -1 invalid sentinel, bumps APCC_MIB_VERSION to 1.62, and documents the addition in NEWS.adoc.

Schneider Electric's official PowerNet MIB v4.6.0, dated 9 July 2026, independently confirms the exact Celsius OID and the -1 invalid sentinel. Placing the new mapping before the existing Measure-UPS and IEM alternatives lets NMC3 devices use it when legacy OIDs are unavailable while preserving the current later-provider precedence on devices which answer those legacy OIDs.

Validation

  • GCC 16.2.1 hard warnings with -Werror: clean complete snmp-ups compile and link passed.
  • Clang 22 medium warnings with -Weverything -Werror: clean complete snmp-ups compile and link passed.
  • The changed APC object passed Clang hard warnings with -Weverything -Werror.
  • A compiled lookup-table check confirmed APC MIB version 1.62, the exact OID, scale 1, SU_FLAG_OK | SU_FLAG_NEGINVALID, and first-provider placement.
  • The configured test suite passed 9/9 with loopback sockets available.
  • make stylecheck, non-ASCII checks and git diff --check passed.
  • make SPELLCHECK_ERROR_FATAL=no distcheck-light passed, including archive, build, check, install and uninstall.
  • Spellcheck reported only existing findings in unchanged text; this change introduced none.
  • Physical NMC3 confirmation remains pending.
  • Upstream CI remains pending.

The whole-driver Clang hard profile stops on nine existing conversion warnings in unchanged snmp-ups.c. The changed APC object passes that profile, and the complete driver passes the project's medium Clang profile with -Werror.

General C checklist

  • The change is one cohesive update to an existing subdriver.
  • APCC_MIB_VERSION was bumped.
  • The mapping uses the established ambient.temperature variable.
  • The MIB-defined invalid value is rejected.
  • Coding style, ASCII portability and distribution checks passed.
  • NEWS.adoc was updated.

AI assistance

OpenAI Codex gpt-5.6-sol was used for planning, repository analysis, implementation, review, drafting and validation, including controller and delegated work. The human contributor reviewed the change and remains responsible for it.

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 networkupstools#3250

Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit d0b0293 is temporarily available: NUT-tarballs-PR-3605.zip.

@jimklimov jimklimov added enhancement APC SNMP AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels Aug 31, 2026
@jimklimov jimklimov added this to the 2.8.6 milestone Aug 31, 2026
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.5173-master completed (commit bfb14d4b41 by @)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. APC enhancement SNMP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support APC Smart-UPS Ultra On-Line ambient.temperature via SNMP (PowerNet MIB v4.5.8)

3 participants