[Deprecated] Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)

Can they be paired to ST and Hubitat at the same time?

Have you had any luck with the xiaomi cube? The ST DH seemed to port over easily enough. The cube was discovered immediately by the hub. When I change the face of the cube, the device state changes properly. However, I can’t figure out how to do anything with it. I couldn’t figure out how to get RM to do anything with it and haven’t had a lot of luck with webcore and Hubitat playing nice to see if it works with webcore.

You have to create custom commands first, I believe.

I see how you can create a custom command. The connection I’m missing is how to use that custom command to trigger an event. I know how to trigger a custom command but not vice versa.

Incompatibilities with RM are because of the difference between ST's button capability implementation and Hubitat's.

If you got webCoRE working on your Hubitat that would work in the interim because it would still "see" the button events from the ST device handler.

I have been working on updating the currently released Xiaomi device handlers for ST and device drivers for Habitat. After that, I plan on working on the Hubitat device driver for the Mi Cube.

No Zigbee or Z-Wave devices can be paired to more than one hub at the same time.

If you want to pair your Xiaomi devices with you Hubitat hub, you should be able to make them available for your SmartThings hub to "see" using @krlaframboise's Other Hub SmartThings Integration app.

1 Like

I’m working on getting webcore integrated for that specific issue and guessed that was my best option to complete the integration. But the webcore dashboard has been very glitchy for me, which is a whole diff ball of wax on a diff thread, as you know… I was hoping there was a solution with button controller or RM. I was pleasantly surprised at how easy it was to get as far as I did with the cube and will keep plugging away at getting webcore working.

I have put up an early beta of the Hubitat device driver for the Xiaomi Mi Cube on my GitHub repository.

You can grab the code from here.

It should now register different actions as button presses in RM or other Hubitat Apps, but I have not tested it at all.

Things I still need to figure out include dealing with the Three Axis functionality (apparently not implemented on Hubitat) and also whether the additional data posted in button pushed is being handled correctly for the device driver to use.

Let me know if it works at all for you!

Thank you. Both the DH and webcore are working!

1 Like

Button WXKG01LM isnt implemented yet right?

I only have the two-button model, WXKG02LM.

However, the driver for that should also work for the one button model, but it will just work as a single button of course, sending a button 1 pushed event.

Can you try it to check and let me know if it works?

The code can be copied from here.

1 Like

It seems to work but it’s sending 2 times that it’s been pushed. Even if i try to push it as quick as i can.

2018-04-08 10:36:17.660:infoButton Triggered
2018-04-08 10:36:17.612:infoButton: Button pushed 1
2018-04-08 10:36:17.407:infoButton Triggered
2018-04-08 10:36:17.369:infoButton: Button pushed 1

Also wondering how i subscribe to the event on your buttons.

I used to use this:
subscribe(Button, “button.pushed”, ButtonPushedEventHandler)

But dont think you use that one, any idea what i need to use to subscribe to a pushablebutton?

Details regarding Hubitat's Button Implementation can be found here...

1 Like

It appears that the single-button model may send messages when it's pressed and when it's released.

However, I don't think you've assigned the device driver I linked to, because it would never post "Button triggered" log messages.

Please try going to the device details page, assigning the Xiaomi Aqara Dual Button Light Switch driver, click "save", then turn on debug log output, "save", and post your log entries that occur when you click the button, hold for a few seconds and release. That should produce the Zigbee messages in the log that I need to make the device driver compatible.

1 Like

My bad! I was trying my own version.

2018-04-08 18:37:18.200:debugButton: Left button pushed

2018-04-08 18:37:18.189:debugButton: Parsing description: read attr - raw: 82B70100060800001001, dni: 82B7, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, value: 01

2018-04-08 18:37:18.002:debugButton: Left button pushed

2018-04-08 18:37:17.990:debugButton: Parsing description: read attr - raw: 82B70100060800001000, dni: 82B7, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, value: 00

Great! Based on the times in the log output, it appears you just clicked the button once, right?

Also, can you try holding the button for 3-5 seconds, and post the log output for that?

Tried it:

2018-04-08 19:14:36.347:debugButton: Left button pushed

2018-04-08 19:14:36.326:debugButton: Parsing description: read attr - raw: 82B70100060800001001, dni: 82B7, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, value: 01

2018-04-08 19:14:33.307:debugButton: Left button pushed

2018-04-08 19:14:33.290:debugButton: Parsing description: read attr - raw: 82B70100060800001000, dni: 82B7, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, value: 00

Wait a second - you said model WXKG01LM, right?

I think I confused this model with a different button.

Does your button look like this:


If yes, then you should use the “original” Xiaomi Button device driver. It supports button hold, single-click, double-click, triple-click, quadruple-click, and also quintuple-click.

EDIT: I have released a new version of the round button device driver; please see my next post (below).

[UPDATE] All Xiaomi Device Drivers except Aqara Button

Links to updated code

Changes from previous versions
All device drivers

  • added (informational) info log message toggle preference setting, for displaying helpful plain English" / non-debug log messages
  • custom attribute events (for use with webCoRE) now use more accurate Epoch Time stamp
  • changed Battery Replaced Date to use system-formatted new Date() date/time stamp
  • removed Date Format and 24 hour clock preference settings because they are no longer used
  • removed lastPressedDate because it doesn’t serve any real purpose on Hubitat
  • edited preference setting and log message text for clarity

Aqara Leak Sensor device driver

  • added custom lastDry attribute event for webCoRE use

both Motion Sensor device drivers

  • added custom lastInactive attribute event for webCoRE use
  • changed default of motionreset to 61 seconds (1 second longer than normal hardware reset of 60 seconds)

Temp/Humidity Sensors device driver

  • added attribute "pressure", "Decimal" to be used for custom pressure value events

Note: These device drivers are not final, and some features or preferences may be added / removed