New user Xiaomi/aqara devices

Use this thread:

Whenever you log into the IDE, be sure you first select the correct location.

Then there’s a Device Handler (DTH) Tab, a Device Tab and a SmartApp Tab.

Copy and Paste the DTH code using the create new code option under the DTH Tab in the IDE. Save and Publish for you.

Use the “Catch All” method described in the thread linked above under the “edit” for those who’s having trouble pairing link. It’s the most realizable method for pairing these sensors.

Good Luck.

Go back to the main device handler page, click on “update from repo”. If that option isn’t there you’ll need to link your GitHub account again first. Once you click on it a drop-down should appear with all the GitHub repositories you’ve added, select “Xiaomi (Master)” which hopefully is the bspranger one. It should then show three lists, outdated, obsolete, and new. In the new list it should have everything you’ve deleted, select the check boxes for the DTH’s you want to add, make sure to select the “publish” check box at the bottom, and then click “Execute Update”.

I’d suggest only using the catch-all method as a last resort if normal pairing doesn’t work after numerous attempts. While it may sometimes be slightly easier it can cause issues later, particularly if the device ever drops off the network for any reason (dead batteries, WiFi interference, repeater loses power, etc). Devices paired normally will often re-pair automatically if they drop off, and even if not they’ll re-pair easier and keep the same zigbee ID which means no rebuilding automations using them and no need to reauthorize the device to smartapps or integrations like webCoRE, Alexa, Google, IFTTT, etc. Devices paired with the catch-all method will not re-pair automatically if they drop off, and will reconnect as a completely new device with a new zigbee ID.

I have 12 of these out of over 150 Zigbee Devices and they were always acting up until I employed this method. Never had an issue since.

YMMV