I’ve just upgraded to a new conbee ii zigbee dongle, and installed the add-on in hass.io but it seems to be failing. From the hass logs, I can see recurring instances of the following:
Detecting HardwareAction.REMOVE usb hardware /dev/bus/usb/...
Detecting HardwareAction.ADD usb hardware /dev/bus/usb/...
Detecting HardwareAction.REMOVE usb hardware /dev/bus/usb/...
Detecting HardwareAction.ADD usb hardware /dev/bus/usb/...
Similar entry from /var/log/messages
:
Jul 31 03:08:47 kernel: [37762.432360] usb 2-1: new full-speed USB device number 39 using xhci_hcd
Jul 31 03:08:47 kernel: [37762.581930] usb 2-1: New USB device found, idVendor=1cf1, idProduct=0030, bcdDevice= 1.00
Jul 31 03:08:47 kernel: [37762.581934] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 31 03:08:47 kernel: [37762.581936] usb 2-1: Product: ConBee II
Jul 31 03:08:47 kernel: [37762.581938] usb 2-1: Manufacturer: dresden elektronik ingenieurtechnik GmbH
Jul 31 03:08:47 kernel: [37762.581940] usb 2-1: SerialNumber: DE2433232
Jul 31 03:08:51 kernel: [37766.569855] usb 2-1: USB disconnect, device number 39
Jul 31 03:08:59 kernel: [37775.152805] usb 2-1: new full-speed USB device number 40 using xhci_hcd
Jul 31 03:08:59 kernel: [37775.302168] usb 2-1: New USB device found, idVendor=1cf1, idProduct=0030, bcdDevice= 1.00
Jul 31 03:08:59 kernel: [37775.302170] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 31 03:08:59 kernel: [37775.302171] usb 2-1: Product: ConBee II
Jul 31 03:08:59 kernel: [37775.302171] usb 2-1: Manufacturer: dresden elektronik ingenieurtechnik GmbH
Jul 31 03:08:59 kernel: [37775.302172] usb 2-1: SerialNumber: DE2433232
Jul 31 03:09:03 kernel: [37778.982489] usb 2-1: USB disconnect, device number 40
Jul 31 03:09:12 kernel: [37787.561205] usb 2-1: new full-speed USB device number 41 using xhci_hcd
Jul 31 03:09:12 kernel: [37787.710669] usb 2-1: New USB device found, idVendor=1cf1, idProduct=0030, bcdDevice= 1.00
Jul 31 03:09:12 kernel: [37787.710672] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 31 03:09:12 kernel: [37787.710674] usb 2-1: Product: ConBee II
And on it goes every few seconds. From what I can tell this is a common issue for usb dongles (and arduinos) with a few possible sources (see for example, here: Why is supervisor.hardware.monitor removing and adding USB devices), but documentation is a bit disorganised out there, so I thought I’d document my troubleshooting here in hopes of being a bit forensic about things and getting feedback from other users who have been through this before.
So possible issues identified “out there” are:
- failing USB device itself
- insufficient power for USB device causing power cycling
- insufficient permissions on
/dev/ttyACM
or user not added totty
(or less commonlydialout
group) - conflicting devices installed (especially modems)
First things first is to get a sense of where the device is connected, and confirm is isn’t a simple hardware failure: try various USB ports and watch to see if the issue recurs (in my case it does) to be sure it isn’t an issue with a USB cable (if one if being used, in my case they aren’t).
sudo lsusb -t
will show devices and their connections:
$ sudo lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 1: Dev 41, If 0, Class=Communications, Driver=cdc_acm, 12M
|__ Port 1: Dev 41, If 1, Class=CDC Data, Driver=cdc_acm, 12M
|__ Port 9: Dev 2, If 0, Class=Human Interface Device, Driver=usbfs, 12M
|__ Port 11: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 11: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
You can list USB power demands (h/t here: https://unix.stackexchange.com/questions/81508/get-power-consumption-of-a) using either of the following commands:
usb-devices | grep 'Product=\|MxPwr'
or lsusb -v
$ usb-devices | grep 'Product=\|MxPwr'
S: Product=EHCI Host Controller
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
S: Product=xHCI Host Controller
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
C: #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
S: Product=CP1500EPFCLCD
C: #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=2mA
S: Product=xHCI Host Controller
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
S: Product=EHCI Host Controller
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
This shows potential maximum draw for each device and not necessarily the actual power being demanded. I don’t think there’s a way to show this on debian. But good to confirm there aren’t a ton of power hungry devices listed indicating that the device is failing when the bus can’t provide enough power (not my issue). From what I can tell most motherboards provide 500 mA
. For a serious deep dive, see here: macos - Linux USB: turning the power on and off? - Stack Overflow for more on how to power cycle usb ports in linux. My conclusion here is that this is generally a red herring unless your motherboard is failing. I’ve confirmed that other devices don’t cycle on the same usb ports in my case.
I’ve seen other posts which indicate that it may be useful to add your docker (or other) user to the group tty
or less commonly dialout
group. The command to do this is sudo adduser dockeruser tty
. Not the problem in my case.
Note, there are also messages in my logs about this device "not an MTP device"
but this is a red herring - just the kernel observing that it isn’t a USB storage device (but is instead an MSC device). (useful writeup here: usb stick won't mount: "not an MTP device" - Linux Mint Forums).
Is there anything I’m missing here? About to go to dresden for a replacement.