ZHA integration "Add Devices" search does not find devices

The ZHA integration does not seem to be picking up my XIaomi Zigbee sensors when adding devices. These are the only Zigbee devices I have currently so I’m not sure whether the issue is specific to these sensors or a general issue. I’ve been searching around trying to find a solution but it seems like what I’m encountering is not typical - mostly people are running into issues either picking up the adapter or after discovering devices.

The specific sensors I’m using are:

I’ve seen other posts from people successfully using Xiaomi sensors. Sometimes with hiccups, but they’re able to at least connect.

I’m using the the Elelabs Zigbee USB Adapter.

I just updated in the hopes it would fix my issue so I’m on the latest Home Assistant version, 0.110.2. I’m using HomeAssistant on a desktop computer converted into a server via Docker but not using Hass.io.

The USB serial device is passed through to docker. I’m fairly confident the ZHA integration is connecting to and recognizing the device because I added it through the wizard which picked up the device, initially wasn’t able to connect due to the wrong baud rate, and then connected successfully after setting the correct baud rate.

Though I currently have it configured through the wizard I initially had it configured in configuration.yaml using the following configuration. The same values were added in the wizard:

zha:
  # I know "usb_path" is now deprecated - I used the wizard after updating home assistant partly for this reason.
  usb_path: /dev/ttyUSB0
  database_path: /config/zigbee.db
  baudrate: 115200

The ZigBee devices overview has picked up a “Silicon Labs EZSP” which I believe is the actual USB dongle.

What I’ve been doing is:

  1. Clicking the “Add devices” button at /config/zha/dashboard
  2. Holding the reset button at the top of a sensor for a few seconds until the light starts blinking
  3. Repeatedly tapping the button once every second or so to keep it awake while waiting near the adapter
  4. Waiting until the search completes

This is what the screen looks like after searching for devices:

There’s nothing in the logs at /developer-tools/logs related to ZHA after a device search. I do have the debug logs configured. These are the zha-related messages that it gives after booting:

Summary
2020-05-24 18:39:44 DEBUG (MainThread) [zigpy.appdb] Loading application state from /config/zigbee.db
2020-05-24 18:39:44 DEBUG (MainThread) [zigpy.quirks.registry] Checking quirks for None None (d0:cf:5e:ff:fe:54:06:17)
2020-05-24 18:39:44 DEBUG (MainThread) [zigpy.quirks.registry] Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
2020-05-24 18:39:44 DEBUG (MainThread) [zigpy.quirks.registry] Found custom device replacement for d0:cf:5e:ff:fe:54:06:17: <class 'bellows.zigbee.application.EZSPCoordinator'>
2020-05-24 18:39:44 DEBUG (MainThread) [bellows.ezsp] Resetting EZSP
2020-05-24 18:39:46 DEBUG (MainThread) [bellows.ezsp] Send command version: (4,)
2020-05-24 18:39:46 DEBUG (MainThread) [bellows.ezsp] Application frame 0 (version) received: b'06020063'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command version: (6,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 0 (version) received: b'06020063'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Switched to EZSP protocol version 6
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] EZSP Stack Type: 2, Stack Version: 25344
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_ADDRESS_TABLE_SIZE: 5>, 16)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_TRUST_CENTER_ADDRESS_CACHE_SIZE: 25>, 2)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_APPLICATION_ZDO_FLAGS: 42>, 3)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_SECURITY_LEVEL: 13>, 5)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_KEY_TABLE_SIZE: 30>, 4)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_INDIRECT_TRANSMISSION_TIMEOUT: 18>, 7680)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_PAN_ID_CONFLICT_REPORT_THRESHOLD: 34>, 2)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_MULTICAST_TABLE_SIZE: 6>, 16)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_MAX_END_DEVICE_CHILDREN: 17>, 32)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_SOURCE_ROUTE_TABLE_SIZE: 26>, 16)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_SUPPORTED_NETWORKS: 45>, 1)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_STACK_PROFILE: 12>, 2)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_END_DEVICE_POLL_TIMEOUT: 19>, 60)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_END_DEVICE_POLL_TIMEOUT_SHIFT: 27>, 8)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConfigurationValue: (<EzspConfigId.CONFIG_PACKET_BUFFER_COUNT: 1>, 255)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 83 (setConfigurationValue) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getConfigurationValue: (<EzspConfigId.CONFIG_APS_UNICAST_MESSAGE_COUNT: 3>,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 82 (getConfigurationValue) received: b'000a00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.zigbee.application] APS_UNICAST_MESSAGE_COUNT is set to 10
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command addEndpoint: (1, 260, 48879, 0, 0, 1, [], [1280])
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 2 (addEndpoint) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.zigbee.application] Ezsp adding endpoint: [<EzspStatus.SUCCESS: 0>]
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setConcentrator: (False, <EmberConcentratorType.HIGH_RAM_CONCENTRATOR: 65529>, 600, 1800, 2, 5, 0)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 16 (setConcentrator) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.zigbee.application] Set concentrator type: [<EmberStatus.SUCCESS: 0>]
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command networkInit: ()
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 23 (networkInit) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 25 (stackStatusHandler) received: b'90'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getNetworkParameters: ()
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 40 (getNetworkParameters) received: b'0001fcd527c97c5394fbfc76080f0000000000f8ff07'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setPolicy: (<EzspPolicyId.TC_KEY_REQUEST_POLICY: 5>, <EzspDecisionId.GENERATE_NEW_TC_LINK_KEY: 82>)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 85 (setPolicy) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setPolicy: (<EzspPolicyId.APP_KEY_REQUEST_POLICY: 6>, <EzspDecisionId.ALLOW_APP_KEY_REQUESTS: 97>)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 85 (setPolicy) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command setPolicy: (<EzspPolicyId.TRUST_CENTER_POLICY: 0>, <EzspDecisionId.ALLOW_PRECONFIGURED_KEY_JOINS: 1>)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 85 (setPolicy) received: b'00'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getNodeId: ()
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 39 (getNodeId) received: b'0000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getEui64: ()
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 38 (getEui64) received: b'170654feff5ecfd0'
2020-05-24 18:39:47 INFO (MainThread) [zigpy.application] Device 0x0000 (d0:cf:5e:ff:fe:54:06:17) joined the network
2020-05-24 18:39:47 DEBUG (MainThread) [zigpy.application] Skip initialization for existing device d0:cf:5e:ff:fe:54:06:17
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.zigbee.application] EZSP nwk=0x0000, IEEE=d0:cf:5e:ff:fe:54:06:17
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getConfigurationValue: (<EzspConfigId.CONFIG_MULTICAST_TABLE_SIZE: 6>,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.zigbee.application] Starting EZSP watchdog
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 82 (getConfigurationValue) received: b'001000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (0,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (1,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (2,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (3,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (4,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (5,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (6,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (7,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (8,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (9,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (10,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (11,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (12,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (13,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (14,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Send command getMulticastTableEntry: (15,)
2020-05-24 18:39:47 DEBUG (MainThread) [bellows.ezsp] Application frame 99 (getMulticastTableEntry) received: b'00000000'
2020-05-24 18:39:47 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] Loading battery powered devices
2020-05-24 18:39:47 DEBUG (MainThread) [homeassistant.components.zha.core.gateway] Loading mains powered devices
2020-05-24 18:39:47 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0000](EZSP): started initialization
2020-05-24 18:39:47 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x0000:ZDO](EZSP): 'async_initialize' stage succeeded
2020-05-24 18:39:47 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0000](EZSP): power source: Mains
2020-05-24 18:39:47 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0000](EZSP): completed initialization
2020-05-24 18:39:47 INFO (MainThread) [homeassistant.components.cover] Setting up cover.zha
2020-05-24 18:39:47 INFO (MainThread) [homeassistant.components.lock] Setting up lock.zha
2020-05-24 18:39:47 INFO (MainThread) [homeassistant.components.fan] Setting up fan.zha
2020-05-24 18:39:47 INFO (MainThread) [homeassistant.components.light] Setting up light.zha
2020-05-24 18:39:57 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:39:57 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:40:07 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:40:07 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:40:17 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:40:17 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:40:27 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:40:27 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:40:37 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:40:37 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:40:47 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:40:47 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:40:57 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:40:57 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:41:07 DEBUG (MainThread) [bellows.ezsp] Send command nop: ()
2020-05-24 18:41:07 DEBUG (MainThread) [bellows.ezsp] Application frame 5 (nop) received: b''
2020-05-24 18:41:13 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0000](EZSP): started initialization
2020-05-24 18:41:13 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0x0000:ZDO](EZSP): 'async_initialize' stage succeeded
2020-05-24 18:41:13 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0000](EZSP): power source: Mains
2020-05-24 18:41:13 DEBUG (MainThread) [homeassistant.components.zha.core.device] [0x0000](EZSP): completed initialization

