[RELEASE] Xiaomi Aqara Mijia Sensors and Switches Driver

A few thoughts;

  • Have you compared the pairing clusters?
  • Are all the settings (prefernces etc) the same?
  • Have you pressed "configure" for each?

Mine (3) have been working for 11 months with no issues. One use they have is to graph the real time atm. pressure for weather forecast, so I would notice if they failed,

My TS0222 light sensor has been working without any issues in the last month using this driver:

I am not sure that I understand where the humidity and temperature readings in your post are coming from,.. My sensor reports just the illuminance and the battery level (once per day or so..)
image

Ah, mine is a combined device - "Smart Brightness Thermometer" - but reports as TS0222. Moes E-Ink Brightness Thermometer (ZSS-ZK-THL) Zigbee compatibility

  • endpointId: 01
  • application: 48
  • softwareBuild:
  • inClusters: 0000,0001,0400
  • outClusters: 0019,000A
  • model: TS0222
  • manufacturer: _TYZB01_kvwjujy9

My 'brightness'' sensor is totally different... Although the model is reported the same as yours, the manufacturer ID is different and it looks this way:
image
image

So for a proper driver for the combined sensor you will probably need to search more..
Searching GitHub for _TYZB01_kvwjujy9 shows at least one driver written in groovy for SmartThings - with the standard slight modifications of the code this may work for you.

I have just added a DJT11M sensor to my hub using this driver.

I note that tilt is exposed as a state. However, looking at the properties listed for the device, there is no tilt property. Is it possible to add this to properties?

Thanks. :slightly_smiling_face:

1 Like

"tilt" is an attribute. It cannot have a capability defined for it as there's no such capability exposed by Hubitat.

I'm using the Aqara water sensors from Amazon (Amazon Link) and get the following error message approximately every 25 min or so:

[error] groovy.lang.MissingMethodException: No signature of method: user_driver_waytotheweb_Xiaomi_Aqara_Mijia_Sensors_and_Switches_802.checkEventInterval() is applicable for argument types: () values: [] (checkEventInterval)

I updated to the latest driver but still see the error. The sensor appears to work detecting moisture (just verified with the wet finger test!). Any ideas for the reason for the error? Been getting this error for awhile, but have ignored ... would like to see if there's a resolution. Thanks!!!!

Check at the bottom of the device page to see if you have a scheduled job with that name, if you do temporarily change to the Device driver and click the button to cancel all scheduled jobs and then change the driver back.

3 Likes

Thanks ... I do see a scheduled job for checkEventInterval; however, if I change the driver to say a Virtual button and apply, I do not see an option on the device page to cancel scheduled jobs. Is this somewhere else?

The driver name you are looking for is Device

(it always makes for an interesting discussion :sunglasses:)

1 Like

Thanks. Got it. However, after change the type to Device and hit the Save Device button, I still do not see an option to cancel all scheduled jobs anywhere on the page. The only option at the bottom of the page is to remove the device.

2 Likes

Thanks ... I only see configure and get info, but then again, I'm not running the latest Hubitat FW. I probably will just have to delete the device and re-add. I'll do that when I get back (heading out of town for a week). Thanks for the help.

I can can throw together a quick unschedule driver, give me a few minutes…Done

Kill Scheduled Jobs

 /*

 */

@SuppressWarnings('unused')
static String version() {return "0.0.1"}

metadata {
    definition (
        name: "Kill Schedules", 
        namespace: "thebearmay", 
        author: "Jean P. May, Jr.",
        importUrl:"https://raw.githubusercontent.com/thebearmay/hubitat/main/xxxx.groovy"
    ) {
        capability "Actuator"
        command "killSchedules"
        
            
    }   
}

preferences {

}

@SuppressWarnings('unused')
def installed() {

}

def killSchedules () {
    unschedule()
}
1 Like

There is an existing driver named "Clean Device" by @boristhecat
you can download it here

3 Likes

Thanks ... I'll check it out when I return. If that doesn't work, I'll just uninstall/reinstall. Appreciate the help!

Is there a way to reset motion active timeout?

The default is 1 minute by the looks of it

Correct. There is a hardware hack to decrease the time.

2 Likes

I just installed your driver for WXKG11LM Mini Switch. I was using [Deprecated] Xiaomi / Aqara / Opple Drivers with Presence! but saw it was no longer supported. When I used that driver the log registered the button press, but the button did not trigger in my WebCore piston. I switched to yours and the logs are not registering the button presses.