Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add S/N to ups.conf and nut breaks #2439

Open
Briandr73 opened this issue May 10, 2024 · 13 comments
Open

Add S/N to ups.conf and nut breaks #2439

Briandr73 opened this issue May 10, 2024 · 13 comments

Comments

@Briandr73
Copy link

Briandr73 commented May 10, 2024

Hi,

I want to add my UPS s/n to ups.conf but when I do I cannot get data when using the upsc command. Remove the s/n line and reboot the Pi and nut is happy. Is it possible the s/n has to be all numbers and no letters? Suggestions please?

image

@jimklimov
Copy link
Member

The serial is a string matched against what libusb says about the device, so possibly your wording is different?

If you start the driver with higher debug verbosity, or run nut-scanner, or lsusb, etc. you can see the value. Maybe it ends with a stream of spaces? Although matching is tried as exact then regex, so extra chars may not matter (or may need a .* depending on regex lib).

@Briandr73
Copy link
Author

Nut detects all my CyberPower UPS's as:

image

I for the most have accepted this just being glad to get some info on them to use in Home Assistant. I looked at the bottom of the ups and noted the s/n. Just wondering why lsusb is only seeing what I have as one model

@Briandr73
Copy link
Author

Briandr73 commented May 11, 2024

I just noticed one of my UPS's connected to an Orange Pi 800 is detecting a serial number. I am not sure if it is the right one. Would need to go visit the ups in basement. Weird thing is both are using the same driver detected by lsusb

image

the one that is better:
image

@jimklimov
Copy link
Member

Just in case - which NUT version is this about, and do you have several UPSes monitored directly by the same system or just one per box?

With current HA I'd expect some recent package to be involved in the container, so it would probably include the new semi-hacky setting to allow "duplicates" (when several devices do not publish enough clues to discern them). This allows to monitor several UPSes and know how many of them are okay or have a problem, but not really know which one. If they power e.g. redundant power sources of same servers, this is an acceptable trade-off.

The device/bus/port settings (availability and functionality depends on NUT version) can help pinpoint the connection to a specific device, but at risk that some USB re-enumeration would shuffle up the numbers involved - so recent versions of nut-scanner do not offer the current values by default, as the safer choice.

In the recent screenshots, note that the driver.parameter.serial is the value you've set in ups.conf on that system (might be a regex, etc.). A device.serial is indeed what the device reports. It may well be that some devices/firmwares just do not report a serial, or report a bogus value (all zeroes, spaces, empty, etc.)

@jimklimov
Copy link
Member

Check in the Wiki here about https://github.com/networkupstools/nut/wiki/Changing-NUT-daemon-debug-verbosity and perhaps https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests (at least, in the end it says how to run a driver program - after stopping the services that wrap it - to dump discovered information).

Either way, running usbhid-ups -DDDDDD -a YourUpsName should reveal what connection metadata it sees from each device it walks.

Also note that in the later screenshots you have NUT v2.7.4 - that's quite old now, about 7 years (although some distros still ship it and not the newer releases).

@Briandr73
Copy link
Author

Each UPS is attached to its own Pi so it is per box. Even with the one that does detect the s/n the HA group responsible for nut did not feel it necessary to create a sensor for the respective s/n. I just checked and nut on the orange pi is running 2.7.4 which is the one showing me the s/n. I think that one is debian based. the other nuts in my home are running 2.8.0 which don't show me s/n. I think for me I would be happy just to get accurate ups info from the Pi's. HA despite its fast and regular release cycle I don't think has touched on nut in a while. Might be wrong on that.

Do I use the actual name on the ups for this: usbhid-ups -DDDDDD -a YourUpsName

@jimklimov
Copy link
Member

Do I use the actual name on the ups for this: usbhid-ups -DDDDDD -a YourUpsName

Yes, as the section name from ups.conf

@Briandr73
Copy link
Author

I keep getting command not found when I run this command. A search of google is not showing me samples of the code you would like me to run. Can you show screenshot from a terminal window one of your devices?

@jimklimov
Copy link
Member

Assuming you have NUT packaged in a Debian-like system, driver program names would be like /lib/nut/usbhid-ups. Otherwise, research your distro's metadata or use find to locate the program.

@Briandr73
Copy link
Author

Briandr73 commented May 13, 2024

NUT is running on the Rasperry Pi and /lib/nut/usbhid-ups is right where you indicated it was.

Apologies but when I try the command from terminal I get an error

image

@jimklimov
Copy link
Member

jimklimov commented May 14, 2024

In Unix/Linux for programs not in PATH you have to specify the directory to run a program - a . for current working directory (e.g. ./usbhid-ups when your shell is in /lib/nut) or fully qualified (/lib/nut/usbhid-ups) generally.

Also, the section name for the UPS is without the square bracket mark-up :)

So for your case, this should do it:

:; /lib/nut/usbhid-ups -DDDDDD -a bedroom-ups

Probably you can run it as your own user account to see just what meta-data (serial and other IDs) the driver would consider and why it ruled some out. If it however claims a lot of unknowns, or fails to see config files, etc. you would need to initiate the command as root for it to have permissions to the USB device and make sure the driver as a service is stopped, so there are no conflicts in this area.

@Briandr73
Copy link
Author

Briandr73 commented May 14, 2024

