Re: [Nut-upsuser] APC Smart-UPS 1000
Citeren Kevin bakd...@gmail.com: #define APC_HID_VERSION APC HID 0.95-patch2 [...] { ups.delay.shutdown, ST_FLAG_RW | ST_FLAG_STRING, 10, UPS.Output.APCShutdownAfterDelay, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL }, I see my error now. The above line should be moved up to before the first occurence of { ups.delay.shutdown, ... }. The first available HID path that is found, will set the NUT mapping and there is one before this line now, so the above will never be used in its present location. The ups.delay.shutdown value starts at what is set in the ups.conf (1): This should have tipped me off. The 'offdelay' should be ignored by the driver if the above line is in the correct location. Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected) ___ Nut-upsuser mailing list Nut-upsuser@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
Re: [Nut-upsuser] APC Smart-UPS 1000
on 23/01/2011 16:16 Arjen de Korte wrote: Citeren Kevin bakd...@gmail.com: I see my error now. The above line should be moved up to before the first occurence of { ups.delay.shutdown, ... }. The first available HID path that is found, will set the NUT mapping and there is one before this line now, so the above will never be used in its present location. Ok, try again { ups.delay.start, ST_FLAG_RW | ST_FLAG_STRING, 10, UPS.PowerSummary.DelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, NULL}, { ups.delay.shutdown, ST_FLAG_RW | ST_FLAG_STRING, 10, UPS.Output.APCShutdownAfterDelay, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL }, { ups.delay.shutdown, ST_FLAG_RW | ST_FLAG_STRING, 10, UPS.PowerSummary.DelayBeforeShutdown, NULL, DEFAULT_OFFDELAY, HU_FLAG_ABSENT, NULL}, { ups.timer.start, 0, 0, UPS.PowerSummary.DelayBeforeStartup, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL}, { ups.timer.shutdown, 0, 0, UPS.PowerSummary.DelayBeforeShutdown, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL}, { ups.timer.reboot, 0, 0, UPS.PowerSummary.DelayBeforeReboot, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL}, /* used by APC SmartUPS RM */ { ups.delay.start, ST_FLAG_RW | ST_FLAG_STRING, 10, UPS.Output.DelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, NULL}, { ups.delay.shutdown, ST_FLAG_RW | ST_FLAG_STRING, 10, UPS.Output.DelayBeforeShutdown, NULL, DEFAULT_OFFDELAY, HU_FLAG_ABSENT, NULL}, { ups.timer.start, 0, 0, UPS.Output.DelayBeforeStartup, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL}, { ups.timer.shutdown, 0, 0, UPS.Output.DelayBeforeShutdown, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL}, { ups.timer.reboot, 0, 0, UPS.Output.DelayBeforeReboot, NULL, %.0f, HU_FLAG_QUICK_POLL, NULL}, Different # ./clients/upsc apc1500 battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.mfr.date: 2007/07/07 battery.runtime: 5880 battery.runtime.low: 120 battery.temperature: 33.3 battery.type: PbAc battery.voltage: 27.4 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Smart-UPS 1000 device.serial: AS0727233122 device.type: ups driver.name: usbhid-ups driver.parameter.offdelay: 1 driver.parameter.ondelay: 250 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.6.0 driver.version.data: APC HID 0.95-patch3 driver.version.internal: 0.35 input.sensitivity: high input.voltage: 230.4 output.voltage: 230.4 output.voltage.nominal: 230.0 ups.beeper.status: disabled ups.delay.shutdown: 90 ups.delay.start: 250 ups.firmware: 652.13.I ups.firmware.aux: 7.3 ups.load: 5.8 ups.mfr: American Power Conversion ups.mfr.date: 2007/07/07 ups.model: Smart-UPS 1000 ups.productid: 0002 ups.serial: AS0727233122 ups.status: OL ups.test.result: No test initiated ups.timer.reboot: -1 ups.timer.shutdown: -1 ups.timer.start: -1 ups.vendorid: 051d ./clients/upsrw -s ups.delay.shutdown=30 -u apcmon -p pass123 apc1500 OK # ./clients/upsc apc1500 battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.mfr.date: 2007/07/07 battery.runtime: 5880 battery.runtime.low: 120 battery.temperature: 33.3 battery.type: PbAc battery.voltage: 27.4 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Smart-UPS 1000 device.serial: AS0727233122 device.type: ups driver.name: usbhid-ups driver.parameter.offdelay: 1 driver.parameter.ondelay: 250 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.6.0 driver.version.data: APC HID 0.95-patch3 driver.version.internal: 0.35 input.sensitivity: high input.voltage: 231.8 output.voltage: 231.8 output.voltage.nominal: 230.0 ups.beeper.status: disabled ups.delay.shutdown: 30 ups.delay.start: 250 ups.firmware: 652.13.I ups.firmware.aux: 7.3 ups.load: 5.8 ups.mfr: American Power Conversion ups.mfr.date: 2007/07/07 ups.model: Smart-UPS 1000 ups.productid: 0002 ups.serial: AS0727233122 ups.status: OL ups.test.result: No test initiated ups.timer.reboot: -1 ups.timer.shutdown: -1 ups.timer.start: -1 ups.vendorid: 051d Sorry # ./clients/upscmd -u apcmon -p pass123 apc1500 shutdown.return OK # ./clients/upsc apc1500 battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 50 battery.mfr.date: 2007/07/07 battery.runtime: 5880 battery.runtime.low: 120 battery.temperature: 33.3 battery.type: PbAc battery.voltage: 27.0 battery.voltage.nominal: 24.0 device.mfr: American Power Conversion device.model: Smart-UPS 1000 device.serial: AS0727233122 device.type: ups driver.name: usbhid-ups driver.parameter.offdelay: 1 driver.parameter.ondelay: 250 driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.version: 2.6.0 driver.version.data: APC HID 0.95-patch3 driver.version.internal: 0.35 input.sensitivity: high input.voltage: 231.8 output.voltage: 229.6 output.voltage.nominal: 230.0 ups.beeper.status: disabled ups.delay.shutdown: 30 ups.delay.start: 250
[Nut-upsuser] Getting a Plexus 500VA to work with NUT
Hi all, First off thanks you for such a great tool - my searching so far indicates that the developers and community behind nut are committed and doing a great job! Background: I've just purchased a Plexus 500VA UPS for ebuyer because it was cheap. I didnt expect much but I've seen a few references to people getting the same and similar models to work with NUT so was encouraged to try! The NUT website compatability chart lists that the blazer_usb driver is the correct one to use. The monitoring server is actualy a linksys NSLU2 (ARM architecture) but flashed to run vanilla debian etch. Initially, I installed nut from the apt repositories (v 2.2.2 I believe) however this version did not include the blazer_usb driver. I did not a t this stage attempt to use another driver as the compat chart seemed to indicate blazer was the way to go. Instead I apt-get removed nut, and then downloaded and compile the latest 2.6 source from tar ball (installing dependencies, and using --with-user=nut --with-group=nut and --with-usb). I've check nut user and group exist and nut user is a member of group nut. I now have nut 2.6.0 installed however can't get the blazer_usb driver to communicate with the UPS due to permissions issues. Debug output: $ cat ups.conf [rupert] driver = blazer_usb port = auto $ ./blazer_usb -a rupert -D -u root Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.6.0) 0.00 debug level is '5' 0.019447 Checking device (0001/) (003/010) 0.022465 - VendorID: 0001 0.024659 - ProductID: 0.027246 - Manufacturer: unknown 0.029307 - Product: unknown 0.031805 - Serial Number: unknown 0.034021 - Bus: 003 0.036163 Trying to match device 0.038393 Device matches 0.040732 failed to claim USB device: could not claim interface 0: Operation not permitted 0.042969 failed to detach kernel driver from USB device: could not detach kernel driver from interface 0: Operation not permitted 0.045468 failed to claim USB device: could not claim interface 0: Operation not permitted 0.048084 failed to detach kernel driver from USB device: could not detach kernel driver from interface 0: Operation not permitted 0.050467 failed to claim USB device: could not claim interface 0: Operation not permitted 0.052842 failed to detach kernel driver from USB device: could not detach kernel driver from interface 0: Operation not permitted 0.055540 failed to claim USB device: could not claim interface 0: Operation not permitted 0.058121 failed to detach kernel driver from USB device: could not detach kernel driver from interface 0: Operation not permitted 0.060418 Can't claim USB device [0001:]: could not detach kernel driver from interface 0: Operation not permitted I've seen this come up and have checked all permisions/udev related things. The relevant entry in udev rules is there (whole script copied from the tar ball scripts/udev/52-nut-usbups.rules): # Krauler UP-M500VA - blazer_usb ATTR{idVendor}==0001, ATTR{idProduct}==, MODE=664, GROUP=nut However it appears not to work. Incidentally, it DID work when I still had the old 52_nut-usbups.rules file left over from the apt install. I could ls -al the appropriate bus/device in /dev/bus/usb and see it was owned by root:nut. As part of troubleshooting I have removed the 52_nut-usbups.rules that was left over from apt install and copied the 52-nut-usbups.rules file from the 2.6.0 tar ball and now it appears not to work! i.e. ls -l shows the correct bus/device dir owned by root:root. That seems to be a secondary issue for now though because even with the older script and ls -l returning correct perms, launching the driver still failed with an identical debug output. Similarly, if I manual chown root:nut the device dir now, I still get the same result form starting the driver. If anyone has any ideas why the old version of udev rules worked and the current doesn't that would be interesting but appears not to be the root of my problem currently. I've also created /var/run/nut and tried it with root:nut and nut:nut ownership, even with 777 permissions. All give the same output as above regardless of the -u setting. Note that I get the above output when running the command from a normal non-root user. (not nut user as that has no shell). If I run the same as root I get a different error saying it couldn't connect to UPS at all - I originally was going to post about that when I realised that I probably should be running blazer-usb command as non-root. If it SHOULD work to launch the driver directly as root then let me know and I'll post the output as that might identify better the actual issue here. I've tried looking at all the options I've seen discussed related to permissions and USB with NUT but I have searched for many hours now with nothing getting this to work! Would be very grateful for any tips that