Re: [Nut-upsuser] snmp-ups sends status "OL OB" on HP R3000 UPS with AF465A management card [UPDATE]

2014-04-05 Thread Arnaud Quette
Philippe, Ivan,

please see https://github.com/networkupstools/nut/issues/118
and send back your data.

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

Re: [Nut-upsuser] I can't make changes to ups.delay.shutdown to stick

2014-04-05 Thread Charles Lepple
On Apr 5, 2014, at 10:39 AM, Charles Lepple wrote:

> On Apr 5, 2014, at 8:52 AM, Mick  wrote:
> 
>>> The upsrw command was designed for changing variables that are typically
>>> stored in non-volatile memory on the UPS. Unfortunately, your UPS doesn't
>>> seem to do that.
>> 
>> Well, if it doesn't do that, how come upsc reports the changed value?  It is 
>> only after I reboot the PC (not the UPS) or restart the driver that the 
>> default value of 20s is shown again.
> 
> I'd have to check the code, but I'm fairly certain that writing a variable 
> invalidates at least part of the HID cache in the driver.
> 
> However, it is possible that something in the driver initialization is 
> resetting that variable. Are there any extra settings in ups.conf? Can you 
> please send a driver log with -, gzipped and attached (so as not to wrap 
> the lines)? Same length of time as before is good.


Mick, hold that thought.

  1.006824  Path: UPS.PowerSummary.DelayBeforeShutdown, Type: Feature, 
ReportID: 0x0f, Offset: 0, Size: 24, Value: 60
  1.010820  Path: UPS.PowerSummary.DelayBeforeStartup, Type: Feature, 
ReportID: 0x11, Offset: 0, Size: 24, Value: 0

Arnaud, is HU_FLAG_ABSENT the right flag here? That seems to indicate that the 
variable is not actually implemented on the UPS:

drivers/idowell-hid.c:99:
{ "ups.delay.start", ST_FLAG_RW | ST_FLAG_STRING, 10, 
"UPS.PowerSummary.DelayBeforeStartup", NULL, DEFAULT_ONDELAY, HU_FLAG_ABSENT, 
NULL},
{ "ups.delay.shutdown", ST_FLAG_RW | ST_FLAG_STRING, 10, 
"UPS.PowerSummary.DelayBeforeShutdown", NULL, DEFAULT_OFFDELAY, HU_FLAG_ABSENT, 
NULL},

It is not clear how this value is being used.

-- 
Charles Lepple
clepple@gmail




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


Re: [Nut-upsuser] I can't make changes to ups.delay.shutdown to stick

2014-04-05 Thread Charles Lepple

On Apr 5, 2014, at 8:52 AM, Mick  wrote:

>> The upsrw command was designed for changing variables that are typically
>> stored in non-volatile memory on the UPS. Unfortunately, your UPS doesn't
>> seem to do that.
> 
> Well, if it doesn't do that, how come upsc reports the changed value?  It is 
> only after I reboot the PC (not the UPS) or restart the driver that the 
> default value of 20s is shown again.

I'd have to check the code, but I'm fairly certain that writing a variable 
invalidates at least part of the HID cache in the driver.

However, it is possible that something in the driver initialization is 
resetting that variable. Are there any extra settings in ups.conf? Can you 
please send a driver log with -, gzipped and attached (so as not to wrap 
the lines)? Same length of time as before is good.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] I can't make changes to ups.delay.shutdown to stick

2014-04-05 Thread Mick
Thanks Charles,

On Saturday 05 Apr 2014 12:53:06 Charles Lepple wrote:
> On Apr 5, 2014, at 7:18 AM, Mick wrote:
> > $ upsrw -s "ups.delay.shutdown"="30" iDowell@localhost
> > Username (suzy): admin
> > Password:
> > OK
> 
> This command is sending the value to the UPS (via the usbhid-ups driver).
> 
> > $ upsc iDowell@localhost ups.delay.shutdown
> > 30
> 
> And this command ends up reading the value back from the UPS.

Right, so things are apparently working as they ought to.


> > However, following a reboot the ups.delay.shutdown reverts to the default
> > value of 20s.  I tried running the upsrw -s command as root, but also got
> > 20s after a reboot.  This is what the access rights of the configuration
> > files look like:
> The permissions are not applicable here.

Wasn't sure.  Thanks for clarifying.


> The upsrw command was designed for changing variables that are typically
> stored in non-volatile memory on the UPS. Unfortunately, your UPS doesn't
> seem to do that.

Well, if it doesn't do that, how come upsc reports the changed value?  It is 
only after I reboot the PC (not the UPS) or restart the driver that the 
default value of 20s is shown again.


> Does the UPS respect the delay setting? (might be easier to see with a much
> larger delay value.) If not, there is a chance that the mappings from NUT
> variable names to HID identifiers are incorrect.

I can't really test the UPS in anger because it is feeding other devices (ADSL 
modem and a couple of routers) which I do not want to lose power to.


This is what the USB device reports:
===
# lsusb -vv -d 075d:0300

Bus 003 Device 009: ID 075d:0300  
Device Descriptor:
  bLength18
  bDescriptorType 1
  bcdUSB   1.10
  bDeviceClass0 (Defined at Interface level)
  bDeviceSubClass 0 
  bDeviceProtocol 0 
  bMaxPacketSize0 8
  idVendor   0x075d 
  idProduct  0x0300 
  bcdDevice0.01
  iManufacturer   3 iDowell
  iProduct1 iBox
  iSerial 2 0001
  bNumConfigurations  1
  Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength   41
