Hi,
I just went through this finding process… and all that pieces of information on and about UPS and TrueNAS, visiting also your thread.
Maybe my conclusion helps you somehow:
Finding:
The documentation on SNMP/UPS is incomplete, to say the least!
After hours of reading here and there, trying things out, and getting support from knowledgeable forum members:
Hardware: UPS with SNMP agent (Ethernet adapter) (SNMP manufacturer doesn’t matter, but in this case it’s GENEREX), settings (almost all standard! , trap receiver=ip->truenas, SNMP v2, hostname=ups , location=cellar) That’s basically all you need.
My UPS is a rack UPS with Ethernet adapter that backs up a few other small items in addition to the TruNAS server, hence 2000VA.
TrueNAS 25.10.1 community edition
Services
SNMP:
Location: cellar, Contact: any, I entered my email address, community=public Protocol level: warning
These are pretty much the standard settings, but the protocol level can be anything.
UPS:
identifier=ups (must be named this, at least identical to the UPS name)
UPS mode: Master
Driver: any “SNMP-ups” driver, here e.g. APC pdu 3 (various APxxxx) since my adapter is not on any compatibility list, let alone listed directly itself.
Port or hostname:
IP address of the SNMP adapter (obviously!).
shutdown mode:
UPS goes on battery (also clear).
shutdown command:
/usr/bin/midclt call system.shutdown AC error
NO further entries, please save at this point.
And now here’s the thing:
If the UDP port needs to be changed, this can ONLY be done by temporarily setting the “UPS mode” to “Slave.” Only then will the “Remote port” window appear, and only here can “162” be set.
Now save, then set the UPS mode back to “Master” (the window will disappear again) and save again.
TrueNAS may be a little finicky and may require a restart or just a restart of the service…
Check the successful settings in the shell with root as follows:
root@TrueNAS[~]# cat /etc/nut/upsd.conf
LISTEN 127.0.0.1 162
LISTEN ::1 162
nut-scanner -s 192.168.xx.xx
[nutdev1]
driver = “snmp-ups”
port = “192.168.xx.xx”
desc = “AdPoS” can of course be different
mibs = “ietf”
community = “public”
Another note:
if you forget to set the UPS mode back to Master, these commands will not work and you will get an error message.