Re: [Nut-upsuser] APC Smart-UPS 1000

2011-01-24 Thread Arjen de Korte

Citeren Kevin bakd...@gmail.com:


Different

# ./clients/upsc apc1500


[...]


ups.delay.shutdown: 90
ups.delay.start: 250


This is what I expected to happen. The value of ups.delay.shutdown is  
now read from the UPS...



./clients/upsrw -s ups.delay.shutdown=30 -u apcmon -p pass123 apc1500
OK

# ./clients/upsc apc1500


[...]


ups.delay.shutdown: 30
ups.delay.start: 250


..and apparently can be written as well.

Sadly, it looks like this value is used for a different purpose than  
setting the minimum delay value before shutdown (like I expected).  
Unless you're willing to dig deeper into this, I think we have to  
conclude that this model doesn't allow setting the delay values lower  
than 90 seconds. Using an 'ondelay' value of 100, does the UPS cycle  
the output if mains is present? And does it wait until the mains  
return if it is not present?


I would still like to see the full output of the below command. An  
earlier version you posted was incomplete (the report descriptor was  
missing, which is vital to be able to check our HID parser without  
access to a specific UPS model). Could you please post the output of


   /path/to/usbhid-ups -DD -a apc1500  APC_Smart-UPS_1000.log 21

here? The redirection of stderr to stdin was probably missing in your  
previous post.


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

2011-01-24 Thread Arjen de Korte

Citeren Kevin bakd...@gmail.com:


./clients/upsrw -s ups.delay.shutdown=30 -u apcmon -p pass123 apc1500
OK

# ./clients/upsc apc1500


[...]


ups.delay.shutdown: 30
ups.delay.start: 250


..and apparently can be written as well.


Yes, but this value could also be changed before the patches. (See  
previous posts)


Not in the same way. I'm not really interested in what NUT thinks  
about this value, it is where it is stored. Previously, this value  
would be a driver side variable (without the UPS ever knowing we  
changed it) while in this case, it is a value stored (and modified) in  
the UPS. I was hoping that the UPS would consider this value for the  
minimum shutdown delay, but apparently it doesn't. Chances are it is  
something completely different... :-(


Happy to dig as deep as you would like me to. (I would like to get  
the CS 500 sorted out too though) I will check again with the  
unmodified code, but I'm fairly sure that the output will cycle when  
power is present. (even with on and offdelay values at the default  
90 minimum)


That's even weirder...

I would still like to see the full output of the below command. An  
earlier version you posted was incomplete (the report descriptor  
was missing, which is vital to be able to check our HID parser  
without access to a specific UPS model). Could you please post the  
output of


  /path/to/usbhid-ups -DD -a apc1500  APC_Smart-UPS_1000.log 21

here? The redirection of stderr to stdin was probably missing in  
your previous post.


I'll do it now and attach it here.


Sorry about that, the report descriptor is only reported at debug  
level 3 (or higher). So I need the output of the below command instead:


   /path/to/usbhid-ups -DDD -a apc1500  APC_Smart-UPS_1000.log 21

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] Getting a Plexus 500VA to work with NUT

2011-01-24 Thread Charles Lepple

On Jan 23, 2011, at 2:16 PM, Paul Banks wrote:


$ ./blazer_usb -a rupert -D -u root


^ If this is in a non-root shell, this won't work.

NUT has no hooks to go from a non-root user ID to root, nor can it  
change from one non-root user to another non-root user. (To do so  
would require setuid binaries, or calling an existing setuid tool like  
sudo.)


The -u root option is to override the default behavior when started  
as root, which is to change to the non-root user specified at  
configuration time (usually nut, or the last-resort nobody).



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.


If you want to invoke a driver from a non-root account, then -u  
won't have an effect, and that non-root account should be the one  
specified at configuration time.


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Getting a Plexus 500VA to work with NUT

2011-01-24 Thread Paul Banks

On 24 Jan 2011, at 14:18, Charles Lepple wrote:

 On Jan 23, 2011, at 2:16 PM, Paul Banks wrote:
 
 $ ./blazer_usb -a rupert -D -u root
 
 ^ If this is in a non-root shell, this won't work.

Charles, thanks for clarifying.

