Added
- UPS sources: a UPS is no longer necessarily an SNMP device. Every UPS entry now has
a "Read via" selector, and the second source is a NUT server (Network UPS Tools,
TCP 3493) — the answer for UPS devices with no network card, i.e. everything attached
by USB or a serial cable. Any existingupsdworks: the UPS server built into a
Synology/QNAP/TrueNAS NAS, a Raspberry Pi, an OPNsense box, or a NUT install on a
Proxmox host. Configuration is host, port, the UPS name from upsd'sups.conf, and
optionally a user name and password. - PVE-UPS acts strictly as a read-only NUT client: it only ever sends
LIST VAR, never
a command, and never runsupsmon. NUT is used as a device driver — the shutdown
decision, the thresholds and the host policy stay in this appliance, so there are still
no config files to write and no shutdown scripting on any host. - The UPS test now names the trigger conditions the device cannot feed at all ("This UPS
does not report: runtime remaining, battery charge"), because a threshold that can never
fire is more dangerous than a visible error. Applies to both source types — plenty of
NUT drivers omitbattery.runtime, and plenty of SNMP cards omit
upsEstimatedMinutesRemaining. typefield in each UPS entry of the/api/statussnapshot, and the dashboard card
says which source a UPS is read through.tests/nutsim.py, a fakeupsdfor development and tests — the NUT counterpart of
snmpsim +snmpdata/. Runnable standalone (python -m tests.nutsim --scenario battery)
to click through the wizard without any UPS hardware.
Changed
POST /api/test/upsreplacesPOST /api/test/snmpas the wizard's test endpoint and
handles every source type. The old path stays as an alias and behaves identically.- Event-log wording and trigger reasons no longer say "SNMP" where they apply to any
source ("No response for 3 polls …" instead of "No SNMP response for 3 polls …").
The fail-safe behaviour itself is unchanged. - The per-object test diagnosis was generalised from "per SNMP object (OID)" to "per
object" and gained two outcomes:missing(the driver does not publish this variable)
andstale(upsd answers, but its driver has lost contact with the UPS). - Configuration schema: UPS entries carry an explicit
type(snmpornut). Existing
configuration files and backups are migrated on load — an entry withouttypeis read
as SNMP, exactly as before — and the field is written out on the next save.
Security
- A NUT server that reports stale data (
ERR DATA-STALE,ERR DRIVER-NOT-CONNECTED) is
treated as unreachable rather than as a valid reading.upsdkeeps serving the last
known values when its driver dies, and accepting those would have meant reporting
"on mains" through an outage. The same applies when a driver omitsups.status
entirely: the UPS counts as unreachable (alarm, never a shutdown) instead of silently
looking healthy.