USB ports lost

This afternoon the USB connections get lost. (DeCONZ, Z-Wave JS, DSMR) . After a hard reboot (power-off) the work again. But three hours later suddenly all the USB connections are lost. I see this


in the Configuration part of Z-Wave JS in the Add on section. I expect to see: ‘device’: ‘/dev/serial/by-id/usb-0658_0200-if00’
and ‘/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2120509-if00’, and ‘/dev/serial/by-id/usb-FTDI_P1_Converter_Cable_P1HWLG8-if00-port0’

Logbook gives: Failed to set the Z-Wave JS add-on options: not a valid value for dictionary value @ data[‘options’]. Got {‘device’: ‘/dev/serial/by-id/usb-0658_0200-if00’

What hardware or platform are you using? Any USB hub that could be faulty?

Sorry forgot to mention, A Intel NUC . For over a couple of years i never encounter any problems

I don’t use an USB Hub. all USB devices fits in the NUC

Is Home Assistant running directly on the NUC or are you using some sort of virtualization/Docker setup? Does it help using a different USB port?

I have installed the " Home Assistant Operating System" as described in “Generic x86-64 - Home Assistant

All three USB ports give suddenly this problem

Same problem for me here

Is there any solutions?

Tnx

Same problem here, bt with zigbee. My zigbee2mqqt was failing once in a while. Rebooting the system resolved it. Today it happened again so i started digging through the log files, there i found in de debug log of zigbee2mqtt that the USB Dongle was suddenly disconnected. Looking into the HA core logfiles i could see at that time not only my zigbee dongle became unavailable, but also my Bluetooth chip and DSMR P1 USB dongle.

If i go into the terminal and do a less /dev/tty… there is no USB device available.

I Also have a Intel Nuc, NUC5i3RYH with HA:
Home Assistant 2023.10.5
Supervisor 2023.10.1
Operating System 11.1
Frontend 20231005.0 - latest

The USB dongle is also extended with a sort usb extend cable (20 cm)

If i go the all hardware under system i see a couple of usb ports listed as:

BUSNUM: '001'
DEVNAME: /dev/bus/usb/001/001
DEVNUM: '001'
DEVPATH: /devices/pci0000:00/0000:00:1d.0/usb1
DEVTYPE: usb_device
DRIVER: usb
ID_BUS: usb
ID_FOR_SEAT: usb-pci-0000_00_1d_0
ID_MODEL: EHCI_Host_Controller
ID_MODEL_ENC: EHCI\x20Host\x20Controller
ID_MODEL_ID: '0002'
ID_PATH: pci-0000:00:1d.0
ID_PATH_TAG: pci-0000_00_1d_0
ID_REVISION: '0601'
ID_SERIAL: Linux_6.1.59_ehci_hcd_EHCI_Host_Controller_0000:00:1d.0
ID_SERIAL_SHORT: 0000:00:1d.0
ID_USB_INTERFACES: ':090000:'
ID_USB_MODEL: EHCI_Host_Controller
ID_USB_MODEL_ENC: EHCI\x20Host\x20Controller
ID_USB_MODEL_ID: '0002'
ID_USB_REVISION: '0601'
ID_USB_SERIAL: Linux_6.1.59_ehci_hcd_EHCI_Host_Controller_0000:00:1d.0
ID_USB_SERIAL_SHORT: 0000:00:1d.0
ID_USB_VENDOR: Linux_6.1.59_ehci_hcd
ID_USB_VENDOR_ENC: Linux\x206.1.59\x20ehci_hcd
ID_USB_VENDOR_ID: 1d6b
ID_VENDOR: Linux_6.1.59_ehci_hcd
ID_VENDOR_ENC: Linux\x206.1.59\x20ehci_hcd
ID_VENDOR_ID: 1d6b
MAJOR: '189'
MINOR: '0'
PRODUCT: 1d6b/2/601
SUBSYSTEM: usb
TAGS: ':seat:'
TYPE: 9/0/0
USEC_INITIALIZED: '1551377'

This is wat the core logfiles tell right before failing all usb ports:


2023-11-01 15:22:22.211 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'temperature' when rendering '{{value_json.temperature}}'
2023-11-01 15:22:23.233 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'temperature' when rendering '{{value_json.temperature}}'
2023-11-01 15:22:24.257 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'temperature' when rendering '{{value_json.temperature}}'
2023-11-01 15:22:25.277 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'temperature' when rendering '{{value_json.temperature}}'
2023-11-01 15:22:26.342 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'temperature' when rendering '{{value_json.temperature}}'
2023-11-01 15:47:31.498 ERROR (SyncWorker_9) [custom_components.dhl.sensor] API returned 401
2023-11-01 16:12:34.818 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not reset the power state of the Bluetooth adapter hci0 [34:13:E8:24:BF:4D] due to timeout after 5 seconds
2023-11-01 16:12:48.572 WARNING (MainThread) [bluetooth_auto_recovery.recover] Could not cycle the Bluetooth adapter hci0 [34:13:E8:24:BF:4D]: [Errno 110] Operation timed out
2023-11-01 16:12:53.574 WARNING (MainThread) [bluetooth_auto_recovery.recover] Bluetooth adapter hci0 [34:13:E8:24:BF:4D] could not be reset:
2023-11-01 16:14:18.755 ERROR (MainThread) [dsmr_parser.clients.protocol] disconnected due to exception
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/serial_asyncio/__init__.py", line 115, in _read_ready
data = self._serial.read(self._max_read_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/serial/serialposix.py", line 595, in read
raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2023-11-01 16:14:19.164 ERROR (MainThread) [bluetooth_auto_recovery.recover] Unexpected error while attempting USB reset of hci0: [Errno 19] No such device

zigbee2mqtt stopped 16:14:18


Zigbee2MQTT:debug 2023-11-01 16:14:08: Received MQTT message on 'homeassistant/climate/diyless_thermostat_dhw/config' with data '{"name":"DIYLESS DHW","unique_id":"diyless_thermostat_dhw","dev":{"ids":[ "00:00:00:00:00:02" ],"mdl":"DIYLESS Thermostat","sw":"1.7","mf":"DIYLESS"},"~":"diyless_thermostat","avty_t":"~/tele/LWT","pl_avail":"Online","pl_not_avail":"Offline","act_t":"~/stat/things/thermostat/properties","act_tpl":"{{value_json.DHWAction}}","mode_cmd_t":"~/cmnd/things/thermostat/properties/DHWMode","mode_stat_t":"~/stat/things/thermostat/properties","mode_stat_tpl":"{{value_json.DHWMode}}","temp_cmd_t":"~/cmnd/things/thermostat/properties/DHWSetpoint","temp_stat_t":"~/stat/things/thermostat/properties","temp_stat_tpl":"{{value_json.DHWSetpoint}}","curr_temp_t":"~/stat/things/thermostat/properties","curr_temp_tpl":"{{value_json.DHWTemperature}}","pl_on":true,"pl_off":false,"min_temp":"30","max_temp":"80","temp_step":"1","modes":["heat","off"]}'
Zigbee2MQTT:error 2023-11-01 16:14:18: Adapter disconnected, stopping
Zigbee2MQTT:debug 2023-11-01 16:14:18: Saving state to file /share/zigbee2mqtt/state.json
Zigbee2MQTT:info  2023-11-01 16:14:18: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'offline'
Zigbee2MQTT:info  2023-11-01 16:14:18: Disconnecting from MQTT server
Zigbee2MQTT:info  2023-11-01 16:14:18: Stopping zigbee-herdsman...
Zigbee2MQTT:error 2023-11-01 16:14:18: Failed to stop Zigbee2MQTT

This allmost looks like drivers failing or something, who can help?

Problem is still present… who can help out

Created bug: USB ports lost on Intel Nuc at random intervals · Issue #3075 · home-assistant/operating-system · GitHub

Same issue on github: Z-Wave.me UZB dongle not fully recognized · Issue #2995 · home-assistant/operating-system · GitHub

Same problem here on Intel NUC 5i5RYK Bluetooth + all USB devices stop responding and the only solution is to reboot the NUC. I guess it is either a problem with the USB hub (Bluetooth is internally connected to the USB HUB) or a power supply issue. I am using a generic 65W PSU.

@djansen1987 @Geertseb were you guys able to resolve it?

Still having the problem. Hoping @agners agners can help with a solution

You most like have multiple USB attached, best to address your USB differently, here is my docker compose.yaml example:

devices:
    # Use for USB device its ID and not the assigned USB port because when there are more than 1 USB devices attched on a
    # systemreboot assigned USB ports can (and will) change. UDEV can be used also but requires extra work outside the container.
    # Command to show USB devices by ID: sudo ls -la /dev/serial/by-id
    # for your docker-container use a logical USB name.
    - /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AK2NEAM6-if00-port0:/dev/ttyUSB_DSMR

in my case this also happend with poiting it as an ID. But must say i did not have issues anymore with it for more then 6 - 8 months. I found out the issue mosly (could not proof) happend when i left the permit join permently on (forgetting to turn of) when adding devices in Z2M.