Re: [Nut-upsuser] Plexus UPS 1000V - megatec_usb

2008-01-04 Thread Alexander I. Gordeev
On Fri, 28 Dec 2007 17:45:02 +0300, Charles Lepple [EMAIL PROTECTED] wrote:

 On Dec 28, 2007 8:52 AM,  [EMAIL PROTECTED] wrote:
 But shutdown is still not implemented (at least in the krauler subdriver)!
 And I'can't help to support shutdown because my own UPS doesn't do it well.

 There are two shutdowns here - shutting down the PC based on the low
 battery condition (signaled by ups.status) and shutting down the UPS
 itself.

 Even if you can't shut down the UPS itself, shutting down the PC may
 still be useful.


Sorry, I was away from computers.
Actually, both types of shutdown are not available :(
My UPS is currently used to power a server, so I can't really experiment
with shutdown. But if ever it is freed, I'll hack it further.

-- 
   Alexander

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


Re: [Nut-upsuser] Plexus UPS 1000V - megatec_usb

2007-12-28 Thread lasaine
On Fri, Dec 28, 2007 at 01:23:43PM +, Carlos Rodrigues wrote:
 On Dec 28, 2007 10:29 AM, Jason Pearce [EMAIL PROTECTED] wrote:
   Thanks for your reply. Do you know if this is something that is going to be
  fixed - and does it prevent normal use of the nut driver ?
 
 Well, the problem is with the UPS firmware itself, and it does prevent
 use of the driver. If the driver thinks the UPS is off, it will not
 notice it if is on-battery or not.
 
 I may provide a workaround, but you need to run a little test: with
 the UPS powering something other than the computer (a lightbulb, for
 example), tell the UPS to power off the load by sending it an instant
 command:
 
 upscmd -u nut_admin_user -p nut_admin_password your_ups load.off
 
 Then, run upsc your_ups to see the status. The status will either
 remain OFF or switch to something else (OL). Either way, I'll know
 what's needed, if an option to interpret the OFF bit the other way
 around, or just ignore it.


But shutdown is still not implemented (at least in the krauler subdriver)!
And I'can't help to support shutdown because my own UPS doesn't do it well.

--
  Alexander

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


Re: [Nut-upsuser] Plexus UPS 1000V - megatec_usb

2007-12-28 Thread Carlos Rodrigues
On Dec 28, 2007 1:52 PM,  [EMAIL PROTECTED] wrote:
 But shutdown is still not implemented (at least in the krauler subdriver)!
 And I'can't help to support shutdown because my own UPS doesn't do it well.

No shutdown whatsoever?

-- 
Carlos Rodrigues

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


Re: [Nut-upsuser] Plexus UPS 1000V - megatec_usb

2007-12-28 Thread Carlos Rodrigues
On Dec 28, 2007 6:59 PM, Jason Pearce [EMAIL PROTECTED] wrote:
  I have recompiled with the patched megatec.c and have added ignoreoff to my
 ups.conf

  However, I now receive this error :

   /usr/local/ups/bin/megatec_usb -a plexus
  Network UPS Tools 2.2.1 - Megatec protocol driver 1.5.9 [megatec_usb]
  Carlos Rodrigues (c) 2003-2007

  Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
  Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c)
 2007


  Fatal error: 'ignoreoff' is not a valid flag for this driver.

  Look in the man page or call this driver with -h for a list of
  valid variable names and flags.

Did you replace only the megatec binary? megatec_usb is also rebuilt
when megatec.c changes and should also be replaced if you are copying
manually.

-- 
Carlos Rodrigues

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


Re: [Nut-upsuser] Plexus UPS 1000V - megatec_usb

2007-12-28 Thread Jason Pearce

Carlos Rodrigues wrote:

On Dec 28, 2007 6:59 PM, Jason Pearce [EMAIL PROTECTED] wrote:
  

 I have recompiled with the patched megatec.c and have added ignoreoff to my
ups.conf

 However, I now receive this error :

  /usr/local/ups/bin/megatec_usb -a plexus
 Network UPS Tools 2.2.1 - Megatec protocol driver 1.5.9 [megatec_usb]
 Carlos Rodrigues (c) 2003-2007

 Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
 Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c)
2007


 Fatal error: 'ignoreoff' is not a valid flag for this driver.

 Look in the man page or call this driver with -h for a list of
 valid variable names and flags.



Did you replace only the megatec binary? megatec_usb is also rebuilt
when megatec.c changes and should also be replaced if you are copying
manually.

  

Carlos Rodrigues wrote:

On Dec 28, 2007 6:59 PM, Jason Pearce [EMAIL PROTECTED] wrote:
  

 I have recompiled with the patched megatec.c and have added ignoreoff to my
ups.conf

 However, I now receive this error :

  /usr/local/ups/bin/megatec_usb -a plexus
 Network UPS Tools 2.2.1 - Megatec protocol driver 1.5.9 [megatec_usb]
 Carlos Rodrigues (c) 2003-2007

 Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
 Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c)
2007


 Fatal error: 'ignoreoff' is not a valid flag for this driver.

 Look in the man page or call this driver with -h for a list of
 valid variable names and flags.



Did you replace only the megatec binary? megatec_usb is also rebuilt
when megatec.c changes and should also be replaced if you are copying
manually.

  

patch -p0  ../megatec-ignoreoff.diff
patching file drivers/megatec.c
Hunk #4 FAILED at 486.
Hunk #5 FAILED at 799.
2 out of 5 hunks FAILED -- saving rejects to file drivers/megatec.c.rej

more drivers/megatec.c.rej
***
*** 472,478 
   fatalx(EXIT_FAILURE, Error in \battvolts\ 
parameter.);

   }

-   upslogx(LOG_NOTICE, Overriding battery voltage interval 
[%.1fV, %.1fV]., battvolt_empty, battvolt_full);

   }

   if (battvolt_empty  0 || battvolt_full  0) {
--- 486,492 
   fatalx(EXIT_FAILURE, Error in \battvolts\ 
parameter.);

   }

+   upslogx(LOG_NOTICE, Overriding battery voltage interval 
[%.1fV, %.1fV]., battvolt_empty, battvolt_full);

   }

   if (battvolt_empty  0 || battvolt_full  0) {
***
*** 785,790 
   addvar(VAR_VALUE, ondelay, Minimum delay before UPS startup 
(minutes));
   addvar(VAR_VALUE, offdelay, Delay before UPS shutdown 
(minutes));

   addvar(VAR_VALUE, battvolts, Battery voltages (empty:full));

   megatec_subdrv_makevartable();
 }
--- 799,805 
   addvar(VAR_VALUE, ondelay, Minimum delay before UPS startup 
(minutes));
   addvar(VAR_VALUE, offdelay, Delay before UPS shutdown 
(minutes));

   addvar(VAR_VALUE, battvolts, Battery voltages (empty:full));
+   addvar(VAR_FLAG, ignoreoff, Ignore the OFF status reported by 
the UPS.);


   megatec_subdrv_makevartable();
 }
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser