Aqara QBKG21LM

Happy new year everyone.

I'm just getting started with Hubitat. I started with a Tradfri hub and a xiamoi hub.
I have tradfri bulbs on the tradfri hub and aqara switches on the xiaomi hub.

I thought hubitat would allow me to have google home integration with my aqara switches but I can't get them to work in Hubitat at all.

I've tried some drivers like the oh-lalabs aqara wall switches. I can add my switch but I have no control over it from Hubitat.

Has anyone got any advice for a newbie on how to proceed?

My switches are Aqara no neutral QBKG21LM

First of all, welcome.
Is the switch connected directly to the HE hub?
I used to have one but didn't particularly like it.
It did work connected directly to HE.

Hi, yes connected directly to the HE hub. Do you know which driver you used?

Do you have HPM installed?
If so, go to install. Put in keyword Aqara and this should show up.
Give this driver a try.

I don't have that model of switch, but I have started a universal driver for aqara products that I do have which might work for you:

Hi,

Thanks for the replies. I tried both drivers and I'm able to add the switch using both.

I just don't seem to get any functionality, maybe I'm doing something wrong?

Once I've added the device I've created a dashboard to test the switch. In the dashboard it just comes up with an unknown and ? symbol.

Interestingly when I delete the device the switch switches off.

I'd appreciate any further help.

I hope this will be helpful. Even though Aqara devices can be made to work when paired directly to Hubitat, my experience and that of many others is that they work better and more consistently when left paired to the Xiaomi gateway.

The good news is that there are several ways to bring devices paired to Xiaomi gateways into Hubitat to use in automations etc.

  1. If you have a Mijia gateway (model DGNWG02LM), then you can use @fison67's Mi Connector app to bring the devices into Hubitat:
    Mi Connector and Xiaomi
  1. Alternatively, the Mijia gateway integrates easily with Node-RED, as does Hubitat, and you can use NR sequences to create Hubitat devices that mirror the state of Xiaomi devices paired to the Mijia gateway. This is the route that I use, and here are the nodes that I use:
    node-red-contrib-xiaomi-smart-devices (node) - Node-RED

  2. If you have a newer Xiaomi (Aqara or Mijia v3) gateway that supports Homekit, you can use Homekit + Homebridge to to create Hubitat devices that mirror the state of Xiaomi devices paired to the gateway.

2 Likes

You need to have the switch do something using the Rule Machine or Simple Automation Rules. You use one of the those and reference the device as a button and then configure the button (single press, double press and/or long press) to trigger something else, e.g. to toggle a light bulb.

As an example, this is a Simple Automation Rule to turn on two lights when the switch is double pressed:

Hey all,

I have the same model switch and tried the same drivers, they do not seem to work for this model.
The main problem is that the physical part of the switch cannnot be controlled/does not respond to the commands given.

Debug logs give me the following:

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]

Device data 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

If anybody is willing, I'd very much appreciate any help:)
Already tried playing around with the drivers myself but to be honest, it's very much beyond me.