[OBSOLETE] Xiaomi Sensors and Button (beta)

Hi everyone

stupid question. i have the original button and have updated my handler. it now registers single, double triple etc. however cant seem to get it to work in core / how to pick up the different presses in smartthings. pleases can someone let me know the right ‘instructions’ / app to use to take advantage of the now 5 options?

thank you

My smart lighting app doesn’t seem to give me those options…

Hi Davey, please disregard my response. My wires got crossed and I thought I was responding to a question about double tapping on a GE Jasco switch. Sorry about that.

Hi,
I have a question. The readings from the temperature,humidity sensor are visible in the new version of the application?
Regards,
Maciej

Any exams of how to use in core please? Struggling to get it to recognise the different taps.

Thank you

Yes they are.

1 Like

Here is an example of how I use the humidity reading and some logic to set a variable that dictates whether the fan should come on in my bathroom.

Thank you :slight_smile:

Anything in single, double, triple presses etc? Can’t get it to recognise however in smartthings it shows these actions…

@Davey1985 - I assume you looked at my announcement post for the new device hander?

All the different press types for the model WXKG01LM Xiaomi button result in standard SmartThings button pushed events except for when the button is held. In that announcement post I included a chart showing that:

Action SmartThings Event Notes
Single press button 1 pushed
Hold button 1 held Event comes after button is released ~
Double-click button 2 pushed
Triple-click button 3 pushed
Quadruple-click button 4 pushed
Shizzle-click button 5 pushed 5 or more multi-click

So the button number needs to be part of the piston’s conditional, something like:

if
Device_Name's button #2 gets pushed

Something isn’t correct there. You should see another selection option for “Button Number”, like this:

The only thing I can think of that may be going on here is that your SmartThings Hub is not yet “aware” that the Xiaomi Button can send events for buttons #1-5.

In order for the hub to know how many buttons to make available to smart apps, a device handler has to send a numberOfButtons event.

All of the Xiaomi / Aqara button device handlers sends the numberOfButtons event when the button is paired, but if a user already paired a button and just changes from the old device handler to the new one, the number of buttons isn’t automatically updated.

To manually update the number of available buttons with the new driver, try opening the preference settings for the button in the SmartThings Classic mobile app, and then just press save:


Please let me know if that worked.

2 Likes

Thank you. Before you posted they appeared so was just taking a bit of time to filter through.

Hey, how did you get the humidity to show above the temperature? On mine, it is reversed.

My humidity sensor became “unavailable”. Any steps to get this working again?

Thanks!

Check the status of the sensor in IDE…
If status is HUB_DISCONNECTED try rebooting your hub from within the IDE…
Otherwise a re-pairing should help…

the status just says OFFLINE. Is there a process to repair the device without loosing all settings?

Yes. Its a bit of a palaver though.

First go into the IDE to check you have a Zigbee ID as well as a Device Network ID. The Zigbee ID will be something like 00158D000159EF43 and the Device Network ID will be a 4 character er Hex ID like BF0B. Having the Zigbee ID in there is what allows the device to re-attach and keep your settings/automations intact.

Take the sensor as close to the hub as you can.

Select My Hubs in the IDE, scroll down and click on List Events.

Now use the app to put the hub inclusion mode (add a thing) as though you are going to add a new device.

Start pressing the button on the sensor. I find it works best to press it, let go and then wait for the LED flashes. Count to 3 and then press again. You will see it start to add when the light sequence changes.

Now the really tricky bit. You need to continue the sequence of press pause press and at the same time refresh the hub events webpage until you see a Zigbee Join. You should also see in the app that your device was connected again.

When you have seen the Zigbee join you can stop pressing the button and save the devices.

Now leave the sensor by the hub for a few hours or at least until you see it report the battery.

i have done this a few times and this sequence seems to work quite reliably.

1 Like

Thank you! It worked!

Hi all.

Are there any know issues with a smartthings + Xiaomi device handler?

I can seem to search and add devices (temp and door sensors) they show online. But i get no temp reading or any other activity…

Using the latest bspranger/Xiaomi

Hub v2
f/w 000.025.00032

Is this stille the case? Added a water sensor without catchall and no battery indication yet. Other watersensor added from the app and shows battery.

5 Open close sensor isnt showing battery at all.

HI Guys,

wondering if someone can help.

I have several buttons and open / close Xiaomi and all work fine. Used the IDE catchall method. I use the a4refill and bspranger DH.

Recently got some aqara motion sensors and am struggling a bit. I can seem to pair them on the a4 refills DH and all works ok however i really only want them for the lux reading which only bsprangers will report on. If i pair with the latter device handler it always drops off (offline) within a day. If i link it with a4 and then a few days later change it to bspringers it will then drop off in a day again.

Any ideas?