Aqara Buttons Don’t Work After Migration

Since yesterday all 3 of my aqara buttons have stopped working, well sometimes work, sometimes don’t, mostly dont. So I was just wondering if anyone else has the same issue?

I tried to re-add them, still the same…i am using a custom dth.

Thanks.

Hi

I have a similar issue. My single press actions work however Unable to do double-press actions.

I re-added all the buttons and they started to work again, but on these buttons, when you press double, it also presses single, so I have only configured them with single press.

That sounds like a handler that reports a double click as a ‘pushed’ event on button number 2. Automations don’t recognise button numbers so just see the ‘pushed’ event.

I am using
“”““https://github.com/bspranger/Xiaomi/blob/master/devicetypes/bspranger/xiaomi-aqara-button.src/xiaomi-aqara-button.groovy””“”

In the logs I do get
SW1 was single-clicked (Button 1 pushed)
SW1 was double-clicked (Button 2 pushed)

Yes, once upon a time the button capability could only handle ‘pushed’ or ‘held’ and so a convention evolved of adding a buttonNumber entry to the event data. This was understood by Smart Lighting and webCoRE and some other apps. A similar trick was used for multi-button devices before composite devices with multiple components became the way to go.

Since then the button capability has evolved and it now handles a lot more options. The Automations work with that official capability and Smart Lighting also understands it. WebCoRE doesn’t handle it natively but you can work around it.

Unfortunately you can’t really have a handler that works both ways.

I have a version of the handler you use that has been converted to use the modern version of the capability which might be of interest.

https://github.com/orangebucket/Anidea-for-SmartThings/tree/master/devicetypes/orangebucket/anidea-for-aqara-button.src?ts=4

2 Likes

I took the changes from your github and solution works.
I can now get 2 button notification and can trigger necessary routines.

Thanks orangebucket.

1 Like