home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.83k stars 30.91k forks source link

ZHA device search error for Xiaomi Door Sensors #28614

Closed cdk222 closed 5 years ago

cdk222 commented 5 years ago

Home Assistant release with the issue: 0.101.2

Operating environment Hass.io

Integration: ZHA

Description of problem: I am trying to 'add device' for Xiaomi Mi Door Sensors using ZHA (Conbee II USB Stick). The search function initiates however when I attempt to pair the Xiaomi I get the below error messages.

[0x0000:zdo] ZDO request 0x0036: [60, <Bool.false: 0>] Device 0x04c5 (00:15:8d:00:02:d4:28:55) joined the network Device 00:15:8d:00:02:d4:28:55 changed id (0xe3fd => 0x04c5) [0x04c5:zdo] ZDO request 0x0013: [0x04c5, 00:15:8d:00:02:d4:28:55, 128] [0x04c5] Requesting 'Node Descriptor' [0x04c5] Extending timeout for 0x7b request Ignoring message (b'18000a050042126c756d692e73656e736f725f6d61676e6574') on cluster 0: unknown endpoint or cluster id: 1 Ignoring message (b'18010a0100200a') on cluster 0: unknown endpoint or cluster id: 1 Ignoring message (b'1c3412020a02ff4c0600100121bd0b21a8012400000000002182002051') on cluster 0: unknown endpoint or cluster id: 1 [0x04c5] Delivery error for seq # 0x7b, on endpoint id 0 cluster 0x0002: message send failure [0x04c5] Extending timeout for 0x7d request [0x04c5] Delivery error for seq # 0x7d, on endpoint id 0 cluster 0x0002: message send failure [0x04c5] Requesting Node Descriptor failed: [0x04c5:0:0x0002]: Message send failure [0x04c5] Discovering endpoints [0x04c5] Extending timeout for 0x7f request [0x04c5] Delivery error for seq # 0x7f, on endpoint id 0 cluster 0x0005: message send failure [0x04c5] Extending timeout for 0x81 request [0x04c5] Delivery error for seq # 0x81, on endpoint id 0 cluster 0x0005: message send failure [0x04c5] Extending timeout for 0x83 request [0x04c5] Delivery error for seq # 0x83, on endpoint id 0 cluster 0x0005: message send failure Failed ZDO request during device initialization: [0x04c5:0:0x0005]: Message send failure

Additional information: I am able to pair a Ikea Tradfri device using ZHA without issue. I was also able to pair the Xiaomi door sensors when using Deconz Add-On I have tried to reset the Door Sensors as well as Factory resetting the ConBee II stick I have also tried using a brand new Door sensor with no previous pairing

probot-home-assistant[bot] commented 5 years ago

Hey there @dmulcahey, @adminiuga, mind taking a look at this issue as its been labeled with a integration (zha) you are listed as a codeowner for? Thanks!

Adminiuga commented 5 years ago

Xiaomi devices are tricky to pair. Door sensors and leak sensors are more trickier at least for me, cause you have to reset it right amount of time.

  1. Remove it from zha and immediately press button on the device to wake it up
  2. Reset the device but don't open zha for joining
  3. Permit joining only through a specific compatible router if you have any, otherwise it would fall off
  4. Reset the device and make it join. Keep pressing the button on device once a sec to keep it awake
cdk222 commented 5 years ago

Thank you for that. It worked....was getting confused by the error messages in the log and misinterpreted that to mean that it was attempting the pairing and then failing due to a device or ZHA issue.

Now to research the fact that both Ikea and Xiaomi devices disappear after a home assistant restart

Adminiuga commented 5 years ago

https://community.hubitat.com/t/xiaomi-aqara-devices-pairing-keeping-them-connected/623

mike391 commented 5 years ago

@cdk222 Im suffering from the same issue as you with the same hardware. Would you be able to tell me what your zha config looks like inconfiguration.yaml as well as how you did the 'add device'? Is this the same thing triggering the 'zh.permit' service with the inteval and ieee_address?

Adminiuga commented 5 years ago

There's no interval setting for ZHA.Permit service. There's duration in seconds, default is 60s if omitted. ieee_address is also optional, if ommited then all "Zigbee Routers" are told to allow new device joins.

Most probems I have rejoining Xiaomi leak and door sensors, as those require correct timing to properly reset and rejoin the device.

Adminiuga commented 5 years ago

But other than that, zha.permit service is fully identical to add devices button in zha config panel.

AythamiEsp commented 4 years ago

I've got the same problem with aqara temperature sensors. Any solution yet?

Adminiuga commented 4 years ago

Dump Xiaomi, buy konke

dmulcahey commented 4 years ago

Agree with @Adminiuga but network needs to stay on channel 15 for several of their devices just FYI