How to use the latest version of usbhid-ups / apc-hid to fix wrong voltages?

ZeFritz

Cadet
Joined
Dec 30, 2022
Messages
5
Hello,
checking the values for my APC Back-UPS XS 950U, using ups, I've noticed that the input.voltage: 102.0 was definitely wrong - in Germany, it should be around 230V. Digging into the problem, I've found an issue report on GitHub:
Since "driver.name: usbhid-ups", "driver.version.internal: 0.41" and "driver.version.data: APC HID 0.96", I'm wondering if my problem could be fixed by updating the driver(s), and how to do that.
Thanks!

Output of upsc:


root@freenas[~]# upsc myups
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2015/07/09
battery.runtime: 28
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 13.4
battery.voltage.nominal: 12.0
device.mfr: American Power Conversion
device.model: Back-UPS XS 950U
device.serial: NANNNNANNNNN
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: APC HID 0.96
driver.version.internal: 0.41
input.sensitivity: medium
input.transfer.high: 280
input.transfer.low: 155
input.voltage: 102.0
input.voltage.nominal: 102
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 925.T1 .I
ups.firmware.aux: T1
ups.load: 14
ups.mfr: American Power Conversion
ups.mfr.date: 2015/07/09
ups.model: Back-UPS XS 950U
ups.productid: 0002
ups.realpower.nominal: 480
ups.serial: NANNNNANNNN
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
TrueNAS is an appliance OS and does not support ad-hoc updates to random subsystems. You can put in a Jira ticket requesting an update for the next release of the OS, but the developers tend to avoid installing the very latest versions of stuff like this, preferring the stuff distributed with the latest release of the underlying OS.

You might be better off using something like a Raspberry Pi as a UPS monitoring agent and having your various systems all talk to it.
 

ZeFritz

Cadet
Joined
Dec 30, 2022
Messages
5
I understand - TrueNAS builds up on FreeBSD, and differing it from that fundament isn't something you would do lightly, especially for such a non-essential nuisance.

Using a Raspberry Pi as monitoring agent is clearly an option, but I try to keep the number of systems I have to take care of at a minimum.

I've opened a Jira ticket, although I don't expect it to be addressed soon, if not be closed for the understandable reasons.

Follow-up question: Since TrueNAS builds upon FreeBSD, isn't this something that I should bring to attention of the FreeBSD team as well?
 
Top