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

libusb1: Could not open any HID devices: insufficient permissions on everything #398

Open
andriikut opened this issue Dec 11, 2024 · 15 comments

Comments

@andriikut
Copy link

Problem/Motivation

I'm having and USB Powercom BNT-xxxAP (product id: 0004) fully supported by usbhid-ups driver
i have tried everything to get it started. Find some answers that everything should work after shutdown, but no luck

UPS is detected by HAOS, but not able to be connected by plugin or driver due to permissions
Pasted Graphic 1

my yml config:

users:
  - username: upsmon
    password: mysuperstrongpass
    instcmds:
      - all
    actions: []
devices:
  - name: myups
    driver: usbhid-ups
    port: auto
    config: []
mode: netserver
shutdown_host: true
## Expected behavior

libusb1 should be able connect to my USB connected UPS

Actual behavior

Logs from addon:

Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.14.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 14.0  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.12.2
 Home Assistant Supervisor: 2024.11.4
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[16:17:47] INFO: Configuring timezone (Europe/Kiev)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[16:17:48] INFO: Setting mode to netserver...
[16:17:49] INFO: Generating /etc/nut/upsd.users...
[16:17:49] INFO: Configuring user: upsmon
[16:17:50] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[16:17:51] INFO: Configuring Device named myups...
[16:17:51] INFO: Starting the UPS drivers...
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

Steps to reproduce

  1. Connect powercom ups
  2. Use recommended driver usbhid-ups

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

@hudsonbrendon
Copy link

I'm having the same problem

@lsilva171
Copy link

Me too

@Rgasd
Copy link

Rgasd commented Dec 16, 2024

me too :

libusb1: Could not open any HID devices: insufficient permissions on everything
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
No matching HID UPS found
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0

@hudsonbrendon
Copy link

This issue is about the same problem that occurred last year with many people.: #322

@TwoWheelPro
Copy link

Same issue here.

@Soltinioo
Copy link

I'm having the same problem

@jarlesb
Copy link

jarlesb commented Dec 30, 2024

I seem to get it to work after disconneting and connecting the USB cable and restart NUT plug in. Anyone knows the code for mount / unmount using Home Assistant?

@polnicky
Copy link

polnicky commented Jan 8, 2025

Same here:


> Add-on: Network UPS Tools
>  Manage battery backup (UPS) devices
> -----------------------------------------------------------
>  Add-on version: 0.14.0
>  You are running the latest version of this add-on.
>  System: Home Assistant OS 14.1  (aarch64 / green)
>  Home Assistant Core: 2025.1.1
>  Home Assistant Supervisor: 2024.12.3
> 
> Network UPS Tools - Generic HID driver 0.47 (2.8.0)
> USB communication driver (libusb 1.0) 0.43
> libusb1: Could not open any HID devices: insufficient permissions on everything
> No matching HID UPS found
> Driver failed to start (exit status=1)
> Network UPS Tools - UPS driver controller 2.8.0
> cont-init: info: /etc/cont-init.d/nut.sh exited 1
> cont-init: info: running /etc/cont-init.d/nutclient.sh
> cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
> cont-init: warning: some scripts exited nonzero
> s6-rc: warning: unable to start service legacy-cont-init: command exited 1
> /run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
> /run/s6/basedir/scripts/rc.init: fatal: stopping the container.

@TwoWheelPro
Copy link

TwoWheelPro commented Jan 9, 2025 via email

Copy link

github-actions bot commented Feb 8, 2025

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 Feb 8, 2025
@HG943
Copy link

HG943 commented Feb 9, 2025

I can confirm it's still not working with 2025.2.1 (HAOS 14.2), at least not for me with an APC EPS700 UPS..
Would be great to see a resolution.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Feb 10, 2025
@HG943
Copy link

HG943 commented Feb 10, 2025

Did some more testing. If HAOS is started without the addon (not even installed), the USB port is available in /dev as hidraw0 and /dev/usb/hiddev0.
After installing and immediately upon starting the addon, the USB port is immediately removed from /dev.
It also shows in the supervisor log:

2025-02-10 21:03:01.269 INFO (MainThread) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/nut/aarch64 with version 0.14.0
2025-02-10 21:03:06.494 INFO (MainThread) [supervisor.hardware.monitor] Detecting remove hardware /dev/usb/hiddev0 - None
2025-02-10 21:03:06.495 INFO (MainThread) [supervisor.hardware.monitor] Detecting remove hardware /dev/hidraw0 - None

@philecker
Copy link

Agreed still not working with Tripp Lite UPS.

Core 2025.2.3
Supervisor 2025.02.0
Operating System 14.2
Frontend 20250210.0

@ballakers
Copy link

Tried everything when this happened once in the past and still no joy! Been down since Feb release I believe. Getting the same permissions error as everyone else.

Core 2025.2.4
Supervisor 2025.02.1
Operating System 14.2
Frontend 20250214.0

deleted add-on and integration, full reboot of Host machine (not just HA restart) with no change. Removed usb into UPS and plugged back in. Eaton UPS that was running fine without issue prior.

Thanks for the help!

@sengenbe
Copy link

Tried everything when this happened once in the past and still no joy! Been down since Feb release I believe. Getting the same permissions error as everyone else.

Core 2025.2.4 Supervisor 2025.02.1 Operating System 14.2 Frontend 20250214.0

deleted add-on and integration, full reboot of Host machine (not just HA restart) with no change. Removed usb into UPS and plugged back in. Eaton UPS that was running fine without issue prior.

Thanks for the help!

Same specs here with a CyberPower.

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

No branches or pull requests