As I mentioned I was initially working in a root shel but came up against 
errors I couldn't find any reference to anywhere.

It was only whilst composing my post here that I thought to try it as a 
non-root user in case that had been an assumed step in any instructions I'd 
followed.

OK, so disregarding the permissions (which I can assume if not fine are at 
least a separate issue), can anyone make any recommendations about where I 
should go from here: (note root shell)

# ./blazer_usb -D -a rupert -u root
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.6.0)
   0.00 send_to_all: SETINFO driver.parameter.port auto
   0.003137 debug level is '5'
   0.023508 Checking device (0001/) (003/006)
   0.030542 - VendorID: 0001
   0.032742 - ProductID: 
   0.035366 - Manufacturer: ATCL FOR UPS
   0.037801 - Product: ATCL FOR UPS
   0.040178 - Serial Number: ATCL FOR UPS
   0.042693 - Bus: 003
   0.045032 Trying to match device
   0.047385 Device matches
   0.065112 send_to_all: SETINFO ups.vendorid 0001
   0.067529 send_to_all: SETINFO ups.productid 
   0.070556 send_to_all: SETINFO device.type ups
   0.072796 send_to_all: SETINFO driver.version 2.6.0
   0.075564 send_to_all: SETINFO driver.version.internal 0.03
   0.078335 send_to_all: SETINFO driver.name blazer_usb
   0.081055 Trying megatec protocol...
   0.083423 send: Q1
   0.087710 read: error sending control message: Broken pipe
   0.091693 Stall condition cleared
   0.094179 blazer_status: short reply
   0.096664 Status read 1 failed
   0.099547 send: Q1
   0.103623 read: error sending control message: Broken pipe
   0.106326 Stall condition cleared
   0.108771 blazer_status: short reply
   0.111610 Status read 2 failed
   0.114070 send: Q1
   0.118025 read: error sending control message: Broken pipe
   0.121712 Stall condition cleared
   0.124013 blazer_status: short reply
   0.126304 Status read 3 failed
   0.128969 Trying mustek protocol...
   0.131854 send: QS
   0.134344 read: QS
   0.136835 blazer_status: short reply
   0.139482 Status read 1 failed
   0.141970 send: QS
   0.144155 read: QS
   0.146496 blazer_status: short reply
   0.148775 Status read 2 failed
   0.151226 send: QS
   0.153406 read: QS
   0.155615 blazer_status: short reply
   0.158165 Status read 3 failed
   0.160564 Trying megatec/old protocol...
   0.162959 send: D
   0.164992 read: D
   0.167053 blazer_status: short reply
   0.168869 Status read 1 failed
   0.171206 send: D
   0.173712 read: D
   0.176037 blazer_status: short reply
   0.178380 Status read 2 failed
   0.180818 send: D
   0.183006 read: D
   0.185347 blazer_status: short reply
   0.187743 Status read 3 failed
   0.190084 No supported UPS detected

Help is much appreciated!
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


[Nut-upsuser] Plexus UPS on a QNAP NAS

2011-01-24 Thread Jonathan Cunliffe
Hi,

Has anyone managed to get a Plexus UPS talking to their NAS. I've followed
the excellent instructions here http://forum.qnap.com/viewtopic.php?f=182
http://forum.qnap.com/viewtopic.php?f=182t=35970start=0 t=35970start=0
but I'm not there yet.

When I manually start upsdrvctl without the UPS plugged in I get 

 [~] # /usr/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - Megatec protocol driver 1.6 (2.4.1)
Serial-over-USB transport layer 0.10
No supported devices found. Please check your device availability with
'lsusb'
and make sure you have an up-to-date version of NUT. If this does not help,
try running the driver with at least 'vendorid' and 'subdriver' options
specified. Please refer to the man page for details about these options
(man 8 megatec_usb).
Please report your results to the NUT user's mailing list
nut-upsuser@lists.alioth.debian.org.

Driver failed to start (exit status=1)
[~] #


When I plug the UPS in I get

 

[~] # /usr/bin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.1
Network UPS Tools - Megatec protocol driver 1.6 (2.4.1)
Serial-over-USB transport layer 0.10
Can't claim USB device [0001:]: could not detach kernel driver from
interface 0: Operation not permitted
Driver failed to start (exit status=1)



