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.
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...
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.
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
- āoriginalā Button driver v0.8
- āoriginalā & Aqara Door/Window sensor driver v0.7
- Aqara Smart Wall Switch model WXKG02LM driver v0.6
- Aqara Leak sensor driver v0.7.1
- āoriginalā Motion Sensor driver v0.7
- Aqara Motion Sensor driver v0.7
- āoriginalā & Aqara Temperature/Humidity sensor driver v0.7
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
The button seems to work! Thank you for the effort
For anyone who downloaded the updated code for the Aqara Leak Sensor driver, @NoWon alerted me to an issue that shows an error on the log page and prevents the wet / dry status to be sent to the hub.
I have fixed the code, but I wonāt be able to test it until I get home in about 8 hours.
If you want to revert to the previous v0.6 code, it is still available here.
Sorry for any inconvenience, and thanks for your patience!
The updated Aqara Leak sensor driver code is now working correctly. Version is now v0.7.1, grab the code from here.
working great thank you
Thanks again for these drivers Keith. Just received my Aqara button today. Pairing was easy. Hope it stays paired, as this thing is so cool, and an incredible deal vs a Flic. So far Iām using single-click, hold, double-click and triple-click with the Button Controller app. All are performing perfectly.
@veeceeoh: Would it be possible for you to add a offset configuration field for the Aqara motions sensors, to compensate for variances in there illuminance reporting? Thanks!
Done.
[UPDATE] v0.7.1 of Aqara Motion Sensor Device Driver
This small update adds an Lux value offset preference setting:
NOTES:
- The lux upper limit of the Aqara Motion Sensor is 1000 or 1200 (depending on model revision) and does not seem to be highly accurate.
- Although a lux reading message is sent by the sensor when motion is detected, the order of lux and motion detection messages is not always the same (i.e., the lux value message may be sent before or after the motion detected message.) With that in mind, a change in lux value should probably be evaluated before evaluating whether motion detected = true in an automation app rule.
Is anyone else seeing their Xiaomi (original) motion sensors not going inactive after a while? Itās normally fine after the hub has been rebooted, but within a day or so the runIn() call doesnāt seem to do anything.
Iām wondering if thereās a resource thatās not being freed somewhere, although I can only assume that itās in the Hubitat firmware, since the DTH looks perfectly fine.
Perhaps not related, last night I discovered that all events of device subscribed to by apps were being ignored. I was pulling my hair out for an hour before deciding to reboot and then it was all working fine again.
Since I still consider my Hubitat to be "in testing", I have very few apps, only 6 RM rules, and just one WebCore Piston. I see no reason why I would need to reboot my hub because of resources being bogged down in any way. A look at my logs shows very frequent inactivity, so I am becoming increasingly frustrated with bizarre issues that are magically cleared by a reboot.
But enough of my rant. Have you checked your events list for the motion sensor to see if the motion
- inactive
event was sent?