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

Groovy should have handled it, but you can always force it using the Java syntax:

BigDecimal cX = new BigDecimal(device.currentState("currentX")?.value)

I updated the code with your recommended fix and it works. (I think). I updated 6 lines, both open and close positions.

2 Likes

Hey, did you ever manage to find a workaround for this? I am seeing the same on on the QBKG03LM.

Erm, yes. But you’re not going to like it.

I bought an Aqara M2 hub. :grimacing:

I know.

But it's excellent.

For the issue at hand it should be a simple fix in the driver to properly assign the child devices. Well, a simple fix for someone who's worked out how the child device allocation works in these drivers, which I haven't. IIRC it is flexibly assigned unless there's something hard-coded for specific models. Sorry to not be of more help. :slightly_frowning_face:

As for why the M2, when I added some repeating wall dimmers recently the mesh collapsed and all the Aqara devices scuttled off again. After nearly three years fighting with them I realised their hubs now support offline HomeKit and the M2 has a wired ethernet port.

Given everyone in this house gets on well with the HomeKit dashboard (and we have some Hive gear which is only controllable through HomeKit unless you use their annoying app) it seemed like the stars had aligned.

Oh, and of course I'm using the excellent Homebridge Hubitat plugin, which exposes anything I like (except for buttons :sob:) from the two Hubitat hubs to HomeKit as well. The speed of control is amazing.

2 Likes

In my system logs I repeatedly find:

[sys:1] Unable to execute hubAction:delay 2000 sent from Switch Cocina, invalid or unspecified protocol.

[sys:1] Unable to execute hubAction:delay 2000 sent from Botón Mi 1, invalid or unspecified protocol.

This happens every 25 minutes (roughly). Both devices are Xiaomi / Aqara. The first one is a wireless Aqara wall switch. The second one, a Xiaomi Wireless button.

Both work perfectly and never had an issue with them.

Any clue of what may be going on?

I use to see that when using Markus’ driver.

So what are you using now?

1 Like

I really liked Markus’ driver, but since it is no longer being maintained and the system throws errors, I’ve switched to this one:

3 Likes

