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

Can't claim USB device [051d:0002]: Result not representable with an UPS APC XS 700U #52

Closed
woody4165 opened this issue Sep 29, 2020 · 10 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@woody4165
Copy link

woody4165 commented Sep 29, 2020

Hi

I'm getting this error with this addon and an UPS APC XS 700U

My HA installation is on an Intel NUC i3 with Proxmox and Hassio in a VM

My addon config is

users:
  - username: xxxxxx
    password: xxxxxx
    instcmds:
      - all
    actions: []
devices:
  - name: myupsAPC
    driver: usbhid-ups
    port: auto
    config:
      - vendorid = 051d
mode: netserver
shutdown_host: 'false'
list_usb_devices: 'true'

my log is

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] nut: applying... 
[fix-attrs.d] nut: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.3.1
 You are running the latest version of this add-on.
 System: HassOS 4.13  (amd64 / qemux86-64)
 Home Assistant Core: 0.115.5
 Home Assistant Supervisor: 245
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nut.sh: executing... 
[21:10:10] INFO: Setting mode to netserver...
[21:10:11] INFO: Connected USB devices:
Bus 003 Device 002: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[21:10:11] INFO: Generating /etc/nut/upsd.users...
[21:10:11] INFO: Configuring user: antonio
[21:10:11] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[21:10:11] INFO: Configuring Device named myupsAPC...
[21:10:11] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
Can't claim USB device [051d:0002]: Result not representable
USB communication driver 0.33
Driver failed to start (exit status=1)
[cont-init.d] nut.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

This is what I see in the Host Log

[    2.372365] usb 3-2: new low-speed USB device number 3 using uhci_hcd
[    2.564576] usb 3-2: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 1.06
[    2.565629] usb 3-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    2.566529] usb 3-2: Product: Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 
[    2.567408] usb 3-2: Manufacturer: American Power Conversion
[    2.568270] usb 3-2: SerialNumber: 3B2025X61060  
[    2.570943] usb 3-2: can't set config #1, error -32

Is there anything I can check to let it work?

Thanks

PS: Some other times, if I disconnect and reconnect the USB, I get a different error:

No matching HID UPS found
Driver failed to start (exit status=1)

No changes to the configuration.

this is the host log

[ 3435.724142] usb 3-2: USB disconnect, device number 3
[ 3446.645735] usb 3-2: new low-speed USB device number 4 using uhci_hcd
[ 3446.836670] usb 3-2: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 1.06
[ 3446.837945] usb 3-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 3446.839085] usb 3-2: Product: Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 
[ 3446.840250] usb 3-2: Manufacturer: American Power Conversion
[ 3446.841254] usb 3-2: SerialNumber: 3B2025X61060  
[ 3447.025476] hid-generic 0003:051D:0002.0002: hiddev96,hidraw1: USB HID v1.10 Device [American Power Conversion Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 ] on usb-0000:00:1d.0-2/input0

This is the addon log

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] nut: applying... 
[fix-attrs.d] nut: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.3.1
 You are running the latest version of this add-on.
 System: HassOS 4.13  (amd64 / qemux86-64)
 Home Assistant Core: 0.115.5
 Home Assistant Supervisor: 245
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nut.sh: executing... 
[21:43:03] INFO: Setting mode to netserver...
[21:43:03] INFO: Connected USB devices:
Bus 003 Device 002: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[21:43:03] INFO: Generating /etc/nut/upsd.users...
[21:43:03] INFO: Configuring user: antonio
[21:43:03] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[21:43:04] INFO: Configuring Device named myupsAPC...
[21:43:04] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)
[cont-init.d] nut.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
@sinclairpaul
Copy link
Member

I will assume this is your forum post?

https://community.home-assistant.io/t/nut-network-ups-tool-addon-on-hassos-on-proxmox-on-intel-nuc-cant-claim-usb-device-xxxxx-xxxx-result-not-representable/223883

By Host log do you mean on the hypervisor itself (i.e. Proxmox), as it looks like there is an issue passing the device through, have you tried with both the port and device bindings?

Not sure what we could do about this from an addon perspective.

@woody4165
Copy link
Author

