Re: [Nut-upsuser] Support of amp; amp; amp; quot; shutdown.returnamp; amp; amp; quot; on a APC Back-UPS CS 500

2011-01-19 Thread Arjen de Korte

Citeren Kevin Myers bakd...@gmail.com:

As far as I can tell from your previous message, it works (with  
nut-2.6.0) for the Smart-UPS 1000, right?
No, although it does go into sleep mode if the power is off at the  
right time, it doesn't cycle the power otherwise so the load will  
not reboot after the shutdown. I'll do some more testing today.


Please also post the output of 'upsc upsname' (see 'man 8 upsc') and  
'upscmd -l upsname' (see 'man 8 upscmd') for both devices, so that we  
can see which commands are detected.


It may be a log easier to do the testing with the upscmd  
'shutdown.return' (Smart-UPS 1000) and 'shutdown.reboot' (CS-500)  
while the upsd server is running. During testing, it allows you to run  
an instance of upslog (see 'man 8 upslog') so that you'll be able to  
see the 'ups.timer.*' variables counting down. I suspect that the  
current mapping might be wrong.


Also note that the (re)start delay set in the Smart-UPS 1000 is  
presently set to 180 seconds, so you may have to wait a little longer  
that expected for the output to be switched on after the power returns.


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] Support of amp; amp; amp; quot; shutdown.returnamp; amp; amp; quot; on a APC Back-UPS CS 500

2011-01-19 Thread Kevin

on 19/01/2011 15:31 Arjen de Korte wrote:
Please also post the output of 'upsc upsname' (see 'man 8 upsc') and 
'upscmd -l upsname' (see 'man 8 upscmd') for both devices, so that we 
can see which commands are detected.


It may be a log easier to do the testing with the upscmd 
'shutdown.return' (Smart-UPS 1000) and 'shutdown.reboot' (CS-500) 
while the upsd server is running. During testing, it allows you to run 
an instance of upslog (see 'man 8 upslog') so that you'll be able to 
see the 'ups.timer.*' variables counting down. I suspect that the 
current mapping might be wrong.


Also note that the (re)start delay set in the Smart-UPS 1000 is 
presently set to 180 seconds, so you may have to wait a little longer 
that expected for the output to be switched on after the power returns.


Thanks Arjen. I've spent a little more time on it today and can confirm 
that shutdown.reboot works as expected with the Smart-UPS 1000. (I only 
tested this by commenting out the shutdown.return code in the usbhid-ups 
driver) I will try with the upscmd command tomorrow.


This matches and confirms the behaviour of the 2.4 versions.

It is easy to tell when this is working properly, as both of the units 
have a flashing light sequence that signifies they are going into sleep 
mode.


As an aside, I gather that all the APC units will now switch into sleep 
mode automatically at a specific low battery state, so actually 
switching off as a last resort may be counter productive.


I haven't been able to get the CS 500 into sleep mode at all, apart from 
by using the old hidups driver that I modified to setvalue(0x86007c, 1) 
The 2.6 version shutdown.reboot definitely does not work - it doesn't 
seem to have any effect at all.


I will post the further information you have asked for tomorrow and also 
experiment with the upslog. I haven't seen output matching 'ups.timer' 
from this before, there must be a verbose command I haven't found yet.


Regards,
Kevin.

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


Re: [Nut-upsuser] Support of amp; amp; amp; quot; shutdown.returnamp; amp; amp; quot; on a APC Back-UPS CS 500