It doesn't appear this is going to help out alot based on running this.

Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
0.000000 send_to_all: SETINFO driver.parameter.port "auto"
0.000492 send_to_all: SETINFO driver.parameter.vendorid "0764"
0.000764 send_to_all: SETINFO driver.parameter.productid "0501"
0.000847 send_to_all: SETINFO driver.parameter.product "ST Series"
0.000911 send_to_all: SETINFO driver.parameter.vendor "CPS"
0.000973 send_to_all: SETINFO driver.parameter.bus "001"
0.001063 debug level is '6'
0.008500 upsdrv_initups...
0.039693 Checking device (1D6B/0003) (002/001)
0.039936 - VendorID: 1d6b
0.039995 - ProductID: 0003
0.040040 - Manufacturer: unknown
0.040084 - Product: unknown
0.040128 - Serial Number: unknown
0.040171 - Bus: 002
0.040213 - Device release number: 0601
0.040258 Trying to match device
0.040397 Device does not match - skipping
0.040523 Checking device (0764/0501) (001/003)
0.049861 - VendorID: 0764
0.049987 - ProductID: 0501
0.050032 - Manufacturer: CPS
0.050076 - Product: ST Series
0.050185 - Serial Number: unknown
0.050233 - Bus: 001
0.050284 - Device release number: 0001
0.050329 Trying to match device
0.050625 Device matches
0.050721 failed to claim USB device: could not claim interface 0: Device or resource busy
0.051002 detached kernel driver from USB device...
0.051130 nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)
0.053075 HID descriptor, method 1: (9 bytes) => 09 21 10 01 21 01 22 57 02
0.053168 HID descriptor length (method 1) 599
0.053215 i=0, extra[i]=09, extra[i+1]=21
0.053266 HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 57 02
0.053312 HID descriptor length (method 2) 599
0.053371 HID descriptor length 599
0.093120 Report Descriptor size = 599
0.093222 Report Descriptor: (599 bytes) => 05 84 09 04 a1 01 09 24 a1 00 85 1d 09 fe
0.093282 75 08 95 01 15 00 26 ff 00 b1 22 85 03 09 fd b1 22 05 85 09 8f b1 22 85 04
0.093340 09 89 b1 22 85 1e 95 02 06 01 ff 09 d0 09 d1 b1 22 85 3d 75 01 95 01 25 02
0.093398 09 ac b1 22 75 07 b1 03 85 29 75 08 26 ff 00 09 9e b1 22 09 9e 81 23 85 06
0.093457 95 02 25 03 05 85 09 8b 09 2c b1 22 85 07 95 06 25 64 09 83 09 8d 09 8e 09
0.093514 8c 09 29 09 67 b1 22 85 20 95 01 09 66 b1 a2 09 66 81 23 75 10 27 ff ff 00
0.093571 00 67 21 d1 f0 00 55 06 05 84 09 30 b1 a2 09 30 81 23 85 21 66 01 10 55 00
0.093628 05 85 09 68 b1 a2 09 68 81 23 85 82 26 58 02 09 2a 81 23 09 2a b1 a2 85 3f
0.093687 27 ff ff 00 00 67 21 d1 f0 00 55 06 05 84 09 40 b1 22 09 02 a1 02 85 22 75
0.093748 01 95 06 25 01 65 00 55 00 05 85 09 d0 09 44 09 45 09 46 09 43 09 42 b1 a2
0.093806 09 d0 09 44 09 45 09 46 09 43 09 42 81 23 95 01 75 02 b1 01 81 23 c0 85 80
0.093863 75 08 15 01 25 03 05 84 09 5a b1 a2 09 5a 81 23 c0 05 84 09 1a a1 00 85 23
0.093920 75 10 15 00 26 5e 01 67 21 d1 f0 00 55 07 05 84 09 30 b1 a2 09 30 81 23 85
0.093977 83 09 53 15 5b 25 64 b1 22 85 84 09 54 16 87 00 26 90 00 b1 22 85 88 16 00
0.094035 00 26 00 00 09 40 b1 a2 09 40 81 23 c0 09 1c a1 00 85 23 15 00 26 2c 01 09
0.094093 30 b1 a2 09 30 81 23 85 25 75 08 26 ff 00 65 00 55 00 09 35 b1 a2 09 35 81
0.094367 23 85 28 75 01 25 01 95 01 65 00 55 00 09 65 b1 a2 09 65 81 23 75 07 95 01
0.094433 b1 01 81 23 85 3e 75 10 27 ff ff 00 00 66 21 d1 55 07 09 44 b1 a2 85 85 75
0.094491 08 25 06 65 00 55 00 09 58 b1 a2 09 58 81 23 85 86 75 10 15 ff 26 ff 7f 35
0.094549 c4 47 c4 ff 1d 00 66 01 10 55 00 09 57 b1 a2 09 57 81 23 85 87 09 56 b1 a2
0.094632 09 56 81 23 c0 06 01 ff 09 e1 a1 01 85 89 75 08 95 07 15 00 26 ff 00 35 00
0.094691 46 ff 00 65 00 55 00 09 e0 b2 a2 01 85 1b 95 01 25 0a 45 0a 09 e3 b1 a2 85
0.094749 1c 25 01 45 01 09 e2 b1 a2 c0 09 ba a1 02 65 00 55 00 15 00 35 00 45 00 85
0.094806 78 75 10 27 ff ff 00 00 09 bb b1 22 75 08 26 ff 00 09 bc b1 22 75 10 27 ff
0.094855 ff 00 00 09 bd b2 a2 01 c0 c0
0.095264 Using subdriver: CyberPower HID 0.4
0.095583 65 HID objects found
0.095633 Entering libusb_get_report
0.172328 Report[get]: (2 bytes) => 1d 01
0.172389 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.172410 Unit = 00000000, UnitExp = 0
0.172429 Exponent = 0
0.172450 hid_lookup_path: 00840004 -> UPS
0.172471 hid_lookup_path: 00840024 -> PowerSummary
0.172492 hid_lookup_path: 008400fe -> iProduct
0.172515 Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x1d, Offset: 0, Size: 8, Value: 1
0.172537 Entering libusb_get_report
0.317310 Report[get]: (3 bytes) => 03 03 07
0.317363 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.317387 Unit = 00000000, UnitExp = 0
0.317410 Exponent = 0
0.317437 hid_lookup_path: 00840004 -> UPS
0.317462 hid_lookup_path: 00840024 -> PowerSummary
0.317518 hid_lookup_path: 008400fd -> iManufacturer
0.317546 Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x03, Offset: 0, Size: 8, Value: 3
0.317574 Report[buf]: (3 bytes) => 03 03 07
0.317596 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.317619 Unit = 00000000, UnitExp = 0
0.317640 Exponent = 0
0.317662 hid_lookup_path: 00840004 -> UPS
0.317689 hid_lookup_path: 00840024 -> PowerSummary
0.317714 hid_lookup_path: 0085008f -> iOEMInformation
0.317738 Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x03, Offset: 8, Size: 8, Value: 7
0.317763 Entering libusb_get_report
0.462837 Report[get]: (2 bytes) => 04 04
0.462893 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.462918 Unit = 00000000, UnitExp = 0
0.462940 Exponent = 0
0.462965 hid_lookup_path: 00840004 -> UPS
0.462992 hid_lookup_path: 00840024 -> PowerSummary
0.463018 hid_lookup_path: 00850089 -> iDeviceChemistry
0.463044 Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 4
0.463078 Entering libusb_get_report
0.608097 Report[get]: (3 bytes) => 1e 05 06
0.608161 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.608185 Unit = 00000000, UnitExp = 0
0.608207 Exponent = 0
0.608231 hid_lookup_path: 00840004 -> UPS
0.608255 hid_lookup_path: 00840024 -> PowerSummary
0.608278 hid_lookup_path: ff0100d0 -> not found in lookup table
0.608304 Path: UPS.PowerSummary.ff0100d0, Type: Feature, ReportID: 0x1e, Offset: 0, Size: 8, Value: 5
0.608330 Report[buf]: (3 bytes) => 1e 05 06
0.608354 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.608377 Unit = 00000000, UnitExp = 0
0.608398 Exponent = 0
0.608420 hid_lookup_path: 00840004 -> UPS
0.608442 hid_lookup_path: 00840024 -> PowerSummary
0.608464 hid_lookup_path: ff0100d1 -> not found in lookup table
0.608487 Path: UPS.PowerSummary.ff0100d1, Type: Feature, ReportID: 0x1e, Offset: 8, Size: 8, Value: 6
0.608512 Entering libusb_get_report
0.824149 Report[get]: (2 bytes) => 3d 01
0.824204 PhyMax = 0, PhyMin = 0, LogMax = 2, LogMin = 0
0.824225 Unit = 00000000, UnitExp = 0
0.824244 Exponent = 0
0.824265 hid_lookup_path: 00840004 -> UPS
0.824286 hid_lookup_path: 00840024 -> PowerSummary
0.824307 hid_lookup_path: ff0100ac -> not found in lookup table
0.824330 Path: UPS.PowerSummary.ff0100ac, Type: Feature, ReportID: 0x3d, Offset: 0, Size: 1, Value: 1
0.824352 Entering libusb_get_report
1.040907 Report[get]: (2 bytes) => 29 00
1.040961 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
1.040982 Unit = 00000000, UnitExp = 0
1.041001 Exponent = 0
1.041022 hid_lookup_path: 00840004 -> UPS
1.041043 hid_lookup_path: 00840024 -> PowerSummary
1.041065 hid_lookup_path: ff01009e -> not found in lookup table
1.041088 Path: UPS.PowerSummary.ff01009e, Type: Feature, ReportID: 0x29, Offset: 0, Size: 8, Value: 0
1.041112 Report[buf]: (2 bytes) => 29 00
1.041131 PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
1.041151 Unit = 00000000, UnitExp = 0
1.041170 Exponent = 0
1.041194 hid_lookup_path: 00840004 -> UPS
1.041221 hid_lookup_path: 00840024 -> PowerSummary
1.041245 hid_lookup_path: ff01009e -> not found in lookup table
1.041270 Path: UPS.PowerSummary.ff01009e, Type: Input, ReportID: 0x29, Offset: 0, Size: 8, Value: 0
1.041295 Entering libusb_get_report
1.185675 Report[get]: (3 bytes) => 06 01 02
1.185729 PhyMax = 0, PhyMin = 0, LogMax = 3, LogMin = 0
1.185752 Unit = 00000000, UnitExp = 0
1.185775 Exponent = 0
1.185800 hid_lookup_path: 00840004 -> UPS
1.185824 hid_lookup_path: 00840024 -> PowerSummary
1.185849 hid_lookup_path: 0085008b -> Rechargeable
1.185875 Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 1
1.185903 Report[buf]: (3 bytes) => 06 01 02
1.185927 PhyMax = 0, PhyMin = 0, LogMax = 3, LogMin = 0
1.185950 Unit = 00000000, UnitExp = 0
1.185975 Exponent = 0
1.185998 hid_lookup_path: 00840004 -> UPS
1.186021 hid_lookup_path: 00840024 -> PowerSummary
1.186046 hid_lookup_path: 0085002c -> CapacityMode
1.186072 Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x06, Offset: 8, Size: 8, Value: 2
1.186103 Entering libusb_get_report
1.330947 Report[get]: (7 bytes) => 07 64 05 0a 14 0a 64
1.331005 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.331029 Unit = 00000000, UnitExp = 0
1.331051 Exponent = 0
1.331075 hid_lookup_path: 00840004 -> UPS
1.331099 hid_lookup_path: 00840024 -> PowerSummary
1.331124 hid_lookup_path: 00850083 -> DesignCapacity
1.331151 Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 100
1.331181 Report[buf]: (7 bytes) => 07 64 05 0a 14 0a 64
1.331205 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.331227 Unit = 00000000, UnitExp = 0
1.331249 Exponent = 0
1.331271 hid_lookup_path: 00840004 -> UPS
1.331294 hid_lookup_path: 00840024 -> PowerSummary
1.331319 hid_lookup_path: 0085008d -> CapacityGranularity1
1.331343 Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x07, Offset: 8, Size: 8, Value: 5
1.331371 Report[buf]: (7 bytes) => 07 64 05 0a 14 0a 64
1.331392 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.331411 Unit = 00000000, UnitExp = 0
1.331430 Exponent = 0
1.331450 hid_lookup_path: 00840004 -> UPS
1.331474 hid_lookup_path: 00840024 -> PowerSummary
1.331497 hid_lookup_path: 0085008e -> CapacityGranularity2
1.331522 Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, ReportID: 0x07, Offset: 16, Size: 8, Value: 10
1.331550 Report[buf]: (7 bytes) => 07 64 05 0a 14 0a 64
1.331573 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.331595 Unit = 00000000, UnitExp = 0
1.331616 Exponent = 0
1.331639 hid_lookup_path: 00840004 -> UPS
1.331661 hid_lookup_path: 00840024 -> PowerSummary
1.331684 hid_lookup_path: 0085008c -> WarningCapacityLimit
1.331709 Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x07, Offset: 24, Size: 8, Value: 20
1.331736 Report[buf]: (7 bytes) => 07 64 05 0a 14 0a 64
1.331758 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.331780 Unit = 00000000, UnitExp = 0
1.331802 Exponent = 0
1.331823 hid_lookup_path: 00840004 -> UPS
1.331845 hid_lookup_path: 00840024 -> PowerSummary
1.331868 hid_lookup_path: 00850029 -> RemainingCapacityLimit
1.331893 Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x07, Offset: 32, Size: 8, Value: 10
1.331922 Report[buf]: (7 bytes) => 07 64 05 0a 14 0a 64
1.331944 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.331967 Unit = 00000000, UnitExp = 0
1.331989 Exponent = 0
1.332011 hid_lookup_path: 00840004 -> UPS
1.332033 hid_lookup_path: 00840024 -> PowerSummary
1.332056 hid_lookup_path: 00850067 -> FullChargeCapacity
1.332080 Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x07, Offset: 40, Size: 8, Value: 100
1.332105 Entering libusb_get_report
1.555009 Report[get]: (4 bytes) => 20 64 8a 00
1.555065 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.555090 Unit = 00000000, UnitExp = 0
1.555113 Exponent = 0
1.555137 hid_lookup_path: 00840004 -> UPS
1.555162 hid_lookup_path: 00840024 -> PowerSummary
1.555187 hid_lookup_path: 00850066 -> RemainingCapacity
1.555216 Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x20, Offset: 0, Size: 8, Value: 100
1.555245 Report[buf]: (4 bytes) => 20 64 8a 00
1.555269 PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
1.555292 Unit = 00000000, UnitExp = 0
1.555314 Exponent = 0
1.555337 hid_lookup_path: 00840004 -> UPS
1.555359 hid_lookup_path: 00840024 -> PowerSummary
1.555383 hid_lookup_path: 00850066 -> RemainingCapacity
1.555407 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x20, Offset: 0, Size: 8, Value: 100
1.555448 Report[buf]: (4 bytes) => 20 64 8a 00
1.555472 PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
1.555495 Unit = 00f0d121, UnitExp = 6
1.555518 Exponent = -1
1.555540 hid_lookup_path: 00840004 -> UPS
1.555563 hid_lookup_path: 00840024 -> PowerSummary
1.555587 hid_lookup_path: 00840030 -> Voltage
1.555613 Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x20, Offset: 8, Size: 16, Value: 13.8
1.555641 Report[buf]: (4 bytes) => 20 64 8a 00
1.555680 PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
1.555702 Unit = 00f0d121, UnitExp = 6
1.555721 Exponent = -1
1.555740 hid_lookup_path: 00840004 -> UPS
1.555760 hid_lookup_path: 00840024 -> PowerSummary
1.555783 hid_lookup_path: 00840030 -> Voltage
1.555808 Path: UPS.PowerSummary.Voltage, Type: Input, ReportID: 0x20, Offset: 8, Size: 16, Value: 13.8
1.555833 Entering libusb_get_report
1.775789 Report[get]: (3 bytes) => 21 0a 20
1.775846 PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
1.775871 Unit = 00001001, UnitExp = 0
1.775893 Exponent = 0
1.775916 hid_lookup_path: 00840004 -> UPS
1.775940 hid_lookup_path: 00840024 -> PowerSummary
1.775966 hid_lookup_path: 00850068 -> RunTimeToEmpty
1.775996 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x21, Offset: 0, Size: 16, Value: 8202
1.776024 Report[buf]: (3 bytes) => 21 0a 20
1.776047 PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
1.776069 Unit = 00001001, UnitExp = 0
1.776091 Exponent = 0
1.776113 hid_lookup_path: 00840004 -> UPS
1.776136 hid_lookup_path: 00840024 -> PowerSummary
1.776159 hid_lookup_path: 00850068 -> RunTimeToEmpty
1.776184 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 0x21, Offset: 0, Size: 16, Value: 8202
1.776218 Entering libusb_get_report
1.995567 Report[get]: (3 bytes) => 82 2c 01
1.995623 PhyMax = 0, PhyMin = 0, LogMax = 600, LogMin = 0
1.995647 Unit = 00001001, UnitExp = 0
1.995670 Exponent = 0
1.995694 hid_lookup_path: 00840004 -> UPS
1.995720 hid_lookup_path: 00840024 -> PowerSummary
1.995746 hid_lookup_path: 0085002a -> RemainingTimeLimit
1.995775 Path: UPS.PowerSummary.RemainingTimeLimit, Type: Input, ReportID: 0x82, Offset: 0, Size: 16, Value: 300
1.995804 Report[buf]: (3 bytes) => 82 2c 01
1.995827 PhyMax = 0, PhyMin = 0, LogMax = 600, LogMin = 0
1.995850 Unit = 00001001, UnitExp = 0
1.995872 Exponent = 0
1.995894 hid_lookup_path: 00840004 -> UPS
1.995917 hid_lookup_path: 00840024 -> PowerSummary
1.995940 hid_lookup_path: 0085002a -> RemainingTimeLimit
1.995965 Path: UPS.PowerSummary.RemainingTimeLimit, Type: Feature, ReportID: 0x82, Offset: 0, Size: 16, Value: 300
1.995990 Entering libusb_get_report
2.215850 Report[get]: (3 bytes) => 3f 78 00
2.215907 PhyMax = 0, PhyMin = 0, LogMax = 65535, LogMin = 0
2.215931 Unit = 00f0d121, UnitExp = 6
2.215954 Exponent = -1
2.215979 hid_lookup_path: 00840004 -> UPS
2.216005 hid_lookup_path: 00840024 -> PowerSummary
2.216031 hid_lookup_path: 00840040 -> ConfigVoltage
2.216061 Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 16, Value: 12
2.216086 Entering libusb_get_report
2.216153 libusb_get_report: error sending control message: Device or resource busy
2.216179 Can't retrieve Report 22: Device or resource busy
2.216203 hid_lookup_path: 00840004 -> UPS
2.216227 hid_lookup_path: 00840024 -> PowerSummary
2.216250 hid_lookup_path: 00840002 -> PresentStatus
2.216276 hid_lookup_path: 008500d0 -> ACPresent
2.216300 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID: 0x22, Offset: 0, Size: 1
2.216324 Entering libusb_get_report
2.216359 libusb_get_report: error sending control message: Device or resource busy
2.216384 Can't retrieve Report 22: Device or resource busy
2.216406 hid_lookup_path: 00840004 -> UPS
2.216429 hid_lookup_path: 00840024 -> PowerSummary
2.216452 hid_lookup_path: 00840002 -> PresentStatus
2.216475 hid_lookup_path: 00850044 -> Charging
2.216498 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID: 0x22, Offset: 1, Size: 1
2.216523 Entering libusb_get_report
2.216557 libusb_get_report: error sending control message: Device or resource busy
2.216582 Can't retrieve Report 22: Device or resource busy
2.216605 hid_lookup_path: 00840004 -> UPS
2.216628 hid_lookup_path: 00840024 -> PowerSummary
2.216651 hid_lookup_path: 00840002 -> PresentStatus
2.216674 hid_lookup_path: 00850045 -> Discharging
2.216697 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature, ReportID: 0x22, Offset: 2, Size: 1
2.216722 Entering libusb_get_report
2.216755 libusb_get_report: error sending control message: Device or resource busy
2.216780 Can't retrieve Report 22: Device or resource busy
2.216803 hid_lookup_path: 00840004 -> UPS
2.216826 hid_lookup_path: 00840024 -> PowerSummary
2.216849 hid_lookup_path: 00840002 -> PresentStatus
2.216872 hid_lookup_path: 00850046 -> FullyCharged
2.216894 Path: UPS.PowerSummary.PresentStatus.FullyCharged, Type: Feature, ReportID: 0x22, Offset: 3, Size: 1
2.216919 Entering libusb_get_report
2.216952 libusb_get_report: error sending control message: Device or resource busy
2.216977 Can't retrieve Report 22: Device or resource busy
2.217000 hid_lookup_path: 00840004 -> UPS
2.217022 hid_lookup_path: 00840024 -> PowerSummary
2.217045 hid_lookup_path: 00840002 -> PresentStatus
2.217068 hid_lookup_path: 00850043 -> RemainingTimeLimitExpired
2.217092 Path: UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type: Feature, ReportID: 0x22, Offset: 4, Size: 1
2.217117 Entering libusb_get_report
2.217150 libusb_get_report: error sending control message: Device or resource busy
2.217175 Can't retrieve Report 22: Device or resource busy
2.217198 hid_lookup_path: 00840004 -> UPS
2.217223 hid_lookup_path: 00840024 -> PowerSummary
2.217246 hid_lookup_path: 00840002 -> PresentStatus
2.217269 hid_lookup_path: 00850042 -> BelowRemainingCapacityLimit
2.217293 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x22, Offset: 5, Size: 1
2.217317 Entering libusb_get_report
2.217349 libusb_get_report: error sending control message: Device or resource busy
2.217374 Can't retrieve Report 22: Device or resource busy
2.217397 hid_lookup_path: 00840004 -> UPS
2.217419 hid_lookup_path: 00840024 -> PowerSummary
2.217442 hid_lookup_path: 00840002 -> PresentStatus
2.217465 hid_lookup_path: 008500d0 -> ACPresent
2.217488 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, ReportID: 0x22, Offset: 0, Size: 1
2.217512 Entering libusb_get_report
2.217545 libusb_get_report: error sending control message: Device or resource busy
2.217570 Can't retrieve Report 22: Device or resource busy
2.217592 hid_lookup_path: 00840004 -> UPS
2.217615 hid_lookup_path: 00840024 -> PowerSummary
2.217637 hid_lookup_path: 00840002 -> PresentStatus
2.217660 hid_lookup_path: 00850044 -> Charging
2.217683 Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, ReportID: 0x22, Offset: 1, Size: 1
2.217708 Entering libusb_get_report
2.217740 libusb_get_report: error sending control message: Device or resource busy
2.217766 Can't retrieve Report 22: Device or resource busy
2.217788 hid_lookup_path: 00840004 -> UPS
2.217811 hid_lookup_path: 00840024 -> PowerSummary
2.217834 hid_lookup_path: 00840002 -> PresentStatus
2.217857 hid_lookup_path: 00850045 -> Discharging
2.217880 Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, ReportID: 0x22, Offset: 2, Size: 1
2.217904 Entering libusb_get_report
2.217937 libusb_get_report: error sending control message: Device or resource busy
2.217962 Can't retrieve Report 22: Device or resource busy
2.217984 hid_lookup_path: 00840004 -> UPS
2.218007 hid_lookup_path: 00840024 -> PowerSummary
2.218030 hid_lookup_path: 00840002 -> PresentStatus
2.218052 hid_lookup_path: 00850046 -> FullyCharged
2.218075 Path: UPS.PowerSummary.PresentStatus.FullyCharged, Type: Input, ReportID: 0x22, Offset: 3, Size: 1
2.218100 Entering libusb_get_report
2.218165 libusb_get_report: error sending control message: Device or resource busy
2.218192 Can't retrieve Report 22: Device or resource busy
2.218215 hid_lookup_path: 00840004 -> UPS
2.218237 hid_lookup_path: 00840024 -> PowerSummary
2.218260 hid_lookup_path: 00840002 -> PresentStatus
2.218282 hid_lookup_path: 00850043 -> RemainingTimeLimitExpired
2.218305 Path: UPS.PowerSummary.PresentStatus.RemainingTimeLimitExpired, Type: Input, ReportID: 0x22, Offset: 4, Size: 1
2.218330 Entering libusb_get_report
2.218370 libusb_get_report: error sending control message: Device or resource busy
2.218397 Can't retrieve Report 22: Device or resource busy
2.218419 hid_lookup_path: 00840004 -> UPS
2.218442 hid_lookup_path: 00840024 -> PowerSummary
2.218464 hid_lookup_path: 00840002 -> PresentStatus
2.218487 hid_lookup_path: 00850042 -> BelowRemainingCapacityLimit
2.218517 Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x22, Offset: 5, Size: 1
2.218547 Entering libusb_get_report
2.218589 libusb_get_report: error sending control message: Device or resource busy
2.218663 Can't retrieve Report 80: Device or resource busy
2.218686 hid_lookup_path: 00840004 -> UPS
2.218709 hid_lookup_path: 00840024 -> PowerSummary
2.218732 hid_lookup_path: 0084005a -> AudibleAlarmControl
2.218755 Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x80, Offset: 0, Size: 8
2.218779 Entering libusb_get_report
2.218814 libusb_get_report: error sending control message: Device or resource busy
2.218838 Can't retrieve Report 80: Device or resource busy
2.218861 hid_lookup_path: 00840004 -> UPS
2.218883 hid_lookup_path: 00840024 -> PowerSummary
2.218905 hid_lookup_path: 0084005a -> AudibleAlarmControl
2.218928 Path: UPS.PowerSummary.AudibleAlarmControl, Type: Input, ReportID: 0x80, Offset: 0, Size: 8
2.218954 Entering libusb_get_report
2.218987 libusb_get_report: error sending control message: Device or resource busy
2.219011 Can't retrieve Report 23: Device or resource busy
2.219033 hid_lookup_path: 00840004 -> UPS
2.219056 hid_lookup_path: 0084001a -> Input
2.219289 hid_lookup_path: 00840030 -> Voltage
2.219320 Path: UPS.Input.Voltage, Type: Feature, ReportID: 0x23, Offset: 0, Size: 16
2.219344 Entering libusb_get_report
2.219390 libusb_get_report: error sending control message: Device or resource busy
2.219415 Can't retrieve Report 23: Device or resource busy
2.219437 hid_lookup_path: 00840004 -> UPS
2.219460 hid_lookup_path: 0084001a -> Input
2.219482 hid_lookup_path: 00840030 -> Voltage
2.219505 Path: UPS.Input.Voltage, Type: Input, ReportID: 0x23, Offset: 0, Size: 16
2.219764 Entering libusb_get_report
2.219811 libusb_get_report: error sending control message: Device or resource busy
2.219836 Can't retrieve Report 83: Device or resource busy
2.219898 hid_lookup_path: 00840004 -> UPS
2.219922 hid_lookup_path: 0084001a -> Input
2.219946 hid_lookup_path: 00840053 -> LowVoltageTransfer
2.219969 Path: UPS.Input.LowVoltageTransfer, Type: Feature, ReportID: 0x83, Offset: 0, Size: 16
2.219995 Entering libusb_get_report
2.220030 libusb_get_report: error sending control message: Device or resource busy
2.220316 Can't retrieve Report 84: Device or resource busy
2.220344 hid_lookup_path: 00840004 -> UPS
2.220366 hid_lookup_path: 0084001a -> Input
2.220389 hid_lookup_path: 00840054 -> HighVoltageTransfer
2.220419 Path: UPS.Input.HighVoltageTransfer, Type: Feature, ReportID: 0x84, Offset: 0, Size: 16
2.220443 Entering libusb_get_report
2.220485 libusb_get_report: error sending control message: Device or resource busy
2.220510 Can't retrieve Report 88: Device or resource busy
2.220534 hid_lookup_path: 00840004 -> UPS
2.220556 hid_lookup_path: 0084001a -> Input
2.220579 hid_lookup_path: 00840040 -> ConfigVoltage
2.220603 Path: UPS.Input.ConfigVoltage, Type: Feature, ReportID: 0x88, Offset: 0, Size: 16
2.220627 Entering libusb_get_report
2.220660 libusb_get_report: error sending control message: Device or resource busy
2.220685 Can't retrieve Report 88: Device or resource busy
2.220707 hid_lookup_path: 00840004 -> UPS
2.220730 hid_lookup_path: 0084001a -> Input
2.220752 hid_lookup_path: 00840040 -> ConfigVoltage
2.220775 Path: UPS.Input.ConfigVoltage, Type: Input, ReportID: 0x88, Offset: 0, Size: 16
2.220799 Entering libusb_get_report
2.220877 libusb_get_report: error sending control message: Device or resource busy
2.220903 Can't retrieve Report 23: Device or resource busy
2.220925 hid_lookup_path: 00840004 -> UPS
2.220948 hid_lookup_path: 0084001c -> Output
2.220969 hid_lookup_path: 00840030 -> Voltage
2.220992 Path: UPS.Output.Voltage, Type: Feature, ReportID: 0x23, Offset: 16, Size: 16
2.221023 Entering libusb_get_report
2.221057 libusb_get_report: error sending control message: Device or resource busy
2.221081 Can't retrieve Report 23: Device or resource busy
2.221100 hid_lookup_path: 00840004 -> UPS
2.221120 hid_lookup_path: 0084001c -> Output
2.221139 hid_lookup_path: 00840030 -> Voltage
2.221159 Path: UPS.Output.Voltage, Type: Input, ReportID: 0x23, Offset: 16, Size: 16
2.221180 Entering libusb_get_report
2.221211 libusb_get_report: error sending control message: Device or resource busy
2.221238 Can't retrieve Report 25: Device or resource busy
2.221260 hid_lookup_path: 00840004 -> UPS
2.221283 hid_lookup_path: 0084001c -> Output
2.221306 hid_lookup_path: 00840035 -> PercentLoad
2.221329 Path: UPS.Output.PercentLoad, Type: Feature, ReportID: 0x25, Offset: 0, Size: 8
2.221353 Entering libusb_get_report
2.221384 libusb_get_report: error sending control message: Device or resource busy
2.221406 Can't retrieve Report 25: Device or resource busy
2.221429 hid_lookup_path: 00840004 -> UPS
2.221452 hid_lookup_path: 0084001c -> Output
2.221474 hid_lookup_path: 00840035 -> PercentLoad
2.221499 Path: UPS.Output.PercentLoad, Type: Input, ReportID: 0x25, Offset: 0, Size: 8
2.221524 Entering libusb_get_report
2.221557 libusb_get_report: error sending control message: Device or resource busy
2.221581 Can't retrieve Report 28: Device or resource busy
2.221603 hid_lookup_path: 00840004 -> UPS
2.221626 hid_lookup_path: 0084001c -> Output
2.221648 hid_lookup_path: 00840065 -> Overload
2.221671 Path: UPS.Output.Overload, Type: Feature, ReportID: 0x28, Offset: 0, Size: 1
2.221694 Entering libusb_get_report
2.221726 libusb_get_report: error sending control message: Device or resource busy
2.221751 Can't retrieve Report 28: Device or resource busy
2.221773 hid_lookup_path: 00840004 -> UPS
2.221796 hid_lookup_path: 0084001c -> Output
2.221818 hid_lookup_path: 00840065 -> Overload
2.221841 Path: UPS.Output.Overload, Type: Input, ReportID: 0x28, Offset: 0, Size: 1
2.221865 Entering libusb_get_report
2.221897 libusb_get_report: error sending control message: Device or resource busy
2.221921 Can't retrieve Report 3e: Device or resource busy
2.221944 hid_lookup_path: 00840004 -> UPS
2.221967 hid_lookup_path: 0084001c -> Output
2.221989 hid_lookup_path: 00840044 -> ConfigActivePower
2.222015 Path: UPS.Output.ConfigActivePower, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 16
2.222039 Entering libusb_get_report
2.222072 libusb_get_report: error sending control message: Device or resource busy
2.222097 Can't retrieve Report 85: Device or resource busy
2.222139 hid_lookup_path: 00840004 -> UPS
2.222164 hid_lookup_path: 0084001c -> Output
2.222187 hid_lookup_path: 00840058 -> Test
2.222383 Path: UPS.Output.Test, Type: Feature, ReportID: 0x85, Offset: 0, Size: 8
2.222410 Entering libusb_get_report
2.222450 libusb_get_report: error sending control message: Device or resource busy
2.222475 Can't retrieve Report 85: Device or resource busy
2.222499 hid_lookup_path: 00840004 -> UPS
2.222522 hid_lookup_path: 0084001c -> Output
2.222544 hid_lookup_path: 00840058 -> Test
2.222566 Path: UPS.Output.Test, Type: Input, ReportID: 0x85, Offset: 0, Size: 8
2.222590 Entering libusb_get_report
2.222623 libusb_get_report: error sending control message: Device or resource busy
2.222648 Can't retrieve Report 86: Device or resource busy
2.222670 hid_lookup_path: 00840004 -> UPS
2.222694 hid_lookup_path: 0084001c -> Output
2.222723 hid_lookup_path: 00840057 -> DelayBeforeShutdown
2.222747 Path: UPS.Output.DelayBeforeShutdown, Type: Feature, ReportID: 0x86, Offset: 0, Size: 16
2.222771 Entering libusb_get_report
2.222805 libusb_get_report: error sending control message: Device or resource busy
2.222830 Can't retrieve Report 86: Device or resource busy
2.222852 hid_lookup_path: 00840004 -> UPS
2.222875 hid_lookup_path: 0084001c -> Output
2.222897 hid_lookup_path: 00840057 -> DelayBeforeShutdown
2.222920 Path: UPS.Output.DelayBeforeShutdown, Type: Input, ReportID: 0x86, Offset: 0, Size: 16
2.222944 Entering libusb_get_report
2.222975 libusb_get_report: error sending control message: Device or resource busy
2.223001 Can't retrieve Report 87: Device or resource busy
2.223024 hid_lookup_path: 00840004 -> UPS
2.223046 hid_lookup_path: 0084001c -> Output
2.223069 hid_lookup_path: 00840056 -> DelayBeforeStartup
2.223094 Path: UPS.Output.DelayBeforeStartup, Type: Feature, ReportID: 0x87, Offset: 0, Size: 16
2.223118 Entering libusb_get_report
2.223149 libusb_get_report: error sending control message: Device or resource busy
2.223175 Can't retrieve Report 87: Device or resource busy
2.223198 hid_lookup_path: 00840004 -> UPS
2.223220 hid_lookup_path: 0084001c -> Output
2.223243 hid_lookup_path: 00840056 -> DelayBeforeStartup
2.223265 Path: UPS.Output.DelayBeforeStartup, Type: Input, ReportID: 0x87, Offset: 0, Size: 16
2.223290 Entering libusb_get_report
2.223321 libusb_get_report: error sending control message: Device or resource busy
2.223346 Can't retrieve Report 89: Device or resource busy
2.223368 hid_lookup_path: 00840004 -> UPS
2.223414 hid_lookup_path: ff0100e1 -> not found in lookup table
2.223438 hid_lookup_path: ff0100e0 -> not found in lookup table
2.223461 Path: UPS.ff0100e1.ff0100e0, Type: Feature, ReportID: 0x89, Offset: 0, Size: 8
2.223489 Entering libusb_get_report
2.223625 libusb_get_report: error sending control message: Device or resource busy
2.223654 Can't retrieve Report 1b: Device or resource busy
2.223677 hid_lookup_path: 00840004 -> UPS
2.223700 hid_lookup_path: ff0100e1 -> not found in lookup table
2.223722 hid_lookup_path: ff0100e3 -> not found in lookup table
2.223745 Path: UPS.ff0100e1.ff0100e3, Type: Feature, ReportID: 0x1b, Offset: 0, Size: 8
2.223769 Entering libusb_get_report
2.223809 libusb_get_report: error sending control message: Device or resource busy
2.223834 Can't retrieve Report 1c: Device or resource busy
2.223857 hid_lookup_path: 00840004 -> UPS
2.223880 hid_lookup_path: ff0100e1 -> not found in lookup table
2.223903 hid_lookup_path: ff0100e2 -> not found in lookup table
2.223926 Path: UPS.ff0100e1.ff0100e2, Type: Feature, ReportID: 0x1c, Offset: 0, Size: 8
2.223949 Entering libusb_get_report
2.223982 libusb_get_report: error sending control message: Device or resource busy
2.224007 Can't retrieve Report 78: Device or resource busy
2.224029 hid_lookup_path: 00840004 -> UPS
2.224052 hid_lookup_path: ff0100ba -> not found in lookup table
2.224074 hid_lookup_path: ff0100bb -> not found in lookup table
2.224096 Path: UPS.ff0100ba.ff0100bb, Type: Feature, ReportID: 0x78, Offset: 0, Size: 16
2.224120 Entering libusb_get_report
2.224152 libusb_get_report: error sending control message: Device or resource busy
2.224177 Can't retrieve Report 78: Device or resource busy
2.224199 hid_lookup_path: 00840004 -> UPS
2.224222 hid_lookup_path: ff0100ba -> not found in lookup table
2.224245 hid_lookup_path: ff0100bc -> not found in lookup table
2.224267 Path: UPS.ff0100ba.ff0100bc, Type: Feature, ReportID: 0x78, Offset: 16, Size: 8
2.224290 Entering libusb_get_report
2.224322 libusb_get_report: error sending control message: Device or resource busy
2.224347 Can't retrieve Report 78: Device or resource busy
2.224369 hid_lookup_path: 00840004 -> UPS
2.224392 hid_lookup_path: ff0100ba -> not found in lookup table
2.224415 hid_lookup_path: ff0100bd -> not found in lookup table
2.224438 Path: UPS.ff0100ba.ff0100bd, Type: Feature, ReportID: 0x78, Offset: 24, Size: 16
2.224468 send_to_all: SETINFO ups.mfr "CPS"
2.224494 send_to_all: SETINFO ups.model "ST Series"
2.224520 send_to_all: SETINFO ups.vendorid "0764"
2.224545 send_to_all: SETINFO ups.productid "0501"
2.224567 Report descriptor retrieved (Reportlen = 599)
2.224588 Found HID device
2.224611 Detected a UPS: CPS/ST Series
2.224640 hid_lookup_usage: UPS -> 00840004
2.224664 hid_lookup_usage: PowerSummary -> 00840024
2.224690 hid_lookup_usage: iDeviceChemistry -> 00850089
2.224712 string_to_path: depth = 3
2.224757 Entering libusb_get_report
2.224799 libusb_get_report: error sending control message: Device or resource busy
2.224825 Can't retrieve Report 04: Device or resource busy
2.224848 Got disconnected by another driver: Device or resource busy
2.224870 Can't initialize data from HID UPS

@jimklimov
Copy link
Member

It seems you did not stop the "driver as a service" first, so your test killed off the service-wrapped instance, and then it got revived and killed this test copy.

Still, for the answer to this question, the report sufficed: Serial Number: unknown does not match the specific value you provided, so the driver initialization skipped over this device and went on to look for one that reports all the desired match criteria.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants