[RELEASE] Xiaomi Aqara Mijia Sensors and Switches Driver

I found it -- seems the driver isnt removing the old checkEventInterval schedules in some of my devices

1 Like

As with any change in driver, you must hit Configure for it to reset any scheduled jobs and settings from the previous driver.

1 Like

@chirpy Any idea why my button WXKG01LM is seen as a contact?

Did you enable “separate buttons” in the device configuration page?

Did you hit configure?

Yes, I have also flipped the switch and pressed save before pressing configure. I’ve done this several times.
I have also removed the device and included it again but the button still acts like a contact.
If I press the button I get contact closed and as soon as I release the button, it switches to open. No button presses is showing in the event list at all.

Get this in the log…

[info] Mi Switch presense check in 12 hours
[info] Mi Switch contact changed to open
[debug] Processing Xigbee data (cluster:0006, attrId:0000)
[debug] Incoming data from device : read attr - raw: 40ED0100060800001001, dni: 40ED, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 01
[info] Mi Switch presense check in 12 hours
[info] Mi Switch contact changed to closed
[debug] Processing Xigbee data (cluster:0006, attrId:0000)
[debug] Incoming data from device : read attr - raw: 40ED0100060800001000, dni: 40ED, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, command: 0A, value: 00

It is normal to “also” behave as a contact using that driver, but should also be reporting button presses.

My button states are:
image

state

As @BiGs said, it's normal to see a contact sensor state. If you're not seeing button presses then that attribute hasn't been sent by the device. It can often take a few includes. What you shouldn't do is remove the device first. Leave the device as it is, but initiate a Zigbee include and then put the device into reset mode to include again. It will show the existing device when it does so. It can take a few goes to get the attributes on some devices.

1 Like

Ok. I will try that. Thanks!

@chirpy I tried to re-include the the switch (without removing the device) several times but button presses are not registrated.
Just to test, I installed Marcus driver and the button presses are registrated right away. I then switch back to your driver (pressing configure after changing driver) and back to just contact indications again.

m_stat

@chirpy I get below error when trying to simulate a button press/hold from the device page, and my HE isn't responding either.

error (http://192.168.107.4/device/edit/642)groovy.lang.MissingMethodException: No signature of method: user_driver_waytotheweb_Xiaomi_Aqara_Mijia_Sensors_and_Switches_1105.push() is applicable for argument types: (java.math.BigDecimal) values: [1]
Possible solutions: push(), use([Ljava.lang.Object;), run(), run(), dump(), parse(java.lang.String) (method push)

Other buttons with other drivers (ex. SmartThings) don't give me the error and I can simulate button actions from the device page.

Any clue why I get the error?

Thank you for this driver. I just got my first motion sensor by Aqara and it would not pair natively to HE. Added this driver and popped up with driver selected on first try. It's reporting motion very well, cooldown is about 1min. It also has a illuminance sensor, BONUS, didn't even know that when bought from Amazon, a steal for $20.

Previously I purchased one of their temp sensors, which paired natively with HE and its been working like a charm, although, offset was required. But it seems to update at a fair rate and it reports to 2 decimal places, not sure that sort of resolution is needed with room temperature measurements.

I have some WSDCGQ11LM. sensors that randomly come on and off my network. I was using a different driver until I stumbled upon this one. When I say on and off.... 3 weeks on 3 weeks off type of thing.

Anyway to force update these or get them to start logging again? With driver change should I re-pair them?

Do you have compatible Zigbee repeaters on your network?

1 Like

No need to re-pair them if they are connected.

Just press Configure after changing the driver in the device page.

@BiGs

I did that.... presence says not present last activity was 6 hours ago and values are still the same values as they were 5 days ago. on both sensors.

Then try to add it again. It seems it dropped from zigbee network.

One issue I've had with certain drivers, regardless of author is the use of Presence as a device monitor. While maybe it is a neat trick - IMHO it feels like a hack. Presence is to me, related to people or things that come and go, like a vehicle. As a device monitor for a device that is supposed to always be there anyway (when operating correctly) it seems just wrong somehow.
When I'm writing rules or creating apps I don't want devices to show up in my pick lists for Presence sensors that aren't actually used in that way. I've actually re-written a driver or two I use to remove presence entirely from device drivers...
Monitoring a device, IMHO, is done best using the Device Monitoring app which checks activity over a period of time and seems much more accurate and appropriate. Again. MHO.

3 Likes

Hi all, i have installed my first motion sensot and its aqara. Its in my bathroom, how much delay do you put to keep the lighting on as it looks coold down period is quite aggresive it keeps turning off the lights if i stay still :slight_smile:

Check out "Simple Device Viewer" app. Really amazing and has a great dashboard and loads of functionality

[https://github.com/krlaframboise/Hubitat ]

5 Likes