[Nut-upsdev] UPS commands
Rob Groner
rgroner at RTD.com
Fri Mar 20 15:32:44 UTC 2015
I'm doing testing of the UPS-side code, including being able to tell the UPS to shutdown and then come back up after a while (if power has returned).
I'm trying to use upscmd so that I don't have to do an actual shutdown, but when I have it list the commands for my UPS, I just see 4 commands, and they're not the ones I thought I had specified.
load.on
load.off
shutdown.return
shutdown.stayoff
I looked in the usbhid-ups file, and I see where, if it finds load.on.delay or load.off.delay, then it adds the 4 commands shown above. Now, load.on.delay and load.off.delay are the only two commands I *want* to support. So I put them in my hid2nut table:
/* Commands to control UPS */
{ "load.off.delay", 0, 0, "UPS.PowerSummary.DelayBeforeShutdown", NULL, DEFAULT_OFFDELAY, HU_TYPE_CMD, NULL },
{ "load.on.delay", 0, 0, "UPS.PowerSummary.DelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL },
So there's a few things I am trying to figure out:
1) Where are the commands that I said the UPS had (via HU_TYPE_CMD, I thought) when I use upscmd?
2) Why does the usbhid-ups automatically add those 4 commands to all usb subtype drivers....can it really know that those 4 commands are supported? Along those lines, am I supposed to support those 4 commands?
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?
Sincerely,
Rob Groner
Software Engineer
RTD Embedded Technologies, Inc.
ISO9001 and AS9100 Certified
Ph: 814-234-8087
www.rtd.com<http://www.rtd.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20150320/f702a15c/attachment.html>
More information about the Nut-upsdev
mailing list