[Nut-upsdev] UPS commands
rgroner at RTD.com
Fri Mar 20 19:02:24 UTC 2015
>>I still have an unset draft answer to your previous mail... but you seem to have progressed...
Heh…that’s been known to happen. ☺ I have the luxury of relatively un-interrupted development on this project, so it goes a lot faster now. Hopefully that lasts…
>>>Could you please check if "usbhid-ups -D ..." does list the above HID data (UPS.PowerSummary.DelayBeforeShutdown &DelayBeforeStartup)
>>>The only case I see is that the base data are missing, since we don't check if these HID path actually exists...
Ah, bingo I think. It sees the two paths, but gives me a “broken pipe” when trying to retrieve the reports. I don’t have reports implemented for those two commands because…well, they should only exist one way, there is nothing to read from them. I’ll put in a dummy report for them and see if that makes it all better.
On a side note…I have them implemented in the USB Report descriptor as a Feature, which I know is R/W. I tried making them Input and Output, and I seem to remember each time, it still came back with “broken pipe” as though it were trying to get the value of that particular data item. Is one of those types (Feature, Input, Output) actually correct for these commands?
I found it in the code, but I still didn’t understand. I get it now…it just calls my delayed command but with a delay of 0. That’s good to know…I’ll have to take that value into account, I think I had just been checking that the delay *wasn’t* zero before.
>>>3) Finally…what is the usefulness of shutdown.stayoff? It tells the UPS to shut off its load and not to turn it back on when the power comes back. If so…how does the UPS ever know to turn that load back on? You would have to hook a different PC to the UPS and run nut just to send the “load.on” command?
Ok, I kind of get that it’s a use-case or optional feature, and I might implement that. I had up to now just figured they would configure their PC BIOS to handle the power-on event. But I still have to ask…how does the UPS ever know to turn its load on again? When the UPS itself is power cycled (again)?
Thanks much for the help Arno
RTD Embedded Technologies, Inc.
ISO9001 and AS9100 Certified
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nut-upsdev