[Nut-upsdev] PowerCOM HID PDC non-compliance

Arjen de Korte nut+devel at de-korte.org
Wed Jan 20 08:50:14 UTC 2010


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.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list