[OBSOLETE] Xiaomi Sensors and Button (beta)

Please update your Xiaomi DHs. I made some updates this week.

BTW - my sensors have been behaving much better with the latest hub firmware.

Make sure all other zigbee devices are off when pairing Xiaomi devices.

Also hold the button in for 10 seconds then release and wait 10 seconds before you start the pairing process. Once you start the pairing process press the button and wait 5 seconds, then continue until it shows up. Sometimes you will see it add in the IDE but not in the smart app. It will take 5 to 10 presses to add the device. Be patient between presses. Let it finish blinking.

I have the 'Xiaomi Smart Wireless Switch’. I can see in ST website under the livelogging the diagnostic message “Parsing ‘on/off: 0’” and I get ‘lastPres’ and ‘lastCheckin’ events for the device. But try as I might no standard routines trigger either on Something Turns on or Button is pressed or held events for the button. The routines run fine if I hit the virtual button on the phone.

I did get webcore to trigger on last checked in (but it falsely triggered on the normal random check-ins as well)

Any ideas, the andoid ST app only shows a checkin every time the button is pressed in the activity freed. no button press/hold events.

Any idea what I may be missing here?

I’m in the UK and I got a bucket load of Xiaomi devices (temp, buttons, PIR, window contact) in the gearbest sale last month. All the other stuff seems to work well - though all the battery sensors quickly went to 0% after day 1.
Had no problems (thanks to all in the forum) pairing the devices.

I am currently on ST firmware 000.019.00017

Ok a small update - (i’m new to ST coding) but it appears that I’m not getting the “on/off: 1” message only “on/off: 0” from my button devices (re connected them just to check).

I modified the button DH and copied line 184 ‘return createEvent(name: “button”, value: “pushed”, data: [buttonNumber: button], descriptionText: “$device.displayName button $button was pushed”, isStateChange: true)’ and replaced line 190 (the return for createPressEvent) and ST now responds to Button Presses. Clearly there is no press and hold capability here - but as a test (and a quick hack) it works.

Just incase its relevant - my button is the ‘Xiaomi Aqara Smart Wireless Switch’ - (currently £5.51) https://www.gearbest.com/access-control/pp_626695.html

Just seen a thread on this topic sorry missed it befre Original Xiaomi Aqara Smart Wireless Switch (Aqara Button) [Beta]

Battery should be fixed in my latest DHs from this week.

Hi - I may be having the same problem as you, I have just done a post on the subject that might help.

I checked my timzone, and it was correct, I really hoped it would be wrong :slight_smile: now I just have to cross my fingers and hope the new firmware update will fix it.
Thanks for helping out :slight_smile:

I have just received my Aqara Curtain Motor and I am happy to report that the device automatically pairs with Smartthings although with a generic device handler (i.e., no need to search for a catchall). You just need plug the motor to electric power, click ADD THING on the APP and press the motor button for 5 seconds until the blue light starts flashing rapidly. I replaced the default device handler with the erocm1231’s Xiaomi Outlet and the Aqara Curtain Motor works perfectly! Unfortunately I have not received yet the curtain rails, once I have them I will draft a more specific device handler.

https://www.youtube.com/channel/UCd4va3XtbhYBIm-PLxJpm7Q

So 3 of my motion sensors and 3 buttons just stopped responding today. Put the hub in pairing mode and a couple of taps with a pin and each came back up… Strange.

i have the square buttons working with the DH mentioned above, the sensors working but keep dropping off. well 2 out of 3
i think it is a battery issue and will investigate some replacements

forgot to ask, where do you all get your batteries from ?

Make sure you do not have any other zigbee routers online while pairing the Xiaomi sensors. I have confirmed that they will not report battery if they were paired through a router.

so turn all other devices off then pair ?

Just other zigbee routers

still learning, what would be the routers? i have bulbs and the sensors just now.

Shutdown the zigbee devices that are powered by “mains”. In other words, the non battery devices.

cool. so bulbs off at the switch and pair ALL my sensors whilst there off. might have to wait till missus is out of the house

Removing the device and re-adding with just the SmartSense handler did the trick. Showed up in about 10 minutes. Thanks for your original post.

That’s great. Can you confirm if this was after the firmware upgrade? I think new one is version 19.

Also try out Brian’s new handlers. They are quite good and stable. I installed them about 12 hours ago and they are being pretty good. Shows pressure etc too.

Hi all I tried to pair my Xiaomi aqara door sensors for the first time today and although they’re now paired i am failing miserably at getting them working. Their state didn’t change when I opened or close them, then an hour or so later when I’d just put them down they’re reporting as unavailable in the smart things app

I used Brian’s device handler code on this thread

Where do I begin to troubleshoot please?

EDIT: Removed everything, readded them all again and magically they all seem to work !!!?!?! (For now!)

Hi Guys,

I have many Xiaomi devices (Door/Windows, Temp, Motion, Button) I only can added by catchall way and I used DH from @a4refillpad.

I just got Aqara devices(Door/Windows, Temp, Motion, Button), I want to know what DH I need to use for Aqara devices.

By the way Motion, Button I only can added by catchall way.

20171204_191936

Xiaomi Aqara Temperature Humidity Sensor - MILK WHITE

Original Xiaomi Aqara Smart Wireless Switch - MILK WHITE

Original Xiaomi Smart Home Aqara Human Body Sensor - WHITE

Xiaomi Aqara Window Door Sensor - MILK WHITE

Hmm so I am looking at your temp sensor. Mine are round and not square. Maybe these are not Zwave and that is why I cant see them.