Heh, ya. It does smell of copy-pasta. I've got a consumer APC UPS. When I get time, I'll connect it to my NUT dev server and sit what it reports with usbhid-ups vs what the display shows. I'll also confirm with what Windows or MacOS think (but I don't know how their drivers work)
On Tue, Jan 2, 2024 at 4:23 PM Greg Troxel <[email protected]> wrote: > Kelly Byrd <[email protected]> writes: > > > Thanks for the reply, it looks to me (based on various existing > HID-based > > drivers in the NUT source tree) that everyone is just mapping it directly > > with a line like this in a hid_info_t: > > { "battery.runtime", 0, 0, "UPS.PowerSummary.RunTimeToEmpty", NULL, > > "%.0f", 0, NULL } > > > > I found that in belkin-hid, apc-hid, cps-hid, tripplite-hid, and a bunch > of > > others. This seems like evidence that real world UPS devices are using > > seconds. > > Strictly, it's evidence that the person who wrote the first driver, > before it was copied, thought they use seconds. I'm kind of kidding, > but not entirely. > > Can you compare reported runtimes to displays and sanity to confirm that > this is really true? > > If the devices are all wrong compared to the spec, we should add a > comment that the spec says that value is in minutes but that we know > this manufacturer puts seconds in the field instead. >
_______________________________________________ Nut-upsdev mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev
