Open lenoxys opened 5 months ago
Hi @lenoxys Happy new year! And thanks for testing SmartNUT (and buying Eaton too, that pays my salary 😁). Give me a few more days to surface and add a driver debug + lsusb option to track this down.
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!
Hi @lenoxys Sorry for the eternity to answer... I still suspect some USB passthrough issue with v12n setups, at least VMware. I just added a list usb devices option, along with enabling driver debug when the general log is set to debug for that addon. If you can give it a try...
Hello @aquette !
Unfortunately, nothing changes :
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: SmartNUT
Smartly manage battery backup (UPS) devices
-----------------------------------------------------------
Add-on version: dev
You are running the latest version of this add-on.
System: Home Assistant OS 12.3 (amd64 / qemux86-64)
Home Assistant Core: 2024.6.3
Home Assistant Supervisor: 2024.06.0
-----------------------------------------------------------
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
[10:32:33] INFO: Configuring timezone (Europe/Paris)...
Log level is set to DEBUG
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/smartnut.sh
[10:32:33] INFO: Autodetecting and configuring USB devices
Scanning USB bus.
[10:32:34] INFO: => OK
[10:32:35] INFO: Configuring MQTT...
[10:32:35] INFO: From Home Assistant service
[10:32:35] DEBUG: Requested API resource: http://supervisor/services/mqtt
[10:32:35] DEBUG: Request method: GET
[10:32:35] DEBUG: Request data: {}
[10:32:35] DEBUG: API HTTP Response code: 200
[10:32:35] DEBUG: API Response: {"result":"ok","data":{"host":"core-mosquitto","port":1883,"ssl":false,"protocol":"3.1.1","username":"addons","password":"xxxxxxxxxxxxxxxx","addon":"core_mosquitto"}}
[10:32:35] INFO: => OK
[10:32:35] INFO: ---------------------
[10:32:35] INFO: Checking configuration:
[10:32:35] INFO: /etc/nut/ups.conf
debug_min 5
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "0463"
productid = "FFFF"
vendor = "EATON"
bus = "002"
[10:32:35] INFO: /etc/nut/libnutdrv_mqtt.conf
MQTT_HOST=core-mosquitto
MQTT_USER=addons
MQTT_PASSWORD=xxxxxxxx
[10:32:35] INFO: => OK
[10:32:35] INFO: ---------------------
[10:32:35] INFO: Starting the SmartNUT Driver(s)...
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 - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/smartnut.sh exited 1
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.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Can you enable the list usb devices option too? Another test would be to replicate manually the provided conf, in manual mode (disable USB autoconf) and remove the bus line
Yes sure !
Is this line could be the issue ? Looks like insufficient right for the nut user runnning the daemon:
libusb1: Could not open any HID devices: insufficient permissions on everything
Here is with enabled list usb device option :
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: SmartNUT
Smartly manage battery backup (UPS) devices
-----------------------------------------------------------
Add-on version: dev
You are running the latest version of this add-on.
System: Home Assistant OS 12.4 (amd64 / qemux86-64)
Home Assistant Core: 2024.6.4
Home Assistant Supervisor: 2024.06.0
-----------------------------------------------------------
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
[13:36:41] INFO: Configuring timezone (Europe/Paris)...
Log level is set to DEBUG
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/smartnut.sh
[13:36:41] INFO: Connected USB devices:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 0463:ffff MGE UPS Systems UPS
Bus 002 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[13:36:41] INFO: Autodetecting and configuring USB devices
Scanning USB bus.
[13:36:45] INFO: => OK
[13:36:45] INFO: Configuring MQTT...
[13:36:45] INFO: From Home Assistant service
[13:36:45] DEBUG: Requested API resource: http://supervisor/services/mqtt
[13:36:45] DEBUG: Request method: GET
[13:36:45] DEBUG: Request data: {}
[13:36:45] DEBUG: API HTTP Response code: 200
[13:36:45] DEBUG: API Response: {"result":"ok","data":{"host":"core-mosquitto","port":1883,"ssl":false,"protocol":"3.1.1","username":"addons","password":"xxxxxxxxx","addon":"core_mosquitto"}}
[13:36:45] INFO: => OK
[13:36:45] INFO: ---------------------
[13:36:45] INFO: Checking configuration:
[13:36:45] INFO: /etc/nut/ups.conf
debug_min 5
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "0463"
productid = "FFFF"
bus = "002"
[13:36:45] INFO: /etc/nut/libnutdrv_mqtt.conf
MQTT_HOST=core-mosquitto
MQTT_USER=addons
MQTT_PASSWORD=xxxxxxxxx
[13:36:45] INFO: => OK
[13:36:45] INFO: ---------------------
[13:36:45] INFO: Starting the SmartNUT Driver(s)...
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 - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/smartnut.sh exited 1
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.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
And with manual conf :
autoconf_usb_devices: false
autoconf_remote_nut_devices: false
manually_edit_devices: true
devices:
- name: Eaton-3S850
driver: usbhid-ups
port: auto
config:
- vendorid = 0463
- productid = FFFF
mqtt: {}
log_level: debug
list_usb_devices: true
Logs :
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: SmartNUT
Smartly manage battery backup (UPS) devices
-----------------------------------------------------------
Add-on version: dev
You are running the latest version of this add-on.
System: Home Assistant OS 12.4 (amd64 / qemux86-64)
Home Assistant Core: 2024.6.4
Home Assistant Supervisor: 2024.06.0
-----------------------------------------------------------
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
[13:45:50] INFO: Configuring timezone (Europe/Paris)...
Log level is set to DEBUG
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/smartnut.sh
[13:45:50] INFO: Connected USB devices:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 0463:ffff MGE UPS Systems UPS
Bus 002 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[13:45:50] INFO: Applying manual devices configuration
[13:45:50] INFO: Configuring Device named Eaton-3S850...
[13:45:50] INFO: => OK
[13:45:50] INFO: Configuring MQTT...
[13:45:50] INFO: From Home Assistant service
[13:45:50] DEBUG: Requested API resource: http://supervisor/services/mqtt
[13:45:50] DEBUG: Request method: GET
[13:45:50] DEBUG: Request data: {}
[13:45:50] DEBUG: API HTTP Response code: 200
[13:45:50] DEBUG: API Response: {"result":"ok","data":{"host":"core-mosquitto","port":1883,"ssl":false,"protocol":"3.1.1","username":"addons","password":"xxxxxxxxx","addon":"core_mosquitto"}}
[13:45:51] INFO: => OK
[13:45:51] INFO: ---------------------
[13:45:51] INFO: Checking configuration:
[13:45:51] INFO: /etc/nut/ups.conf
debug_min 5
[Eaton-3S850]
driver = usbhid-ups
port = auto
vendorid = 0463
productid = FFFF
[13:45:51] INFO: /etc/nut/libnutdrv_mqtt.conf
MQTT_HOST=core-mosquitto
MQTT_USER=addons
MQTT_PASSWORD=xxxxxxxxx
[13:45:51] INFO: => OK
[13:45:51] INFO: ---------------------
[13:45:51] INFO: Starting the SmartNUT Driver(s)...
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
USB communication driver (libusb 1.0) 0.43
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/smartnut.sh exited 1
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.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
We're digging together, since I've not coded the libusb1 backend, just all the rest 😅 and I'm now retired from opensource for years... So missing the exact current state. And that USB issue with nut on esxi seems general and not yet addressed.
I read the libusb1 code and it misses some logs to see the light.
So let's go empiric:
(From my phone ..)
Thanks ! How can I change to use root user ?
devices:
Should do it
nothing :(
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: SmartNUT
Smartly manage battery backup (UPS) devices
-----------------------------------------------------------
Add-on version: dev
You are running the latest version of this add-on.
System: Home Assistant OS 12.4 (amd64 / qemux86-64)
Home Assistant Core: 2024.6.4
Home Assistant Supervisor: 2024.06.2
-----------------------------------------------------------
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
[09:41:57] INFO: Configuring timezone (Europe/Paris)...
Log level is set to DEBUG
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/smartnut.sh
[09:41:57] INFO: Connected USB devices:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 0463:ffff MGE UPS Systems UPS
Bus 002 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[09:41:57] INFO: Applying manual devices configuration
[09:41:58] INFO: Configuring Device named Eaton-3S850...
[09:41:58] INFO: => OK
[09:41:58] INFO: Configuring MQTT...
[09:41:58] INFO: From Home Assistant service
[09:41:58] DEBUG: Requested API resource: http://supervisor/services/mqtt
[09:41:58] DEBUG: Request method: GET
[09:41:58] DEBUG: Request data: {}
[09:41:58] DEBUG: API HTTP Response code: 200
[09:41:58] DEBUG: API Response: {"result":"ok","data":{"host":"core-mosquitto","port":1883,"ssl":false,"protocol":"3.1.1","username":"addons","password":"xxxxxxxxxxxx","addon":"core_mosquitto"}}
[09:41:58] INFO: => OK
[09:41:58] INFO: ---------------------
[09:41:58] INFO: Checking configuration:
[09:41:58] INFO: /etc/nut/ups.conf
debug_min 5
[Eaton-3S850]
driver = usbhid-ups
port = auto
vendorid = 0463
productid = ffff
user = root
[09:41:58] INFO: /etc/nut/libnutdrv_mqtt.conf
MQTT_HOST=core-mosquitto
MQTT_USER=addons
MQTT_PASSWORD=xxxxxxxxxxxx
[09:41:58] INFO: => OK
[09:41:58] INFO: ---------------------
[09:41:58] INFO: Starting the SmartNUT Driver(s)...
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/smartnut.sh exited 1
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.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
Add-on: SmartNUT
Smartly manage battery backup (UPS) devices
-----------------------------------------------------------
Add-on version: dev
You are running the latest version of this add-on.
System: Home Assistant OS 12.4 (amd64 / qemux86-64)
Home Assistant Core: 2024.6.4
Home Assistant Supervisor: 2024.06.2
-----------------------------------------------------------
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
[09:46:12] INFO: Configuring timezone (Europe/Paris)...
Log level is set to DEBUG
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/smartnut.sh
[09:46:12] INFO: Connected USB devices:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 0463:ffff MGE UPS Systems UPS
Bus 002 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
[09:46:12] INFO: Applying manual devices configuration
[09:46:12] INFO: Configuring Device named Eaton-3S850...
[09:46:12] INFO: => OK
[09:46:12] INFO: Configuring MQTT...
[09:46:13] INFO: From Home Assistant service
[09:46:13] DEBUG: Requested API resource: http://supervisor/services/mqtt
[09:46:13] DEBUG: Request method: GET
[09:46:13] DEBUG: Request data: {}
[09:46:13] DEBUG: API HTTP Response code: 200
[09:46:13] DEBUG: API Response: {"result":"ok","data":{"host":"core-mosquitto","port":1883,"ssl":false,"protocol":"3.1.1","username":"addons","password":"xxxxxxxxxx","addon":"core_mosquitto"}}
[09:46:13] INFO: => OK
[09:46:13] INFO: ---------------------
[09:46:13] INFO: Checking configuration:
[09:46:13] INFO: /etc/nut/ups.conf
debug_min 5
[Eaton-3S850]
driver = usbhid-ups
port = auto
bus = 002
device = 005
[09:46:13] INFO: /etc/nut/libnutdrv_mqtt.conf
MQTT_HOST=core-mosquitto
MQTT_USER=addons
MQTT_PASSWORD=xxxxxxxxxx
[09:46:13] INFO: => OK
[09:46:13] INFO: ---------------------
[09:46:13] INFO: Starting the SmartNUT Driver(s)...
libusb1: Could not open any HID devices: insufficient permissions on everything
No matching HID UPS found
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.0
cont-init: info: /etc/cont-init.d/smartnut.sh exited 1
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.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
Problem/Motivation
Hello, thanks for your work! I'm trying to setup my EATON UPS connected to my ESXi which is linked to my HAOS VM.
Systems does recognised but something wrong append with libusb1
Expected behavior
UPS should be recognised
Actual behavior
Steps to reproduce