How to use Xiaomi Devices

Great!! I got it working! how do you turn the light off with a push again? so push to turn on/off.

Thanks :slight_smile:

Toggle for the action

Awesome thanks that worked for me. The motion sensor doesnt work with Hubitat simple lighting. Ill try it with rule machine to see if that works

You’re sure your motion sensor is working? I use two different Motion sensors with simple lighting.

I think its working. Im see logs in events. How do i know for sure? Im using the Aqara ms

Me too. Hallway motion sensor is a Centralite, and Hallway motion sensor 2 is a Xiaomi Aqara

When you trigger the motion sensor in the device details page, it will show active. Don’t forget that Aqara have a 60 second hardware time out unless you modify the hardware.

Can you post your rules?
From the way you are describing things your devices are working but your rules are not.

In this use case it turns off all my downstairs lights when we go to bed.
As has been said above you can select toggle so if the light is off and the button is pressed the light turns on. When pressed again it turns of.
I.e. It toggles the light condition.

This is my current settings for simple lighting rule

What do you mean by triggering the device in the details page?

For your motion sensor, you should see something like this in your logs.

Im not getting that. All im getting is resetBattery as a log

Have you set the parameters up in the device, such as below?

Your settings may be different than the ones shown, dependent on the driver etc.

Yes i have that set up but its still not working

These can be tricky devices, no doubt you have read.

I'd put it into pairing again, and Search for devices.
If found ok, it will tell you that its found the already paired device.

If your hub platform is prior to 2.5, then toggle that switch on in the driver. Otherwise leave it off. Since it’s Xiaomi, it probably needs to be removed and paired again.

Make sure you’re using the latest driver and add some IKEA Trådfri outlets if you don’t have them. They keep the Xiaomi devices very stable has been my experience and several others say the same. The Xiaomi devices like them and seem to prefer them unless the hub is closer.

What do you mean toggle that switch on the driver?

image

1 Like

What @SmartHomePrimer meant to say is "if your hub platform version is prior to 2.0.5, then..."

Check hub version here:



However, I doubt this is the issue.

To verify that the button is working, check its events list - you should see pushed | 1, pushed | 2, released | 1, etc, depending on the model.

And you haven't mentioned which model your button is? There are two Aqara square button models, WXKG11LM & WXKG12LM, and the WXKG11LM model has two revisions (which is only determined by looking at the Zigbee model reported at the bottom of the device details page, like this:

As mentioned, for the button, there is no "push" command or virtual button as seen in SmartThings because this is a physical button and the way it is meant to be used (and tested) is to actually push it.

I'm a little concerned that your button isn't working quite right because I see in your screenshot that a pushed | 0 occurred, and a push of button 0 shouldn't happen. For me to help with that I would need to know the model / revision of the button (determined from the Zigbee model as shown in the above screenshot), as well as some debug message log output from the time that a pushed | 0 event occurs.

Then, with the motion sensor, the same things apply, more or less. You should see illuminance and motion - active / inactive events in the device events list. If you are not seeing those, something is not working correctly, and I can help troubleshoot.

I should also mention that Xiaomi/Aqara devices are known to not work with most Zigbee repeater devices. Repeaters act like WiFi extenders, allowing other ZigBee devices to connect to the repeater instead of directly to the hub, when the signal from the hub is not strong enough. Most mains-powered Zigbee devices (with the exception of some Zigbee smart bulbs, such as Sengled) are Zigbee repeaters.

Keeping this Zigbee repeater incompatibility issue in mind, I have an example experience that may relate to your troubles with the Aqara Motion Sensor: When I was doing testing with a Securifi Peanut Plug, I noticed that all motion detection messages from my Aqara Motion Sensor were not being passed on to the hub by the Peanut Plug. So,you should check if you are using any mains-powered Zigbee devices.

2 Likes

Really good info. I have three that show lumi.sensor_switch and all three work flawlessly with Keith's driver. I have had problems with pairing one of the three. Used to always put up a fights. They're awesome little devices, but they don't cooperate without fighting you a bit. Since adding the IKEA TrĂĄdfri outlets, I don't have any issues though. No drops, not anomalies in performance (other than a contact sensor that just a few nights ago, stopped responding until I simply touched it :rofl:).

So for example, unless the Zigbee model was truncated during pairing, that means you're using three of the round "original" Xiaomi button.

The usefulness of that kind of critical information is why I made the Detailed List of Xiaomi / Aqara Zigbee Devices chart near the bottom of my opening post of the [Release] Xiaomi / Aqara device drivers thread.

1 Like