bNumInterfaces  1
bConfigurationValue 1
iConfiguration  0 
bmAttributes 0x60
  (Missing must-be-set bit!)
  Self Powered
  Remote Wakeup
MaxPower   10mA
Interface Descriptor:
  bLength 9
  bDescriptorType 4
  bInterfaceNumber0
  bAlternateSetting   0
  bNumEndpoints   2
  bInterfaceClass 3 Human Interface Device
  bInterfaceSubClass  0 No Subclass
  bInterfaceProtocol  0 None
  iInterface  0 
HID Device Descriptor:
  bLength 9
  bDescriptorType33
  bcdHID   1.10
  bCountryCode   33 US
  bNumDescriptors 1
  bDescriptorType34 Report
  wDescriptorLength 412
 Report Descriptors: 
   ** UNAVAILABLE **
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81  EP 1 IN
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0008  1x 8 bytes
bInterval  20
  Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02  EP 2 OUT
bmAttributes3
  Transfer TypeInterrupt
  Synch Type   None
  Usage Type   Data
wMaxPacketSize 0x0002  1x 2 bytes
bInterval  20
Device Status: 0x0001
  Self Powered
===


This is what the driver reports:
===
# /lib/nut/usbhid-ups -DD -a iDowell
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
   0.00 debug level is '2'
   0.001089 upsdrv_initups...
   0.004692 Checking device (1D6B/0002) (001/001)
   0.025842 - VendorID: 1d6b
   0.025888 - ProductID: 0002
   0.025927 - Manufacturer: Linux 3.12.13-gentoo ehci_hcd
   0.025972 - Product: EHCI Host Controller
   0.026020 - Serial Number: :00:1d.7
   0.026066 - Bus: 001
   0.026109 Trying to match device
   0.026322 Device does not match - skipping
[snip ...]

   0.865043 Checking device (075D/0300) (003/025)
   0.899813 - VendorID: 075d
   0.899832 - ProductID: 0300
   0.899839 - Manufacturer: iDowell
   0.899844 - Product: iBox
   0.899849 - Serial Number: 0001
   0.899856 - Bus: 003
   0.899862 Trying to match device
   0.899896 

Re: [Nut-upsuser] I can't make changes to ups.delay.shutdown to stick

2014-04-05 Thread Charles Lepple
On Apr 5, 2014, at 7:18 AM, Mick wrote:

> $ upsrw -s "ups.delay.shutdown"="30" iDowell@localhost
> Username (suzy): admin
> Password: 
> OK

This command is sending the value to the UPS (via the usbhid-ups driver).

> $ upsc iDowell@localhost ups.delay.shutdown
> 30

And this command ends up reading the value back from the UPS.

> However, following a reboot the ups.delay.shutdown reverts to the default 
> value of 20s.  I tried running the upsrw -s command as root, but also got 20s 
> after a reboot.  This is what the access rights of the configuration files 
> look like:

The permissions are not applicable here.

The upsrw command was designed for changing variables that are typically stored 
in non-volatile memory on the UPS. Unfortunately, your UPS doesn't seem to do 
that.

Does the UPS respect the delay setting? (might be easier to see with a much 
larger delay value.) If not, there is a chance that the mappings from NUT 
variable names to HID identifiers are incorrect.

-- 
Charles Lepple
clepple@gmail




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


[Nut-upsuser] I can't make changes to ups.delay.shutdown to stick

2014-04-05 Thread Mick
Hi All,

I'm using an iDowell UPS with the usbhid-ups driver:

$ upsc iDowell@localhost
battery.charge: 100
battery.charge.low: 15
battery.runtime: 650
battery.type: Pb acc
device.mfr: iDowell
device.model: iBox
device.serial: 0001
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0300
driver.parameter.vendorid: 075d
driver.version: 2.6.5
driver.version.data: iDowell HID 0.1
driver.version.internal: 0.37
input.transfer.high: 254
input.transfer.low: 105
output.frequency.nominal: 50
output.voltage: 230.0
output.voltage.nominal: 230
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 33
ups.mfr: iDowell
ups.model: iBox
ups.power.nominal: 257
ups.productid: 0300
ups.serial: 0001
ups.status: OL CHRG
ups.timer.shutdown: 60
ups.timer.start: 0
ups.vendorid: 075d

I thought of increasing the ups.delay.shutdown value from 20 to a higher 
value.

The changes seem to take:

$ upsc iDowell@localhost ups.delay.shutdown
20

$ upsrw -s "ups.delay.shutdown"="30" iDowell@localhost
Username (suzy): admin
Password: 
OK

$ upsc iDowell@localhost ups.delay.shutdown
30


However, following a reboot the ups.delay.shutdown reverts to the default 
value of 20s.  I tried running the upsrw -s command as root, but also got 20s 
after a reboot.  This is what the access rights of the configuration files 
look like:

$ ls -la /etc/nut
total 48
drwxr-xr-x   2 root root  4096 Apr  4 19:09 .
drwxr-xr-x 105 root root 12288 Apr  5 08:15 ..
-rw-r--r--   1 root root  1546 Sep 22  2013 nut.conf
-rw-r--r--   1 root root  3805 Sep 18  2011 ups.conf
-rw-r-   1 root nut   2744 Oct  9 06:50 upsd.conf
-rw-r-   1 root nut   2301 Oct  9 06:50 upsd.users
-rw-r-   1 root nut  11982 Oct  9 06:47 upsmon.conf
-rw-r--r--   1 root root  3891 Sep 22  2013 upssched.conf


How is this supposed to work?

-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser