Open olliecook opened 3 months ago
TBH, the version puzzled me too. It should be exposed in program banners and driver.version
, but this is one of those vendors who obfuscate stuff with their own product version.
Still, side clues reveal they have (a variant of?) NUT 2.7.4 under the hood, ~8 years old now (but sadly still shipped by many stable distros as it was the latest published release for too long):
~/nut $ git blame v2.7.4 drivers/apc-hid.c | grep _VERS
f679a2820e (Charles Lepple 2016-01-24 17:33:48 -0500 34) #define APC_HID_VERSION "APC HID 0.96"
~/nut $ git blame v2.7.4 drivers/usbhid-ups.c | grep _VERS
c730b9ff78 drivers/usbhid-ups.c (Charles Lepple 2015-07-02 08:53:32 -0400 30) #define DRIVER_VERSION "0.41"
The diver should know about input/output voltage however, even at that version:
2b2d6758b6 (Arjen de Korte 2007-09-17 11:56:03 +0000 377) { "input.voltage", 0, 0, "UPS.Input.Voltage", NULL, "%.1f", 0, NULL },
2b2d6758b6 (Arjen de Korte 2007-09-17 11:56:03 +0000 378) { "input.voltage.nominal", 0, 0, "UPS.Input.ConfigVoltage", NULL, "%.0f", 0, NULL },
2b2d6758b6 (Arjen de Korte 2007-09-17 11:56:03 +0000 387) { "output.voltage", 0, 0, "UPS.Output.Voltage", NULL, "%.1f", 0, NULL },
2b2d6758b6 (Arjen de Korte 2007-09-17 11:56:03 +0000 388) { "output.voltage.nominal", 0, 0, "UPS.Output.ConfigVoltage", NULL, "%.1f", 0, NULL },
I suppose this new APC device follows the path they seem to have started circa 2010, by caring less about standard protocols like USB HID and promoting their own more.
Maybe the device can also talk variants of microsol/solis, or apcsmart indeed. The apcupsd-ups
is a relay from readings by apcupsd
program which, incidentally, might also talk APC Modbus based protocol (added in NUT v2.8.2, maybe 2.8.1, and still needs a custom build of libmodbus for USB media; should be ok out of the box for serial or tcp).
I am having exactly the same issue with an APC Smart-UPS C SMC1000IC, which I connected via USB to a Synology DS720+ running DSM 7.2.1-69057 Update 5. No clue how to add input.voltage output.voltage sensors...
:~$ upsc ups
Init SSL without certificate database
battery.charge: 97
battery.charge.low: 10
battery.charge.warning: 50
battery.runtime: 3025
battery.runtime.low: 150
battery.type: PbAc
battery.voltage: 27.0
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smart-UPS_1000
device.serial: AS2421152896
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 5
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: DSM7-2-1-NewModel-repack-64570-230831
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: UPS 02.0 / ID=1061
ups.mfr: American Power Conversion
ups.mfr.date: 2024/05/24
ups.model: Smart-UPS_1000
ups.productid: 0003
ups.serial: XXXXXXX
ups.status: OL CHRG
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.vendorid: 051d
These are all the sensors I can see with NUT integration in Home Assistant. No input/output voltage, no active power or current values, although these can be seen directly on the UPS screen. Also, as in the case of @olliecook I can see the voltages and the load on the APC SmartConnect Dashboard.
Sadly, I've got no new answers compared to the above, although thank you both for adding clues and facts for someone who would eventually be able to debug this.
In the meanwhile, are any of you in position to attach this UPS to a system with a more recent build of NUT (ideally master branch), to see if current code base fares better? See e.g. https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests about building it and running a driver to probe the device straight from the build workspace, no changes required to the OS where it was built.
Hi @jimklimov Unfortunately I don't really get how to run that test with the latest code that you propose there. But I have a raspberry pi that I use for some other purposes and I was thinking to maybe try a NUT server on it. If there is a possibility to use the latest NUT build with the pi, I would definitely try it.
Well, one idea was to take a plain Linux system, and follow that wiki to install tools and build the current NUT code base, and run driver programs to see what they report about your device.
Another idea, as I was reminded by HA in this context, is to build a new plugin with current NUT, as detailed at https://github.com/networkupstools/nut/wiki/Building-NUT-integration-for-Home-Assistant (I don't use HA yet, so can't help more about it).
Testing-wise, I am wary of extra moving parts: the plugin and dashboards integration can be an extra level of complexity that might lose something (not pass all configs through yaml=>conf conversion from HA to NUT, not reflect all data that NUT did report, etc.)
I have an APC SMT2200RMI2UC (a 2U rack-mount model with "Cloud-based remote monitoring") connected to a Synology RS1221+ NAS by the included USB cable.
nuts
is configured through the Synology UI as follows:It is 'working' in the sense that
upsc
is reporting some information (such as when it's supporting load via battery) but not others I am interested in such as the input voltage:I had expected to see variables such as these from https://github.com/networkupstools/nut-ddl/blob/master/APC/APC__Smart-UPS_2200__usbhid-ups__2.7.4__01.dev:
The voltages are showing on the APC SmartConnect web dashboard, so the figures are available (at least to APC):
The UPS firmware is showing as being the latest version on the SmartConnect website:
(although I am a bit sceptical because the documentation link suggests the latest firmware version is
17.2
which is far from06.0
)Running
usbhid-ups
manually, I don't see anything relating to input/output voltage, only battery voltage:I am running the latest version of the host OS (DSM 7.2.1-69057 Update 5) for the Synology RS1221+ NAS. I don't know which version of
nuts
they have bundled. Is there a command to run to find out?I'll see if I can upgrade the device firmware as a next step. If there's anything else anyone can recommend, that'd be great.
One question that springs to mind is whether the
usbhid-ups
driver is the most appropriate for this model of UPS. Should I be usingapcsmart
orapcupsd-ups
instead?Thank you.