[Nut-upsdev] PowerCOM HID PDC non-compliance
Arnaud Quette
aquette.dev at gmail.com
Fri Jan 22 14:04:53 UTC 2010
Alexey,
2010/1/20 Arjen de Korte <nut+devel at de-korte.org>:
> Alexey,
>
> I posted this before, but never got a reply. So I'm reposting this again.
>
> In the present HID PDC implementation by PowerCOM, expect problems with the
> non-compliant implementation of the DelayBeforeShutdown and
> DelayBeforeStartup pages.
>
> Third party applications will expect that these follow the HID PDC
> specifications if you name them like this (and break terribly in the
> process). In NUT we can (for now) easily implement the PowerCOM specific
> formatting rules, but not all applications may be able to do so. The same
> goes for UPS.PowerSummary.Voltage, UPS.PowerSummary.ConfigVoltage,
> UPS.Battery.Voltage and UPS.Battery.ConfigVoltage. These should deal with
> the battery voltage, not the output voltage like implemented in the PowerCOM
> HID now.
>
> If in the future (?) PowerCOM has newer UPS designs that unlike the present
> one are native HID PDC from the start (instead of a serial protocol
> encapsulated in HID PDC), this will be a problem. It would require different
> ways to deal with these, based on the model of the UPS (compliant or
> non-compliant versions). Generally it is *very* poor design practice to
> *not* follow a specification. Please consider to *not* use the standard
> Power Device Pages (x84) in cases like these, but to create vendor specific
> ones instead (pages 0xFF00 to 0xFFFF are reserved for that). It is almost
> always better to *not* have a HID PDC path than to have an *incorrect*
> implemented one.
>
> So instead of using 0x00840056 (DelayBeforeStartup) and 0x00840057
> (DelayBeforeShutdown), use 0xFFFF0056 (PCMDelayBeforeStartup) and 0xFFFF0057
> (PCMDelayBeforeShutdown) instead. This would allow applications that know
> about the PowerCOM specific implementation to use these values and not break
> ones that don't.
I second Arjen's position: I've planned to extend the Integrated Power
Management (DeviceKit-power, aka UPower, which is what you are using
in Gnome) to support the shutoff (UPS poweroff).
Since this implementation will be generic, we won't have the same
level of specific manufacturer support than we have in NUT.
So this will likely cause problem to your users, considering the above.
cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
More information about the Nut-upsdev
mailing list