Nope.

I've changed the UPS, from Eaton to APC hoping/thinking something was going to change.

By Host Log, I mean the one in the Supervisor->System page

Schermata 2020-09-29 alle 21 56 12

Strange thing is that when I switched from Eaton to APC, it worked a couple of times, I was able to let it run, I added the NUT Integration and all the sensors where ok.

Then, restarting the VM I started seeing those two errors.

In the second error I've got, I don't get any error in the Host Log, but I still don't see the USB in the Hardware panel

Schermata 2020-09-29 alle 22 01 14

This is what I see if I SSH in the VM (HassOS)

[ 3435.724142] usb 3-2: USB disconnect, device number 3
[ 3446.645735] usb 3-2: new low-speed USB device number 4 using uhci_hcd
[ 3446.836670] usb 3-2: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 1.06
[ 3446.837945] usb 3-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[ 3446.839085] usb 3-2: Product: Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 
[ 3446.840250] usb 3-2: Manufacturer: American Power Conversion
[ 3446.841254] usb 3-2: SerialNumber: 3B2025X61060  
[ 3447.025476] hid-generic 0003:051D:0002.0002: hiddev96,hidraw1: USB HID v1.10 Device [American Power Conversion Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 ] on usb-0000:00:1d.0-2/input0

So it seems, in this case, there is no issue and the USB seems to be correctly "loaded".

@sinclairpaul
Copy link
Member

Then unfortunately it could be HassOS itself, you mention in your post you switched from Ubuntu, was this also running the addon under a Supervised install?

@woody4165
Copy link
Author

I've tried also a VM with a Supervised install on Ubuntu, but ? get the same.

Strange thing is that it was working with my Eaton UPS until some time ago, but I was not able to get when it happened, so until which Supervisor and HA version.

My doubt about an issue with NUT addon, was that in the HassOS OS the USB is correctly seen, but not within HA.

Thanks

@sinclairpaul
Copy link
Member

But the OS is throwing errors?

I don't understand the reference to HA, the OS passes the USB device via Docker to the container, the configuration is set by the Supervisor.

From those particular errors logged from what I can see possibly could be a USB3.0/2.0 issue.

I really doubt we can do anything from the addon itself, it appears to be a hardware/driver issue.

@woody4165
Copy link
Author

woody4165 commented Sep 30, 2020

Reading your answers, I agree with you, the issue seems to be from the OS to HA,

Don't know if it can be something related to Proxmox, since the other USB stick, Conbee for Zigbee, works perfectly

So, I will close this issue and I will try to understand where to look for...

Thanks

@woody4165
Copy link
Author

Is there any possibilities to have a more deep debug with an option or parameter?

I have done some search related to the error No matching HID UPS found and I see that mostly that error is because of permissions...

Thanks

@sinclairpaul
Copy link
Member

NUT documentation is at https://networkupstools.org/docs/user-manual.chunked/index.html

You can fork the addon and test any changes needed. I would doubt it is permissions, as you wouldn't see errors at the OS level, and it would occur for multiple other users. Personally I run a Proxmox hosted Debian VM, with a Cyberpower UPS connected with the USB driver, and don't see the issue.

@woody4165
Copy link
Author

woody4165 commented Sep 30, 2020

When I get the error No matching HID UPS found, I don't get any error in the Supervisor Log

[    1.800891] usb 2-1: New USB device found, idVendor=051d, idProduct=0002, bcdDevice= 1.06
[    1.800933] usb 2-1: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[    1.800965] usb 2-1: Product: Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 
[    1.800996] usb 2-1: Manufacturer: American Power Conversion
[    1.801024] usb 2-1: SerialNumber: 3B2025X61060  
[    1.853042] hid-generic 0003:051D:0002.0002: hiddev0,hidraw1: USB HID v1.10 Device [American Power Conversion Back-UPS XS 700U   FW:924.Z5 .I USB FW:Z5 ] on usb-0000:01:1b.0-1/input0

What does it mean this last row, 0003:051D:0002.0002 ?

BTW, I am doing this last test with the VM with Supervised install on Ubuntu 20.04 Server

@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jan 22, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

2 participants