Hi just paired D1 wireless double switch WXKG07LM and this kind of logs:

    dev:72021-03-07 16:53:22.146 infoButton 2 was pushed
    dev:72021-03-07 16:53:22.140 infoMultistate - endpoint: 2, taps: 0, physicalButton: 2, physicalButtons: 0, button: 2
    dev:72021-03-07 16:53:22.132 infoMultistate - description:read attr - raw: 4E490200120A5500210000, dni: 4E49, endpoint: 02, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0000 | parseMap:[raw:4E490200120A5500210000, dni:4E49, endpoint:02, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0000, clusterInt:18, attrInt:85, valueParsed:0]
    dev:72021-03-07 16:53:20.313 warnUnknown model (lumi.remote.b286acn02) - PLEASE REPORT THIS LOG TO THE DEV - description:read attr - raw: 4E490200120A5500210200, dni: 4E49, endpoint: 02, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0200 | parseMap:[raw:4E490200120A5500210200, dni:4E49, endpoint:02, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0002, clusterInt:18, attrInt:85, valueParsed:2]
    dev:72021-03-07 16:53:20.303 infoButton 2 was double tapped
    dev:72021-03-07 16:53:20.298 infoButton 2 was pushed
    dev:72021-03-07 16:53:20.293 infoMultistate - endpoint: 2, taps: 2, physicalButton: 2, physicalButtons: 0, button: 2
    dev:72021-03-07 16:53:20.286 infoMultistate - description:read attr - raw: 4E490200120A5500210200, dni: 4E49, endpoint: 02, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0200 | parseMap:[raw:4E490200120A5500210200, dni:4E49, endpoint:02, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0002, clusterInt:18, attrInt:85, valueParsed:2]
    dev:72021-03-07 16:53:18.517 warnUnknown model (lumi.remote.b286acn02) - PLEASE REPORT THIS LOG TO THE DEV - description:read attr - raw: 4E490200120A5500210100, dni: 4E49, endpoint: 02, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0100 | parseMap:[raw:4E490200120A5500210100, dni:4E49, endpoint:02, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0001, clusterInt:18, attrInt:85, valueParsed:1]
    dev:72021-03-07 16:53:18.509 infoButton 2 was pushed
    dev:72021-03-07 16:53:18.505 infoMultistate - endpoint: 2, taps: 1, physicalButton: 2, physicalButtons: 0, button: 2
    dev:72021-03-07 16:53:18.478 infoMultistate - description:read attr - raw: 4E490200120A5500210100, dni: 4E49, endpoint: 02, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0100 | parseMap:[raw:4E490200120A5500210100, dni:4E49, endpoint:02, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0001, clusterInt:18, attrInt:85, valueParsed:1]
    dev:72021-03-07 16:53:14.365 warnUnknown model (lumi.remote.b286acn02) - PLEASE REPORT THIS LOG TO THE DEV - description:read attr - raw: 4E490100120A5500210000, dni: 4E49, endpoint: 01, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0000 | parseMap:[raw:4E490100120A5500210000, dni:4E49, endpoint:01, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0000, clusterInt:18, attrInt:85, valueParsed:0]
    dev:72021-03-07 16:53:14.359 infoButton 1 was pushed
    dev:72021-03-07 16:53:14.353 infoMultistate - endpoint: 1, taps: 0, physicalButton: 1, physicalButtons: 0, button: 1
    dev:72021-03-07 16:53:14.334 infoMultistate - description:read attr - raw: 4E490100120A5500210000, dni: 4E49, endpoint: 01, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0000 | parseMap:[raw:4E490100120A5500210000, dni:4E49, endpoint:01, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0000, clusterInt:18, attrInt:85, valueParsed:0]
    dev:72021-03-07 16:53:11.571 warnUnknown model (lumi.remote.b286acn02) - PLEASE REPORT THIS LOG TO THE DEV - description:read attr - raw: 4E490100120A5500210200, dni: 4E49, endpoint: 01, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0200 | parseMap:[raw:4E490100120A5500210200, dni:4E49, endpoint:01, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0002, clusterInt:18, attrInt:85, valueParsed:2]
    dev:72021-03-07 16:53:11.554 infoButton 1 was double tapped
    dev:72021-03-07 16:53:11.548 infoButton 1 was pushed
    dev:72021-03-07 16:53:11.542 infoMultistate - endpoint: 1, taps: 2, physicalButton: 1, physicalButtons: 0, button: 1
    dev:72021-03-07 16:53:11.535 infoMultistate - description:read attr - raw: 4E490100120A5500210200, dni: 4E49, endpoint: 01, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0200 | parseMap:[raw:4E490100120A5500210200, dni:4E49, endpoint:01, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0002, clusterInt:18, attrInt:85, valueParsed:2]
    dev:72021-03-07 16:53:09.251 warnUnknown model (lumi.remote.b286acn02) - PLEASE REPORT THIS LOG TO THE DEV - description:read attr - raw: 4E490100120A5500210100, dni: 4E49, endpoint: 01, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0100 | parseMap:[raw:4E490100120A5500210100, dni:4E49, endpoint:01, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0001, clusterInt:18, attrInt:85, valueParsed:1]
    dev:72021-03-07 16:53:09.242 infoButton 1 was pushed
    dev:72021-03-07 16:53:09.236 infoMultistate - endpoint: 1, taps: 1, physicalButton: 1, physicalButtons: 0, button: 1
    dev:72021-03-07 16:53:09.228 infoMultistate - description:read attr - raw: 4E490100120A5500210100, dni: 4E49, endpoint: 01, cluster: 0012, size: 0A, attrId: 0055, encoding: 21, command: 0A, value: 0100 | parseMap:[raw:4E490100120A5500210100, dni:4E49, endpoint:01, cluster:0012, size:0A, attrId:0055, encoding:21, command:0A, value:0001, clusterInt:18, attrInt:85, valueParsed:1]

The driver version is v1.0.1.1123 and sequence what I used in logs is

  • one tap with left switch
  • double tap with left switch
  • long press with left switch
  • and same with right switch

I don't know what those logs mean and why it shows that the device is unknown?

I think if you want anyone to give any useful feedback on these logs you should do a screenshot of the logs and post it.
To try and decipher what you have posted would be a nightmare.

1 Like

New try. Maybe it is now more readable :smiley:

Aqara waal switch (Hubitat/zigbee-aqara-wall-switch-expanded.groovy at release · markus-li/Hubitat · GitHub) line 573 should be "if(isD1NeutralSwitch() == true || isOldNeutralSwitch() == true) {", otherwise on/off events are sent to buttons 5,6,7,8,9, while reported is just 5 buttons..

1 Like

Xiaomi Smart Home Mijia Honeywell Smoke Detector:

Great! But…

I’ve noticed that the log is now flooded with “Parse START” messages; The lastClear state is set 10 to 20 times a minute! I fear that the battery will be fast drained...

Any suggestions?


Before:

After connecting the device and installing the driver I can access my new device. :+1:

The first “Test” command works, after a while the battery status (100%) is shown, and even my push on the little button of my device raised an smoke=“testing…” event in Hubitat.

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

Download the Hubitat app