[Deprecated] Xiaomi / Aqara / Opple Drivers with Presence!

Maybe this was answered already (didn't want to read through 600+ messages), but I just set up an Aqara Water Leak Sensor and install was a snap with the driver. The leak sensor correctly shows wet/dry conditions using the wet finger test. However, my problem is that the sensor doesn't appear to be classified as a water sensor and will not trigger my HSM rule to shut off main water valve when tripped. Is this a known issue? Do I need to create a special rule for just this water leak sensor?

No idea. However, I do know that the drivers referenced in this thread may no longer be maintained. AFAIK, the only Aqara/Mijia driver currently being maintained is @chirpy's.

Available in this thread:

2 Likes

Thanks! I'll try switching to these drivers instead!

1 Like

@aaiyar FYI ... a quick swap out to the chirpy driver instantly worked .. the Aqara water leak sensor is properly reporting into HSM. Thanks!!

3 Likes

Hey Markus,

Thanks for all the work you've put into these drivers, much appreciated!
I've ordered a no neutral D1 wall switch and installed it, unfortunately the drivers don't seem to work for it.
especially I'm not able to see the status of the physical part of the switch or command it to toggle on or off.

I've already tried to mess around with the driver code myself but have unfortunately needed to come to the conclusion that I know absolutely nothing about coding and trying to google educate myself isn't going anywhere:)

Data displayed for the device is as follows:

  • endpointId: 01
  • buttonCombos: 0
  • application: 1A
  • softwareBuild:
  • driver: v1.0.1.1123
  • inClusters: 0000,0003,0001,0002,0019,000A
  • outClusters: 0000,000A,0019
  • model: lumi.switch.b1lacn02
  • physicalButtons: 1
  • manufacturer: LUMI

I've turned on debug logging and copied the outputs after toggling the wall switch on and off below, hope this helps:

dev:1992021-05-14 22:35:55.256 errorjava.lang.NullPointerException: Cannot invoke method parse() on null object on line 648 (parse)

dev:1992021-05-14 22:35:55.251 infoOn/Off Button press - description:read attr - raw: 11F2040006100000100000001001, dni: 11F2, endpoint: 04, cluster: 0006, size: 10, attrId: 0000, encoding: 10, command: 0A, value: 0000001001 | parseMap:[raw:11F2040006100000100000001001, dni:11F2, endpoint:04, cluster:0006, size:10, attrId:0000, encoding:10, command:0A, value:00, clusterInt:6, attrInt:0, additionalAttrs:[[value:01, encoding:10, attrId:0000, consumedBytes:4, attrInt:0]], valueParsed:false]

dev:1992021-05-14 22:35:54.989 errorjava.lang.NullPointerException: Cannot invoke method parse() on null object on line 646 (parse)

dev:1992021-05-14 22:35:54.980 infoOn/Off Button press - description:read attr - raw: 11F2020006160000100100F02300F21103, dni: 11F2, endpoint: 02, cluster: 0006, size: 16, attrId: 0000, encoding: 10, command: 0A, value: 0100F02300F21103 | parseMap:[raw:11F2020006160000100100F02300F21103, dni:11F2, endpoint:02, cluster:0006, size:16, attrId:0000, encoding:10, command:0A, value:01, clusterInt:6, attrInt:0, additionalAttrs:[[value:0311F200, encoding:23, attrId:F000, consumedBytes:7, attrInt:61440]], valueParsed:true]

dev:1992021-05-14 22:35:45.219 errorjava.lang.NullPointerException: Cannot invoke method parse() on null object on line 648 (parse)

dev:1992021-05-14 22:35:45.213 infoOn/Off Button press - description:read attr - raw: 11F2040006100000100000001001, dni: 11F2, endpoint: 04, cluster: 0006, size: 10, attrId: 0000, encoding: 10, command: 0A, value: 0000001001 | parseMap:[raw:11F2040006100000100000001001, dni:11F2, endpoint:04, cluster:0006, size:10, attrId:0000, encoding:10, command:0A, value:00, clusterInt:6, attrInt:0, additionalAttrs:[[value:01, encoding:10, attrId:0000, consumedBytes:4, attrInt:0]], valueParsed:false]

dev:1992021-05-14 22:35:44.960 errorjava.lang.NullPointerException: Cannot invoke method parse() on null object on line 648 (parse)

