Thanks Charles,
Post by Charles LepplePost by Mick$ upsrw -s "ups.delay.shutdown"="30" iDowell at localhost
Username (suzy): admin
OK
This command is sending the value to the UPS (via the usbhid-ups driver).
Post by Mick$ upsc iDowell at 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.
Post by Charles LepplePost by MickHowever, 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
The permissions are not applicable here.
Wasn't sure. Thanks for clarifying.
Post by Charles LeppleThe 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.
Post by Charles LeppleDoes 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:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x075d
idProduct 0x0300
bcdDevice 0.01
iManufacturer 3 iDowell
iProduct 1 iBox
iSerial 2 00000001
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
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 33 US
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 412
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 20
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
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.000000 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: 0000: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: 00000001
0.899856 - Bus: 003
0.899862 Trying to match device
0.899896 Device matches
0.899930 failed to claim USB device: Device or resource busy
0.900102 detached kernel driver from USB device...
0.907834 HID descriptor length 412
0.962825 Report Descriptor size = 412
0.963065 Using subdriver: EXPLORE HID 0.1
0.966834 Path: UPS.PowerConverter.PowerConverterID, Type: Feature,
ReportID: 0x0b, Offset: 0, Size: 8, Value: 0
0.966856 Path: UPS.PowerConverter.Output.OutputID, Type: Feature, ReportID:
0x0b, Offset: 8, Size: 8, Value: 0
0.970828 Path: UPS.PowerConverter.Output.Voltage, Type: Feature, ReportID:
0x0e, Offset: 0, Size: 8, Value: 230
0.974824 Path: UPS.PowerConverter.Output.LowVoltageTransfer, Type: Feature,
ReportID: 0x13, Offset: 0, Size: 8, Value: 105
0.974844 Path: UPS.PowerConverter.Output.HighVoltageTransfer, Type:
Feature, ReportID: 0x13, Offset: 8, Size: 16, Value: 254
0.974862 Path: UPS.Flow.[4].FlowID, Type: Feature, ReportID: 0x0b, Offset:
16, Size: 8, Value: 0
0.978823 Path: UPS.Flow.[4].ConfigVoltage, Type: Feature, ReportID: 0x12,
Offset: 0, Size: 8, Value: 230
0.982822 Path: UPS.Flow.[4].ConfigFrequency, Type: Feature, ReportID: 0x0d,
Offset: 0, Size: 8, Value: 50
0.982845 Path: UPS.Flow.[4].ConfigApparentPower, Type: Feature, ReportID:
0x0d, Offset: 8, Size: 16, Value: 257
0.982861 Path: UPS.PowerSummary.PowerSummaryID, Type: Feature, ReportID:
0x0b, Offset: 24, Size: 8, Value: 0
0.982876 Path: UPS.PowerSummary.FlowID, Type: Feature, ReportID: 0x0b,
Offset: 32, Size: 8, Value: 0
0.986836 Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID:
0x0c, Offset: 0, Size: 8, Value: 2
0.986861 Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature,
ReportID: 0x0c, Offset: 8, Size: 8, Value: 15
0.986878 Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature,
ReportID: 0x0c, Offset: 16, Size: 8, Value: 25
0.990825 Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID:
0x10, Offset: 0, Size: 8, Value: 4
0.990845 Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID:
0x10, Offset: 8, Size: 8, Value: 3
0.990860 Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x10,
Offset: 16, Size: 8, Value: 1
0.990875 Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID:
0x10, Offset: 24, Size: 8, Value: 5
0.990890 Path: UPS.PowerSummary.PercentLoad, Type: Feature, ReportID: 0x0e,
Offset: 8, Size: 8, Value: 33
0.990906 Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID:
0x0c, Offset: 24, Size: 8, Value: 100
0.990922 Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature,
ReportID: 0x0c, Offset: 32, Size: 8, Value: 100
0.994821 Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID:
0x16, Offset: 0, Size: 8, Value: 100
0.994841 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID:
0x16, Offset: 0, Size: 8, Value: 100
0.994857 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID:
0x16, Offset: 8, Size: 16, Value: 650
0.994872 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID:
0x16, Offset: 8, Size: 16, Value: 650
0.998820 Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type:
Input, ReportID: 0x01, Offset: 0, Size: 1, Value: 0
0.998839 Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type:
Feature, ReportID: 0x01, Offset: 0, Size: 1, Value: 0
0.998853 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input,
ReportID: 0x01, Offset: 1, Size: 7, Value: 0
0.998867 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Feature,
ReportID: 0x01, Offset: 1, Size: 7, Value: 0
1.002820 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input,
ReportID: 0x02, Offset: 0, Size: 1, Value: 1
1.002846 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input,
ReportID: 0x02, Offset: 1, Size: 1, Value: 1
1.002870 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input,
ReportID: 0x02, Offset: 2, Size: 1, Value: 0
1.002893 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit,
Type: Input, ReportID: 0x02, Offset: 3, Size: 1, Value: 0
1.002917 Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input,
ReportID: 0x02, Offset: 4, Size: 1, Value: 0
1.002938 Path: UPS.PowerSummary.PresentStatus.Good, Type: Input, ReportID:
0x02, Offset: 5, Size: 1, Value: 1
1.002960 Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type:
Input, ReportID: 0x02, Offset: 6, Size: 1, Value: 0
1.002977 Path: UPS.PowerSummary.PresentStatus.Overload, Type: Input,
ReportID: 0x02, Offset: 7, Size: 1, Value: 0
1.002992 Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Input,
ReportID: 0x02, Offset: 8, Size: 1, Value: 0
1.003007 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input,
ReportID: 0x02, Offset: 9, Size: 7, Value: 0
1.003021 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature,
ReportID: 0x02, Offset: 0, Size: 1, Value: 1
1.003036 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature,
ReportID: 0x02, Offset: 1, Size: 1, Value: 1
1.003050 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature,
ReportID: 0x02, Offset: 2, Size: 1, Value: 0
1.003065 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit,
Type: Feature, ReportID: 0x02, Offset: 3, Size: 1, Value: 0
1.003080 Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type:
Feature, ReportID: 0x02, Offset: 4, Size: 1, Value: 0
1.003095 Path: UPS.PowerSummary.PresentStatus.Good, Type: Feature,
ReportID: 0x02, Offset: 5, Size: 1, Value: 1
1.003110 Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type:
Feature, ReportID: 0x02, Offset: 6, Size: 1, Value: 0
1.003124 Path: UPS.PowerSummary.PresentStatus.Overload, Type: Feature,
ReportID: 0x02, Offset: 7, Size: 1, Value: 0
1.003139 Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type:
Feature, ReportID: 0x02, Offset: 8, Size: 1, Value: 0
1.003157 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Feature,
ReportID: 0x02, Offset: 9, Size: 7, Value: 0
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
1.010852 Report descriptor retrieved (Reportlen = 412)
1.010860 Found HID device
1.010868 Detected a UPS: iDowell/iBox
1.010877 find_nut_info: unknown info type: load.off.delay
1.010885 find_nut_info: unknown info type: load.on.delay
1.010891 find_nut_info: unknown info type: load.off.delay
1.010907 upsdrv_initinfo...
1.010922 upsdrv_updateinfo...
1.013819 Got 2 HID objects...
1.013840 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID:
0x16, Offset: 0, Size: 8, Value: 100
1.013859 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID:
0x16, Offset: 8, Size: 16, Value: 650
1.013868 Quick update...
1.013971 dstate_init: sock /var/lib/nut/usbhid-ups-iDowell open on fd 13
1.013990 upsdrv_updateinfo...
1.265832 libusb_get_interrupt: Connection timed out
1.265859 Got 0 HID objects...
1.265868 Quick update...
3.015637 upsdrv_updateinfo...
3.029830 Got 2 HID objects...
3.029856 Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type:
Input, ReportID: 0x01, Offset: 0, Size: 1, Value: 0
3.029872 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input,
ReportID: 0x01, Offset: 1, Size: 7, Value: 0
3.029883 Quick update...
5.017634 upsdrv_updateinfo...
5.029829 Got 10 HID objects...
5.029855 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input,
ReportID: 0x02, Offset: 0, Size: 1, Value: 1
5.029872 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input,
ReportID: 0x02, Offset: 1, Size: 1, Value: 1
5.029888 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input,
ReportID: 0x02, Offset: 2, Size: 1, Value: 0
5.029904 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit,
Type: Input, ReportID: 0x02, Offset: 3, Size: 1, Value: 0
5.029920 Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input,
ReportID: 0x02, Offset: 4, Size: 1, Value: 0
5.029935 Path: UPS.PowerSummary.PresentStatus.Good, Type: Input, ReportID:
0x02, Offset: 5, Size: 1, Value: 1
5.029951 Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type:
Input, ReportID: 0x02, Offset: 6, Size: 1, Value: 0
5.029966 Path: UPS.PowerSummary.PresentStatus.Overload, Type: Input,
ReportID: 0x02, Offset: 7, Size: 1, Value: 0
5.029981 Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Input,
ReportID: 0x02, Offset: 8, Size: 1, Value: 0
5.029997 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input,
ReportID: 0x02, Offset: 9, Size: 7, Value: 0
5.030007 Quick update...
7.019635 upsdrv_updateinfo...
7.029830 Got 2 HID objects...
7.029857 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID:
0x16, Offset: 0, Size: 8, Value: 100
7.029875 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID:
0x16, Offset: 8, Size: 16, Value: 650
7.029885 Quick update...
9.021636 upsdrv_updateinfo...
9.029828 Got 2 HID objects...
9.029852 Path: UPS.PowerSummary.PresentStatus.CommunicationLost, Type:
Input, ReportID: 0x01, Offset: 0, Size: 1, Value: 0
9.029869 Path: UPS.PowerSummary.PresentStatus.Undefined, Type: Input,
ReportID: 0x01, Offset: 1, Size: 7, Value: 0
9.029880 Quick update...
11.023640 upsdrv_updateinfo...
11.029834 Got 2 HID objects...
11.029862 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID:
0x16, Offset: 0, Size: 8, Value: 100
11.029881 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID:
0x16, Offset: 8, Size: 16, Value: 650
11.029892 Quick update...
====================================
Please ask for more info if needed.
--
Regards,
Mick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140405/699c6a0c/attachment.sig>