[OBSOLETE] Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

[BETA] Xiaomi Aqara Button SmartThings DTH v1.3b

I have updated the Aqara Button device handler to add support for the new revision of model WXKG11LM. While working on it, I also realized that I could add support for the hold and double-click functions of the Single-Button Aqara Wireless Smart Light Switch (model WXKG03LM).

The new beta DTH code can be copied directly from here.
NOTE: This DTH needs testing before it can be considered a full release.

Here are some handy charts that show how different types of button actions are passed on as SmartThings events to be used by SmartApps for automations:

Aqara Button - Model WXKG11LM (original revision)

Action Event Button #
Single-click pushed 1

Note: Although the hardware also supports double-, triple-, and quadruple- click messages, SmartThings only sees single-clicks.

Aqara Button - Model WXKG11LM (new revision)

Action Event Button #
Single-click pushed 1
Hold held 1
Double-click doubleTapped 1
Release lastReleasedCoRE n/a (see note below)

Notes: A release message is sent when the button is released after being held, which results in a lastReleasedCoRE event, which can be used by WebCoRE users (SmartThings doesn’t support a “released” event in its button capability implementation). I don’t own this model, but I assume the hardware button held message is sent after 400ms like with Model WXKG12LM.

Aqara Button - Model WXKG12LM

Action Event Button #
Single-click pushed 1
Hold held 1
Double-click doubleTapped 1
Release lastReleasedCoRE n/a (see note below)
Shake pushed 2

Notes: A release message is sent when the button is released after being held, which results in a lastReleasedCoRE event, which can be used by WebCoRE users (SmartThings doesn’t support a “released” event in its button capability implementation). The hardware button held message is sent after the button has been held for 400ms.

Aqara Button - Model WXKG03LM (original revision)

Action Event Button #
Single-click pushed 1

1-button Aqara Wireless Smart Light Switch - Model WXKG03LM (new revision)

Action Event Button #
Single-click pushed 1
Hold held 1
Double-click pushed 2

Notes: The hardware button held message is sent after the button has been held for 400ms. However, holding the button for more than 15-20 seconds puts the device into pairing mode.

2-button Aqara Wireless Smart Light Switch - Model WXKG02LM (original revision)

Action Event Button #
Press left button pushed 1
Press right button pushed 1
Press both buttons pushed 1

Note: The 2-button Aqara Smart Light Switch model WXKG02LM (original revision) is only recognized as ONE button. This is because the SmartThings API ignores the data that helps distinguish between left, right, or both-button presses.

Change List

  • added support for new revision of the model WXKG11LM Aqara Button, which appears as ZigBee model lumi.remote.b1acn01
  • added support with hold and double-click functionality for 1-button Aqara Wireless Smart Light Switch (model WXKG03LM - new revision), which appears as ZigBee model lumi.remote.b186acn01
  • added new function call to determine model of Aqara button when paired, display it in live logging, and set correct number of buttons for SmartThings SmartApps to make use of
  • minor formatting and comment text revisions
4 Likes