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

2011-02-06 Thread Arjen de Korte

Citeren Kevin bakd...@gmail.com:


Seems to have gone a bit quiet. Are we at a dead end now?


No, I just don't have a lot of spare time on my hand lately. You could  
try if changing


{ shutdown.reboot, 0, 0,  
UPS.APCGeneralCollection.APCDelayBeforeReboot, NULL, 10,  
HU_TYPE_CMD, NULL },


to

{ shutdown.return, 0, 0,  
UPS.APCGeneralCollection.APCDelayBeforeReboot, NULL, 1,  
HU_TYPE_CMD, NULL },


helps. Looking in the apcupsd sources seems to indicate that this  
isn't a timer at all, but instead just a flag that forces a reboot  
cycle.


Given the brokenness of the APC HID PDC implementation (the apcupsd  
project uses about half a dozen ways to shutdown), I doubt that the  
support status of APC is going to improve a lot. If you have not  
already tried the apcupsd project, I'd suggest to try that too. Since  
NUT is not focussed on one specific make, we probably can never give  
the same support. This is also due to the fact that none of the active  
developers has access to one of these devices.


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] Status OB (on battery) when polling a Liebert PSA

2011-02-06 Thread Arjen de Korte

Citeren Pier Paolo Glave pierpaolo.gl...@gmail.com:


Everything seems to be fine, except that, when I run upsc
liebert@localhostups.status, it retuns OB, even if the UPS is
currently online.


Looking at the rejected earlier message, I'd say you have a Belkin OEM  
device that has a very broken report descriptor. You may want to  
checkout the recently released nut-2.6.0 version. But I'm almost  
certain that the fixes in the HID parser are not going to solve this  
problem and that instead the problem is in the UPS itself. We may or  
may not be able to work around this, but in that case we will need  
lots of support from you (and you must be willing/capable to run the  
development version too).


[...]


I would like to paste also a complete tracing of /lib/nut/usbhid-ups -D
-a liebert, but the message would become too big.


Then use gzip to compress it before attaching. We really need the full  
listing as an attachment, not inline in a message.


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-02-06 Thread Kevin

on 06/02/2011 18:19 Arjen de Korte wrote:

Citeren Kevin bakd...@gmail.com:


Seems to have gone a bit quiet. Are we at a dead end now?


No, I just don't have a lot of spare time on my hand lately. 


That's ok. I quite understand. Thank you for all your help so far.

You could 
try if changing


{ shutdown.reboot, 0, 0, 
UPS.APCGeneralCollection.APCDelayBeforeReboot, NULL, 10, 
HU_TYPE_CMD, NULL },


to

{ shutdown.return, 0, 0, 
UPS.APCGeneralCollection.APCDelayBeforeReboot, NULL, 1, HU_TYPE_CMD, 
NULL },




Thank you. I will try that and see what happens.

I know it's very old code, but if it helps at all I know that this 
modified shutdown function in hidups works:


void upsdrv_shutdown(void)
{
/* XXX: replace with a proper shutdown function
fatalx(shutdown not supported); */

/* 1) set DelayBeforeStartup */
if (getval (ondelay))
ondelay = atoi (getval (ondelay));

/* setvalue(UPS_WAKEDELAY, ondelay); */ /* commented out this 
line for APC CS 500 */


/* 2) set DelayBeforeShutdown */
if (getval (offdelay))
offdelay = atoi (getval (offdelay));

/* setvalue(UPS_GRACEDELAY, offdelay); */
setvalue(0xff86007c, 1); /* changed this line for APC CS 500 */
}


helps. Looking in the apcupsd sources seems to indicate that this isn't 
a timer at all, but instead just a flag that forces a reboot cycle.


Given the brokenness of the APC HID PDC implementation (the apcupsd 
project uses about half a dozen ways to shutdown), I doubt that the 
support status of APC is going to improve a lot. If you have not already 
tried the apcupsd project, I'd suggest to try that too. Since NUT is not 
focussed on one specific make, we probably can never give the same 
support. This is also due to the fact that none of the active developers 
has access to one of these devices.


Thanks again, I will have a look.

Regards,
Kevin.

___
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-02-06 Thread Charles Lepple
On Sun, Feb 6, 2011 at 8:29 AM, Kevin bakd...@gmail.com wrote:
 I know it's very old code, but if it helps at all I know that this modified
 shutdown function in hidups works:

 void upsdrv_shutdown(void)
 {
        /* XXX: replace with a proper shutdown function
        fatalx(shutdown not supported); */

        /* 1) set DelayBeforeStartup */
        if (getval (ondelay))
                ondelay = atoi (getval (ondelay));

        /* setvalue(UPS_WAKEDELAY, ondelay); */ /* commented out this line
 for APC CS 500 */

        /* 2) set DelayBeforeShutdown */
        if (getval (offdelay))
                offdelay = atoi (getval (offdelay));

        /* setvalue(UPS_GRACEDELAY, offdelay); */
        setvalue(0xff86007c, 1); /* changed this line for APC CS 500 */
 }

It looks like the only uncommented code which talks to the device is
the last line. (The results from the getval() calls do not seem to be
used.)

APCDelayBeforeReboot maps to 0xff86007c, so Arjen's suggestion to
change the 10 to 1 should be equivalent to the setvalue() line at the
end.

-- 
- Charles Lepple

___
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-02-06 Thread Kevin

on 06/02/2011 21:06 Charles Lepple wrote:


It looks like the only uncommented code which talks to the device is
the last line. (The results from the getval() calls do not seem to be
used.)

APCDelayBeforeReboot maps to 0xff86007c, so Arjen's suggestion to
change the 10 to 1 should be equivalent to the setvalue() line at the
end.



Thanks for the input Charles. I will post back the results tomorrow.


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