2011-01-18 Thread Kevin
Arjen de Korte nut+users at de-korte.org writes:

 
 Citeren Kevin bakdong at gmail.com:
 
 0.686325 Initiating UPS shutdown
 0.686340 upsdrv_shutdown...
 0.686365 instcmd(shutdown.return, [NULL])
 0.686382 find_nut_info: unknown info type: shutdown.return
 
 This is normal. Some UPS'es (models that have a HID layer around an  
 essential serial interface) support a command that will result in what  
 NUT calls 'shutdown.return', so that's what we try first. A true HID  
 PDC UPS (like the APC models you have) don't, so this command is not  
 found. This is exactly what we expect.
 
 0.686398 instcmd(load.on.delay, 30)
 0.686433 Unit = 1001, UnitExp = 0
 0.686450 Exponent = 0
 0.686464 PhyMax = 0, PhyMin = 0, LogMax = 32767, LogMin = -1
 0.690437 Report[set]: (3 bytes) = 28 1e 00
 0.690437 Set report succeeded
 0.690437 instcmd: SUCCEED
 
 In a HID PDC UPS, you need to set both the timer for shutdown and  
 (re)start independently. They start counting down immediately after  
 setting the report, so we set the (re)start timer...
 
 0.690437 instcmd(load.off.delay, 20)
 0.690437 Unit = 1001, UnitExp = 0
 0.690437 Exponent = 0
 0.690437 PhyMax = 0, PhyMin = 0, LogMax = 32767, LogMin = -1
 0.695437 Report[set]: (3 bytes) = 12 14 00
 0.695437 Set report succeeded
 0.695437 instcmd: SUCCEED
 
 ...before the stop timer, so that we don't get stuck if the power is  
 lost. In that case, the (re)start timer will have expired and a UPS  
 will not start again.
 
  APC CS 500
  This shuts down the APC CS 500 after 20 seconds.  (and it stays shutdown)
 
 This probably means the driver called 'load.off.delay 20', which is  
 the last resort option for the usbhid-ups. It looks like it doesn't  
 have a mapping for 'shutdown.reboot', which the logs you have produced  
 should reveal.
 
  APC Smart-UPS 1000
  If the power is left on, switches to battery and back online after 2 
seconds.
 
 Either the HID PDC implementation in this UPS is broken or what you're  
 seeing is 'shutdown.reboot'. The timers are in seconds and with mains  
 present, the UPS should stop 20 seconds after running this command and  
 resume again 10 (30-20) seconds later.
 
  If the power is off, goes to sleep after 90 seconds. (and comes back  
  on when the power is connected)
 
 This is broken either way. There is nothing we can do about that.
 
 Best regards, Arjen

Thanks for the response. 

I have to say that this is way beyond me. We know that the UPS models in 
question support the function that we want (sleep/hibernate), and we know the 
command that is needed to initiate that state. It's been working in previous 
releases on at least the Smart-UPS 1000, and it was working with a small 
amendment to the code on the old hidups module.

It's a shame that I can't seem to get the up to date releases working properly 
on both of these UPS models, specially after seeing that it can be done, 
apparently fairly simply, by sending the 0xff86007c code in both cases.

Anyway, at lease I have now shared the very limited knowledge that I have 
gained 
from the exercise with the NUT user community, so maybe, hopefully, someone 
will 
be able to benefit from it in the future.

Regards,
Kevin.



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


Re: [Nut-upsuser] Support of amp; amp; amp; quot; shutdown.returnamp; amp; amp; quot; on a APC Back-UPS CS 500

2011-01-18 Thread Arjen de Korte

Citeren Kevin bakd...@gmail.com:

It's a shame that I can't seem to get the up to date releases  
working properly

on both of these UPS models, specially after seeing that it can be done,
apparently fairly simply, by sending the 0xff86007c code in both cases.


As far as I can tell from your previous message, it works (with  
nut-2.6.0) for the Smart-UPS 1000, right?


Anyway, at lease I have now shared the very limited knowledge that I  
have gained
from the exercise with the NUT user community, so maybe, hopefully,  
someone will

be able to benefit from it in the future.


They won't, because you have not posted the logs I asked you about.  
Only those will be able to provide us with the needed information  
about how to talk to your UPSes. We don't expect you to modify the  
code, but at least provide us with enough info so that one of the  
developers can do it.


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