dev:1992021-05-14 22:35:44.948 infoOn/Off Button press - description:read attr - raw: 11F2020006160000100000F02300F21103, dni: 11F2, endpoint: 02, cluster: 0006, size: 16, attrId: 0000, encoding: 10, command: 0A, value: 0000F02300F21103 | parseMap:[raw:11F2020006160000100000F02300F21103, dni:11F2, endpoint:02, cluster:0006, size:16, attrId:0000, encoding:10, command:0A, value:00, clusterInt:6, attrInt:0, additionalAttrs:[[value:0311F200, encoding:23, attrId:F000, consumedBytes:7, attrInt:61440]], valueParsed:false]

Markus is no longer on this forum. However, there are new drivers here:

3 Likes

Thanks for the reply! That driver unfortunately does not seem to work with this wired switch

Hi guys,

I know Markus is not around anymore, but maybe someone has the answer.
My correctly working Xiaomi plug is generating the following log every seven minutes;

dev:7722021-10-17 13:15:31.140 warnUnhandled Event PLEASE REPORT TO DEV - description:read attr - raw: 274901FCC082F700413D6410000328129839000000009539DA10774296390080134597390000000005210D009A201008211601072700000000000000000921000A0B20009B1001, dni: 2749, endpoint: 01, cluster: FCC0, size: 82, attrId: 00F7, encoding: 41, command: 0A, value: 3D6410000328129839000000009539DA10774296390080134597390000000005210D009A201008211601072700000000000000000921000A0B20009B1001 | msgMap:[raw:274901FCC082F700413D6410000328129839000000009539DA10774296390080134597390000000005210D009A201008211601072700000000000000000921000A0B20009B1001, dni:2749, endpoint:01, cluster:FCC0, size:82, attrId:00F7, encoding:41, command:0A, value:6410000328129839000000009539DA10774296390080134597390000000005210D009A201008211601072700000000000000000921000A0B20009B1001, clusterInt:64704, attrInt:247]

Any idea of what this may be and how to solve or avoid it?

ignore that

Done! Hahaha!

1 Like

Hi Guys,
anyone can tell if MCCGQ14LM ( model: lumi.magnet.acn001 ) will be supported? This is newer Aqara sensor that replaces older MCCGQ11LM. It seems to be supported by Zigbee2MQTT for HA etc. link
Thanks

Marku

I'm new to code import and would like to use this for my Aqara Mini Button.

I'm getting this error. Can you help?

Thanks!

You are in "Apps Code," but this is a driver and needs to be in "Drivers Code" instead.

5 Likes

I can't tell you how many times I've done this... :rofl:

4 Likes

I've been using this driver from Marcus for a few months now and it works for my temp/humidity sensors better than any others I've tried. I read in post Marcus is no long on this forum, not sure what that means?

Never the less, I was hoping that someone on here could help with my request.

The only problem I experience is sometimes out of the blue, the sensors seem to through out a false reading, then less than a second later return to normal readings. See log image below where the temperature reads 30.00 and returns:

I was wondering if there could be a max/min temperature range setting added so that anything below or above range would be ignored?

Thanks,
Stephen

Enter in the driver code, find zigbee_sensor_parseSendTemperatureEvent function and change the following code line with the values you need:

if(tRaw >= -50 && tRaw < 100) {

It is also opportune to take into consideration the warning I found in the Markus's code:

"Incorrect temperature received from the sensor ($tRaw), it is probably time to change batteries!"

all above should work. It should, not necessarily It Will.

You could also add two min/max parameters instead of raw builtin numbers...

3 Likes

@roberto Thanks for the insight, however that did not work for me. When I changed the parameters to a range between 50 and 90, I kept getting that warning message.

"Incorrect temperature received from the sensor it is probably time to change batteries!"

When I reverted the change to -50,100 it started responding with temperature readings again.

As 30 F degrees are out of 50-90 range, the driver correctly prompt you back with that warning, as It matches the "else" branch of the range check.

If you want filter "dropout" values that are supposed to be fault (because are abnormally different from previous values ) you must keep last value, compare with the new value and decide what to do (e.g. discharge It)

Otherwise if you want simply skip values out of your range, you have to comment also the code line with the log function call.

Hope It can help

The readings before the change were a consistent 70-73 degrees, the extremely abnormal 30 is scarce. So, for it to had occurred the moment I altered the code would had been highly unlikely. Also, it no longer posted any temperature readings for hours after. As well, there is another DHT Aqara sensor which does not have the problem and it too showed in logs with warning message when the driver was changed and no longer posted any temp readings for hours after.

Hi - I just installed an Opple WXCJKG13LM switch using this driver. I was able to pair it, but after clicking Initialize it shows as not present, and the driver does not respond to any button presses. I installed a child device for one of the switches, and that also does not respond. No battery level is shown either. Clicking Refresh, clicking the button on the back of the switch or double-clicking same do not help.

Is there a trick to getting these wireless switches working ?

Thanks