networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
2.13k stars 355 forks source link

Missing APC HID fields #1796

Closed kolbai closed 1 year ago

kolbai commented 1 year ago

NUT does not recognize some HID fields as seen in #1776. apcupsd have them defined, see 1 and 2.

I am not sure if they are correct, but likes like it. Can anyone double check?

0xFF860005 = APCGeneralCollection
0xFF86007C = APCForceShutdown
0xFF860016 = APCBattReplacementDate
0xFF860060 = APCStatusFlag
0xFF860072 = APCPanelTest
kolbai commented 1 year ago

Sorry, I was looking at 2.7.4 output, 2.8.0 apparently has it already fixed. The only difference is that apcupsd recognizes 0xFF86007C as APCForceShutdown and NUT recognizes it as APCDelayBeforeReboot.

Update: strange, but usbhid-ups 2.8.0 with -x explore flag still does not recognize/translate those fields.

jimklimov commented 1 year ago

I believe explore mode is a special fake HID subdriver (explore-hid.c) that does not reject anything to report all it sees. But being a different codepath than apc-hid.c it does not know about those custom name mappings.