I have no trouble adding Xiaomi sensors to ZHA although I have a different USB stick to you. My devices are Aqara door and window sensors and Aqara temperature/humidity/pressure sensor but not sure if that matters.

With my Aqara sensors I press the reset button until the blue light flashes 3 times then press it again every 5 or so seconds until paired. Make sure the battery is good in the sensor and preferably bring them close to the coordinator USB stick during pairing at least until you know they can connect. Takes maybe about 30 seconds to pair.

I’m having the exact same problem. However: I did manage to get other devices to pair successfully being a Aqara temperature sensor, Aqara Door sensors, Aqara Double Rocker switch, Aqara single switch.

But when I try to add another Aqara sensor (be it a temperature, door, or motion sensor), ZHA does not find the device.

Currently I have 11 ZigBee devices configured and connected to ZHA. But no luck with adding new devices.

I was just having similar problems. Restarted my Hassio VM running in Proxmox. ZHA with Conbee II stick was able to find Aqara Temp and Humidity sensors again.

So, maybe a host-restart may help out.

~Bryan

Same issue here. I have a sonoff / Texas instrument 2531 usb stick. Trying to pair several aqara sensors. Can’t connect any of them. Really hoping someone has the solution.

I ended up using zigbee2mqtt + a $4 ZigBee Dongle from itead: https://www.itead.cc/cc2531-usb-dongle.html. Took a while to get here but worked perfectly with the Xiaomi ZigBee devices I have almost immediately. Oddly it does not seem to work reliably with some Sonoff sensors I bought.

It didn’t work with the HA plugin immediately either but I gave up after the first try. I believe there is some kind of beta support for this adapter. Try zigbee2mqtt if the plugin isn’t working for you though.

Thanks for the tips. I’ve tried the ZHA integration and also the zigbee2mqtt with the mosquito add on. But also not able to pair any device with that also.
I have the exact same hardware with the same pre flashed firmware.
I have the supervised hass in a docker.
Do you have a link with a manual that works for you?

I followed this for zigbee2mqtt:

And this one for the ZHA:

Nevermind, fixed it!
Used an usb extension cord. Apparently there is to much interference close to a Rpi4.
Now working with zigbee2mqtt.

2 Likes

Having this same issue with a Elelabs USB Stick. Eventually, I’m able to pair the sensor, but it takes a lot of tries. For most, no messages are logged saying that the device is trying to join.

I’ve never seen this issue with a Conbee stick on ZHA.

Same problem here. When I first installed ZHA, it went perfect to add Aquara temp and door sensors/switches. The following day, when I should continue with the rest of the Aquara devices, it just will not discover the additional Aquara sensors, despite trying multiple times. Strange and frustrating.

Wow, took me forever to figure out what was wrong. An extension cable solved the issue.

1 Like

Yep, interference is a very common issue so make sure to follow these tips:

https://github.com/home-assistant/home-assistant.io/pull/18864

and

https://www.home-assistant.io/integrations/zha#best-practices-to-avoid-pairingconnection-difficulties

Same thing here. Thanks for posting that!