I've grabbed a snapshot of NUT from just a couple days ago. Glad to see APC's new 5G UPSes added to the list (though you probably want to add it to the UDEV 52-nut-usbups.rules file as well...). My issues with new APC Smart-UPS units (SMT1000) : Powering-down the unit, whether with upsdrvctl or upscmd will not obey the specified delay in offdelay, or ups.delay.shutdown. Instead, a message about power off in 20s displays on the LCD, and indeed it does power off. Unfortunately, when coming back on, only one set of (4) outlets are powered-up, while the other 4 are not. Rebooting the UPS via the front panel typically restores power, but additionally, as soon as the USB port it's connected to goes high, it will power-cycle again, and again, and again. Disconnecting both utility and battery power was necessary to stop this behavior. More importantly, I'm not seeing any way to configure the UPS to send FSD, determined by runtime. battery.runtime.low shows 1380 and doesn't accept any user changes. usbhid-ups -DDD doesn't show any error. I can set a battery percentage just fine, but maintaining such values would be labor intensive and really doesn't suit the various usage here. I've tried adding all values from libhid.c to apc-hid.c, but found only "UPS" (0x00840004) returned anything else, and that was just an unmodifiable "2". Changing settings via the UPS's LCD front-panel seems to work, but I wouldn't call that a good option, particularly as I can't even READ these values via NUT. So I'd be willing to put some work into improving NUT instead. I'd also like to avoid using something like the clone driver to emulate this functionality. Suggestions on alternate addresses to try, or tips on finding likely addresses to poke around, would be most welcome.
On Jul 20, 2010, at 6:11 PM, RC wrote:> I've grabbed a snapshot of NUT from just a couple days ago. Glad to > see APC's > new 5G UPSes added to the list (though you probably want to add it > to the UDEV > 52-nut-usbups.rules file as well...).The udev file (as well as the other USB-related lists) are actually generated by the nut-usbinfo.pl script in the tools directory before we make a release. It sounds like you have this figured out now, but if anyone else trips on this, the script is meant to be run from the tools directory (it uses relative paths to find the files to modify). Arnaud: can we have these lists built as part of the normal autoconf/ automake cycle? I see the comment in the make file about only running it if perl is present, but perl is installed more often than not (especially if someone is using automake). RC: I will defer to the other developers for a bit regarding the rest of your email.
Citeren RC <cooleyr op gmail.com>:> Powering-down the unit, whether with upsdrvctl or upscmd will not obey the > specified delay in offdelay, or ups.delay.shutdown. Instead, a message about > power off in 20s displays on the LCD, and indeed it does power off. > Unfortunately, when coming back on, only one set of (4) outlets are > powered-up, > while the other 4 are not. Rebooting the UPS via the front panel typically > restores power, but additionally, as soon as the USB port it's > connected to goes > high, it will power-cycle again, and again, and again. Disconnecting both > utility and battery power was necessary to stop this behavior.The UPS doesn't seem to support the 'UPS.PowerSummary.DelayBeforeStartup' HID path, which is used for timed shutdowns and restarts and only uses 'UPS.PowerSummary.DelayBeforeShutdown' and 'UPS.PowerSummary.DelayBeforeReboot'. This means that the UPS will use the latter if you call the driver with the -k flag to shutdown the output. My guess is that APC powers this circuit that runs the shutdown timer from the USB port (and takes it power from there). This means that when you issue the shutdown command, the timer will lose power as soon as the PC switches off (which usually is within a second or so). When the power returns and the USB port is powered up again, the timer will not have elapsed yet and the UPS kills the power immediately again. One thing I would like you (and others with a similar APC UPS) to try, is to issue this command while the computer that is providing the USB port is powered from another source. In that case, I expect the UPS to power down immediately after running 'usbhid-ups -k -a <upsname>' and start again after about 10 seconds or so. If this doesn't lead to endless reboot cycles, we probably can't use 'UPS.PowerSummary.DelayBeforeReboot'. Also try if issuing the 'load.off.delay' command (through 'upscmd') will make the UPS shutdown the outlet and returns power when the mains is present again. Don't power any systems from the UPS during this! Lastly, post the first 10 seconds worth of output from 'usbhid-ups -DD -a <upsname>' here. Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected)