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-on stopped recognising UPS #76

Closed
fi-sch opened this issue Feb 8, 2021 · 1 comment
Closed

Add-on stopped recognising UPS #76

fi-sch opened this issue Feb 8, 2021 · 1 comment

Comments

@fi-sch
Copy link

fi-sch commented Feb 8, 2021

Problem/Motivation

NUT add-on stopped recognising my UPS that is connected via USB. Won't start.
I'm creating a separate issue as I'm not sure what caused this behaviour – I recently updated HA Core, Supervisor and HassOS and noticed that issue after a couple of days.

I tried different "paths" for device instead of 'auto', but it did not help at all. I am running out of ideas.

Expected behaviour

NUT starts up properly as it was before.

Actual behavior

Add-on log below. Please note that device is visible on hardware list in Supervisor -> System panel.

[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.4.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 5.11  (amd64 / qemux86-64)
 Home Assistant Core: 2021.2.1
 Home Assistant Supervisor: 2021.02.5
-----------------------------------------------------------
 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... 
[09:49:26] INFO: Setting mode to netserver...
[09:49:26] INFO: Generating /etc/nut/upsd.users...
[09:49:27] INFO: Configuring user: upsmon_local
[09:49:27] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[09:49:27] INFO: Configuring Device named UPS...
[09:49:27] INFO: Starting the UPS drivers...
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Megatec/Q1 protocol USB driver 0.12 (2.7.4)
No supported devices found. Please check your device availability with 'lsusb'
and make sure you have an up-to-date version of NUT. If this does not help,
try running the driver with at least 'subdriver', 'vendorid' and 'productid'
options specified. Please refer to the man page for details about these options
(man 8 blazer_usb).
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.

Obviously, I also found this in Supervisor logs:

21-02-08 08:46:43 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'auto_uart' is deprecated, use 'uart'. Please report this to the maintainer of Network UPS Tools
21-02-08 08:46:43 WARNING (MainThread) [supervisor.addons.validate] Add-on config 'devices' use a deprecated format, the new format uses a list of paths only. Please report this to the maintainer of Network UPS Tools

Steps to reproduce

My add-on config:

users:
  - username: upsmon_local
    password: '!secret nut_password'
    instcmds:
      - all
    actions: []
devices:
  - name: UPS
    driver: blazer_usb
    port: auto
    config: []
mode: netserver
shutdown_host: 'true'

Entries on hardware list:

- name: 2-2
    sysfs: '/sys/devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2'
    dev_path: /dev/bus/usb/002/003
    subsystem: usb
    by_id: null
    attributes:
      BUSNUM: '002'
      DEVNAME: /dev/bus/usb/002/003
      DEVNUM: '003'
      DEVPATH: '/devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2'
      DEVTYPE: usb_device
      DRIVER: usb
      ID_BUS: usb
      ID_MODEL: MEC0003
      ID_MODEL_ENC: MEC0003
      ID_MODEL_ID: '0000'
      ID_REVISION: '0100'
      ID_SERIAL: MEC_MEC0003
      ID_USB_INTERFACES: ':030000:'
      ID_VENDOR: MEC
      ID_VENDOR_ENC: MEC
      ID_VENDOR_ID: '0001'
      MAJOR: '189'
      MINOR: '130'
      PRODUCT: 1/0/100
      SUBSYSTEM: usb
      TYPE: 0/0/0
      USEC_INITIALIZED: '7399017'
  - name: hidraw0
    sysfs: >-
      /sys/devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2/2-2:1.0/0003:0001:0000.0001/hidraw/hidraw0
    dev_path: /dev/hidraw0
    subsystem: hidraw
    by_id: null
    attributes:
      DEVNAME: /dev/hidraw0
      DEVPATH: >-
        /devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2/2-2:1.0/0003:0001:0000.0001/hidraw/hidraw0
      MAJOR: '247'
      MINOR: '0'
      SUBSYSTEM: hidraw
  - name: hiddev0
    sysfs: >-
      /sys/devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2/2-2:1.0/usbmisc/hiddev0
    dev_path: /dev/usb/hiddev0
    subsystem: usbmisc
    by_id: null
    attributes:
      DEVNAME: /dev/usb/hiddev0
      DEVPATH: >-
        /devices/pci0000:00/0000:00:1e.0/0000:01:1b.0/usb2/2-2/2-2:1.0/usbmisc/hiddev0
      MAJOR: '180'
      MINOR: '96'
      SUBSYSTEM: usbmisc

Environment details

HA Core: 2021.2.1
Supervisor: 2021.02.5
HassOS: 5.11 (OVA)
Host: Intel NUC with Proxmox
USB: Passed-through directly to the VM

Thanks!

@fi-sch
Copy link
Author

fi-sch commented Feb 8, 2021

Todays update to 0.5.0 resolved my issue. Thank you!

@fi-sch fi-sch closed this as completed Feb 8, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant