Re: [Nut-upsuser] help with CyberPower 425HG

2011-10-17 Thread James Northcott / Chief Systems

On 11-10-16 01:51 PM, n...@johnea.net wrote:

On 2011-10-16 12:06, Ron wrote:

Rebooting worked for me too.  Wish I had read this post earlier


Hi Ron,

I've been struggling with nut and CyberPower USB devices for over a year now.

You may find connection to the UPS on boot to be unreliable, sometimes it will
connect, other times it won't.

 From the thread: Re: [Nut-upsuser] USB CyberPower
---
Hi James,

I've worked extensively on getting a similar CyberPower UPS (same IDs) to play
well with nut.

The conclusion I ultimately came to is that if this UPS is not connected to by
it's driver within about 20sec, it drops off the USB bus and re-enumerates. This
causes an endless cycle of the UPS attaching and detaching. In archlinux, I was 
able
to make it work by placing the nut daemon at the beginning of the rc scripts,
before everything else. This caused it to be attached to before it dropped from
the bus. Once it was attached, everything worked.

IMHO, If you can, return it and get a different unit.
---

As the text above indicates, the time between the system powering up, and the
driver trying to connect to the UPS is critical. If this time is too long
(greater than about 20sec) the UPS will have already disconnected from the USB
and the connection will fail. Thereafter the UPS will continuously re-enumerate,
wait about 20sec then disconnect again, and continue an endless cycle of
re-enumerate/wait 20sec/disconnect.



To add some more information, this cycle (re-enumerate/wait) will also 
occur if the driver is unloaded for any reason.


This means that the stock scripts for shutting down in case of power 
failure won't work on CyberPower UPSs, at least they didn't for me.  I 
had to adjust my shutdown scripts so that nut is never shut off, and the 
nut driver process is never sent the TERM/KILL signals during shutdown.  
Then, the UPS shutdown command works correctly.  Otherwise, as soon as 
the driver is unloaded the UPS goes into that cycle, and you cannot send 
a UPS command, so the machine shuts down normally, which is not what you 
want.



One major factor in the length of the delay on power up, was my computer's DHCP
delay. I found if I could get the nut driver to load prior to my computer going
out for DHCP, then it would reliably connect on boot.



This matches my experience too, I actually moved NUT to the very first 
item in the startup sequence.



If you have a static Network IP address, then this DHCP delay is not a factor
for you.

Anyway, try to connect to the UPS first, before any other boot time activity.

Thanks for your post! Please pass along your ongoing experiences...

johnea

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




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


Re: [Nut-upsuser] help with CyberPower 425HG

2011-10-16 Thread Ron

Rebooting worked for me too.  Wish I had read this post earlier





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


Re: [Nut-upsuser] help with CyberPower 425HG

2011-10-16 Thread nut
On 2011-10-16 12:06, Ron wrote:
 
 Rebooting worked for me too.  Wish I had read this post earlier
 

Hi Ron,

I've been struggling with nut and CyberPower USB devices for over a year now.

You may find connection to the UPS on boot to be unreliable, sometimes it will
connect, other times it won't.

From the thread: Re: [Nut-upsuser] USB CyberPower
---
Hi James,

I've worked extensively on getting a similar CyberPower UPS (same IDs) to play
well with nut.

The conclusion I ultimately came to is that if this UPS is not connected to by
it's driver within about 20sec, it drops off the USB bus and re-enumerates. This
causes an endless cycle of the UPS attaching and detaching. In archlinux, I was 
able
to make it work by placing the nut daemon at the beginning of the rc scripts,
before everything else. This caused it to be attached to before it dropped from
the bus. Once it was attached, everything worked.

IMHO, If you can, return it and get a different unit.
---

As the text above indicates, the time between the system powering up, and the
driver trying to connect to the UPS is critical. If this time is too long
(greater than about 20sec) the UPS will have already disconnected from the USB
and the connection will fail. Thereafter the UPS will continuously re-enumerate,
wait about 20sec then disconnect again, and continue an endless cycle of
re-enumerate/wait 20sec/disconnect.

One major factor in the length of the delay on power up, was my computer's DHCP
delay. I found if I could get the nut driver to load prior to my computer going
out for DHCP, then it would reliably connect on boot.

If you have a static Network IP address, then this DHCP delay is not a factor
for you.

Anyway, try to connect to the UPS first, before any other boot time activity.

Thanks for your post! Please pass along your ongoing experiences...

johnea

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


Re: [Nut-upsuser] help with CyberPower 425HG

2010-12-29 Thread Kjell Claesson
Hi James,
 $ sudo upsdrvctl start
 Network UPS Tools - UPS driver controller 2.4.3
 Network UPS Tools - Generic HID driver 0.34 (2.4.3)
 USB communication driver 0.31
 Using subdriver: CyberPower HID 0.3
 
OK, the driver seems to start.

But have you started the daemon (upsd)?

 $ sudo upsc my...@localhost
 Error: Driver not connected

Then you have to start the upsmon to monitor the ups.
-
Check with:
 ps xau |grep nut
nut   5324  0.0  0.0  12428   508 ?Ss   09:41   0:00 
/lib/nut/bcmxcp -a pw5115
nut   5348  0.0  0.0  40528   864 ?Ss   09:41   0:00 /usr/sbin/upsd
nut   5367  0.0  0.0  40496  1148 ?S09:41   0:00 
/usr/sbin/upsmon
-
You may also do:
ps xau |grep ups

Then you see that upsmon have two instants. One as nut and one as root.

Regards
Kjell


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


Re: [Nut-upsuser] help with CyberPower 425HG

2010-12-29 Thread James
On 12/29/10 04:19, Kjell Claesson wrote:
 Hi James,
 $ sudo upsdrvctl start
 Network UPS Tools - UPS driver controller 2.4.3
 Network UPS Tools - Generic HID driver 0.34 (2.4.3)
 USB communication driver 0.31
 Using subdriver: CyberPower HID 0.3

 OK, the driver seems to start.

 But have you started the daemon (upsd)?

 $ sudo upsc my...@localhost
 Error: Driver not connected
 Then you have to start the upsmon to monitor the ups.
 -
 Check with:
  ps xau |grep nut
 nut   5324  0.0  0.0  12428   508 ?Ss   09:41   0:00 
 /lib/nut/bcmxcp -a pw5115
 nut   5348  0.0  0.0  40528   864 ?Ss   09:41   0:00 
 /usr/sbin/upsd
 nut   5367  0.0  0.0  40496  1148 ?S09:41   0:00 
 /usr/sbin/upsmon
 -
 You may also do:
 ps xau |grep ups

 Then you see that upsmon have two instants. One as nut and one as root.

 Regards
 Kjell

Crazy, it worked after I rebooted.

Is 'battery.runtime' the time the UPS will last in seconds?

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


[Nut-upsuser] help with CyberPower 425HG

2010-12-28 Thread James L
$ sudo upsdrvctl start
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
Using subdriver: CyberPower HID 0.3

$ sudo upsc my...@localhost
Error: Driver not connected



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