My ups.conf looks like this

 

[qnapups]
driver = usbhid-ups
port = auto
mfr = Plexus
model = Plexus 500VA UPS
desc = Workstation
pollinterval=1
ignoreoff


lsusb shows before the UPS is plugged in

 

[~] # lsusb
Bus 001 Device 003: ID 04a9:10b0 Canon, Inc.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002


And after

 

[~] # lsusb
Bus 001 Device 004: ID 0001: Fry's Electronics
Bus 001 Device 003: ID 04a9:10b0 Canon, Inc.
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002



Anyone any ideas...?

Thanks,

Jon C

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Plexus UPS on a QNAP NAS

2011-01-24 Thread Arjen de Korte

Citeren Jonathan Cunliffe subscript...@gadget.org.uk:

[...]


Anyone any ideas...?


Someone posted a reply to your first message. Instead of reposting the  
same message, you might try if following that reply might get you  
further. Reading the manuals might also help.


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

2011-01-24 Thread Arjen de Korte

Citeren Kevin bakd...@gmail.com:

Sorry about that, the report descriptor is only reported at debug  
level 3 (or higher). So I need the output of the below command  
instead:


  /path/to/usbhid-ups -DDD -a apc1500  APC_Smart-UPS_1000.log 21


Here it is.


Much better, thanks! Could you do the same for the CS-500 (time permitting).

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

2011-01-24 Thread Arjen de Korte

Citeren Kevin bakd...@gmail.com:

Happy to dig as deep as you would like me to. (I would like to get  
the CS 500 sorted out too though)


I think the only solution I can come up with to support (?) all known  
APC models, is to not map the HID paths to 'load.on.delay' and to rely  
on the UPS to provide a grace period before cycling the power or  
shutting down.


Can you try the attached patch on the pristine nut-2.6.0 sources and  
let us know if both APC models you own, shutdown and restart properly?


Best regards, Arjen
--
Please keep list traffic on the list (off-list replies will be rejected)
--- drivers/apc-hid.c	(revision 2849)
+++ drivers/apc-hid.c	(working copy)
@@ -339,17 +339,17 @@
 
   /* USB HID PDC defaults */
   { 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 },
+  /* { load.on.delay, 0, 0, UPS.PowerSummary.DelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL }, */
   { shutdown.stop, 0, 0, UPS.PowerSummary.DelayBeforeShutdown, NULL, -1, HU_TYPE_CMD, NULL },
   { shutdown.reboot, 0, 0, UPS.PowerSummary.DelayBeforeReboot, NULL, 10, HU_TYPE_CMD, NULL },
   /* used by APC SmartUPS RM */
   { load.off.delay, 0, 0, UPS.Output.DelayBeforeShutdown, NULL, DEFAULT_OFFDELAY, HU_TYPE_CMD, NULL },
-  { load.on.delay, 0, 0, UPS.Output.DelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL },
+  /* { load.on.delay, 0, 0, UPS.Output.DelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL }, */
   { shutdown.stop, 0, 0, UPS.Output.DelayBeforeShutdown, NULL, -1, HU_TYPE_CMD, NULL },
   { shutdown.reboot, 0, 0, UPS.Output.DelayBeforeReboot, NULL, 10, HU_TYPE_CMD, NULL },
   /* used by APC BackUPS ES */
   { load.off.delay, 0, 0, UPS.APCGeneralCollection.APCDelayBeforeShutdown, NULL, DEFAULT_OFFDELAY, HU_TYPE_CMD, NULL },
-  { load.on.delay, 0, 0, UPS.APCGeneralCollection.APCDelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL },
+  /* { load.on.delay, 0, 0, UPS.APCGeneralCollection.APCDelayBeforeStartup, NULL, DEFAULT_ONDELAY, HU_TYPE_CMD, NULL }, */
   { shutdown.stop, 0, 0, UPS.APCGeneralCollection.APCDelayBeforeShutdown, NULL, -1, HU_TYPE_CMD, NULL },
   { shutdown.reboot, 0, 0, UPS.APCGeneralCollection.APCDelayBeforeReboot, NULL, 10, HU_TYPE_CMD, NULL },
 
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser