This is a strange problem I have encountered with a couple of my aqara buttons. When I press the buttons, it just shows “released”. This doesn’t take the automation action I have assigned to it. The action only occurs when “Pushed” is detected. There is no automation option to select “Released” in lighting automation or any button automation. The"Pushed" only registers if I do it from the app.
Has anyone seen this problem? Have they been able to rectify it?
I have removed the button and re-added it by catchall method. Still no joy. Other buttons work fine and show “Pushed” when pressed.
I threw away another button that did the same but I refuse to believe there isn’t a fix here.
SmartThings does not support button “released” events, only “pushed” and “held”.
The drivers I have helped to improve only show “released” in the SmartThings classic mobile app as visual feedback to users. It does not relate to automations. You can only use “pushed” or “held”, except if you’re using WebCoRE.
It is a shame that you threw out the other button because there is probably nothing wrong with it.
There was a bug fixed in the firmware in release 25.26 that affected some xiaomi devices (as they were dependent on the bug). At least one set of community DTHs have been updated and you can see the changes here.
If you are not on 25.26 or updating the DTH does not fix it, let me know.
If the text is lumi.sensor_switch.aq2, you have the original revision of model WXKG11LM.
If the text is lumi.remote.b1acn01, you have the new revision of model WXKG11LM.
Please let me know which model you are using.
However, for BOTH models of the Aqara Button, if you are using a SmartThings v2 or v3 hub you should use the bspranger device handler (DTH) version 1.4.2b. As mentioned by @Zach_Varberg, there is more information about my update to the DTH here.
The display of “pushed” or “released”, etc. in the SmartThings classic mobile app is just for visual feedback. You should check the recent events in the “Recently” tab in the mobile app, like this:
The message “Was Single-Clicked (Button 1 Pushed)” confirms that the physical button push resulted in a SmartThings event which can be used with SmartApps for automations.
Sorry to be reviving this very old topic however I hope I will be able to get some help from you guys on this…
I am encountering the same issue alitech used to have some time back.
I am using a Xiaomi Aqara Button WXKG11LM (new version) for turning on/off some smart lights in my bedroom. The problem is that the ‘single-press’ command is actually triggered when I release the button.
What is frustrating is that obviously there is a ‘release’ action after holding the button as well…
‘Single-press’ turns on/off the LED Light strip behind my bed, ‘Hold’ turns on/off the ceiling lamp. Thus, when I hold the button the ceiling lamp will turn on, but the LED will turn on as well upon releasing the button (after being held to turn on the ceiling lamp).
I am using the latest DTH from the post shared by @veeceeoh above (v 1.4.3) and a V2 hub (UK) last updated 10 days ago (firmware version 000.037.00004).
Do note I also have an Original Xiaomi Button WXKG01LM, which doesn’t have the same problem.
The handler dates from the time when the button attribute only had pushed and held values and things like double clicks were fudged using a buttonNumber in the event data. So a double-click might be seen as pushed on button number 2. Smart Lighting and webCoRE bought into this fudge but the new app expects things to be done properly.
I did tweak the ‘bspranger’ handler to support the new app and Automations. I’ve only ever used it with the previous version of the button (which had one to four presses) but in theory it should support yours. In the absence of press hold and press release values, I borrowed held and double, to go along with pushed and pushed_2x.
@orangebucket Fantastic! works like a charm! Thank you Graham, much appreciated!
I wonder if you figured out the Original (non-Aqara) Xiaomi Button (WXKG01LM) as well??
I am using it with the DTH shared by veeceeoh here but it does not capture the 2xPressed nor the double-pressed commands. (only Pressed and Held seem to be captured in Smartthings)… Any clue?
I have been dealing with this problem since setting up this button. Today, I finally got to playing around with the code, assuming you are using the device handler by bspranger. While I have yet to sort out the double click behavior, I have found in the code where the release button is triggered. In the IDE manager, navigate to My Device Handlers, find the bspranger : Xiaomi Aqara Button device handler, and click on it to edit it. Scroll down to line 258 def eventType = [0: “held”, 1: “pushed”, 2: “pushed”, 16: “held”, 17: “pushed”, 18: “pushed”, 255: “pushed”]. At the very end of the line you will find 255: “pushed”. Delete the word pushed for that entry and it will no longer trigger your pushed rule on a button release. The new line should look like this: def eventType = [0: “held”, 1: “pushed”, 2: “pushed”, 16: “held”, 17: “pushed”, 18: “pushed”, 255: “”]. I hoe hope this helps.
Hey @dboyd462 Thanks for the tips - it helps and I finally got past the issue with releasing the button triggering another press. Btw, wondering if you found out how to make the double click work? Thanks a lot.
I never could figure out the double tap behavior. I spent a fair bit of time modifying the code that is there with no luck. I don’t know the programming language, I have just enough experience with other code to “play” with the already written code.
On a side note, I didn’t realize that the forum formatted my initial post and removed some of the lines I had placed in there, making it very confusing to read. I corrected that.
@orangebucket Thanks Graham! I am using WXKG12LM and was using bspranger’s DTH. Been struggling with getting the double-clicking to work and I have just tested your tweaked handler and it works like a charm! Super grateful!