[OBSOLETE] Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

I wish the Accelerometer XYZ output values were consistent enough to do that, but from my experience so far, they aren’t. For much more detailed information about the data that is sent by the sensor and a number of different Home Automation users working together to reverse-engineer the sensor’s output, I highly recommend reading through this thread on Github that I’ve previously mentioned.

But here’s a chart to help show why I can’t guarantee a way to know precisely what the orientation of the sensor is:

Resting position Sensor 1: X,Y,Z Sensor 2: X,Y,Z
Front side up 19,-30,1194 25,-2,1175
Battery side up 30,-20,-709 42,24,-783
Reset button up -19,981,177 -27,1043,150
Reset button right -912,-48,181 -922,-27,133
Reset button down 91,-1048,194 103,-1037,137
Reset button left 969,-18,189 989,32,145

Here are the problems presented that make it difficult to translate these to “rear side up”, “front side up”, etc.:

  1. There is a fair amount of variation in the XYZ values between just my two sensors in the same orientation, as well as between each instance of placing one sensor in the same position at different times.
  2. The values I’m seeing are imbalanced on each axis, especially on the Z axis. If they were balanced I would expect to see roughly the same number for front side up orientation expressed as a negative when the back side is up. In other words, around 1200 for front side up and around -1200 for battery side up. If this is imbalance is different for every sensor, it would require a complex calibration routine, and I don’t have enough data yet to account for the possible range of variation at either end of each axis to know what the average accuracy offset should be.
  3. The range of raw output needs to be scaled and converted to what is expected for SmartThings 3-axis capability
  4. The SmartThings 3-axis capability has been depreciated, as far as I understand it, which means it won’t exist or be available to use in the near future

Honestly if you want a device that can accurately and consistently tell you it’s 6-face orientation, I would just get a Xiaomi Mi Cube:

1 Like

IMPORTANT ANNOUNCEMENT - New versions of some Xiaomi devices not compatible with DTHs

From an Athom Homey Community thread dedicated to Xiaomi devices, I have learned that there are at least three Xiaomi Aqara devices with a new revision which seem to have firmware changes that make them incompatible with the current SmartThings DTHs (device handlers).

Here’s a list:

Device Model New Zigbee Model ID Old Zigbee Model ID
Aqara Button WXKG11LM lumi.remote.b1acn01 lumi.sensor_switch.aq2
Aqara Smart Light Switch - 1 Button WXKG03LM lumi.remote.b186acn01 lumi.sensor_86sw1lu or lumi.sensor_86sw1
Aqara Smart Light Switch - 2 Button WXKG02LM lumi.remote.b286acn01 lumi.sensor_86sw2Un or lumi.sensor_86sw2

NOTE: The devices with the New Zigbee Model ID are the new versions that don’t work with the current DTHs.

The first way to know whether you’ve received one of the new versions of the above devices is that it will only pair as a generic “Thing”, instead of choosing the correct DTH (device handler).

To check the Zigbee Model ID, you should be able to view it in your IDE when you view details about the device by clicking on it’s name in the My Devices page. Search for the “Data” row, where you’ll hopefully see something like this:

I don’t have any of these new versions myself, and don’t plan on purchasing more any time soon, so…

If any receives one of the above three models and it pairs as a “thing” please post in this thread, and I’ll explain how to get some live logging output which should hopefully help me to update the DTH to work correctly.

If you have a device with an Old Zigbee Model ID listed above, there’s no need post that they’re working fine.

4 Likes

@veeceeoh, that’s just the switch (so far), yes?

I received my 2 vibration sensors yesterday. They are both the same as yours:

lumi.vibration.aq1

For completeness, my other Xiaomi devices are:

lumi.sensor_motion.aq2 Aquara motion sensor
lumi.sens Original sensor (temp and humidity)
lumi.weather Aquara sensor (temp, humidity and pressure)
lumi.sensor_magnet.aq2 Aquara window/door sensor

I have a bunch of the contact sensors on windows at my house. A couple of weeks ago my hub burped for some reason and went offline. This was the first time my hub had ever had a serious issue that required rebooting in the year plus it has been running. Once I rebooted seemed like everything came back online with no issues. Some of the zwave switches showed unavailable until I turned them off and on from the app and then they were fine.

I just noticed that two of the Xiaomi contact sensors still sow unavailable. I have tried the override open / close to see if that would kick them into gear with no luck. I turned off device health for a couple of minutes to see if they would come back online but no luck.

Is there anyway I can get them back short of repairing ? They are installed behind the screens and I would prefer not to have to pull the screens out to re-pair.

Can you access them to even press the button?

I’ve never been able to get them to reconnect without physically accessing the device. However, that usually means leaving the device by the hub until battery reports start to come through, at which point i can position them where i want them. Worst case, I have to remove and then re-add them to the hub/automations.

Not ideal, but the price for the low price.

Thanks for reporting, but I realize I wasn’t clear enough in my post about the new versions of the three switches.

The only devices that have been reported with new versions are the Aqara Button, and the 1 & 2 button Aqara Wireless Smart Light Switches.

If you have other devices and they’re working fine there’s no need to report on them. Also if you have an Aqara Button or 1 or 2 button Aqara Wireless Smart Light Switch with the Old Zigbee Model ID, there’s no need to report on them.

I am mainly asking to report back if you’ve recently bought a new Aqara Button, or the 1 or 2 button Aqara Wireless Smart Light Switch, and it will only pair as a “thing” and has the New Zigbee Model ID listed in my post above.

That said, there’s a chance there could be other Xiaomi devices with new versions being released, and in that case those would also only pair as a “thing”. I will keep monitoring other sources of information about Xiaomi Zigbee devices and post updates on this thread if there’s any other new device versions discovered.


Probably not. If their connection to the hub was unavailable for more than an hour or two, then the devices will consider themselves “kicked off” the mesh network, and Xiaomi devices don’t automatically re-join when requested by the hub.

You should be able to re-join them without removing them from your list of devices completely, however. Just go through the “Add a thing” routine in the ST mobile app, and when they’re reconnected the LED will blink several times (as explained in the first post of this thread). You won’t see the name of the device appear ready to rename, though, because it’s already in the hub’s list of devices.

[BETA UPDATE] Xiaomi Aqara Vibration Sensor (Model DJR11LM) SmartThings DTH v0.71b

I just realized my vibration sensors aren’t showing up in SmartApps as a motion detector device to use as a trigger in automations either when vibration/shock starts (motion = active) or ends (motion = inactive).

Turns out I forgot to add the “Motion Sensor” capability so SmartApps will recognize that functionality. Now fixed!

The new DTH code can be grabbed from here.

1 Like

I’ve been running the the v .7 DTH and I’m not getting the option to select sensitivity. There’s just a "- - " in its place. I have recently updated to v.71b, still not there.

I’ve got two sensors and both are displaying the dashes. Tapping it flashed the box, but nothing happens.

Hmm, I set things up to set the level to “Low” initially when the sensor is paired, but if you already had them paired and changed to the newer DTH code it may be in limbo. I could put in a safeguard for that scenario by checking whether it’s set to anything yet by going into the preferences and pressing “save”, but I’m curious what is happening in your case.

Would you mind going into preferences, making sure both info and debug log message display are turned on (make sure to press save), and then either posting or PMing me the log output you get when you press the Sensitivity Level tile to change the level?

My Aqara Xiaomi arrived today. I have added the device handler for the motion sensor in the IDE but when i try and pair the device (i have pushed the pair button), it just adds as a “thing” with no information in it. What am i doing wrong and how do i fix this?

You should be able to edit the installed device in the IDE and change the device type to use the custom DTH.

This happens sometimes for some people so you’ve probably done nothing wrong.

What @TylerDurden suggested - manually changing to the right DTH while logged into your IDE is the correct way to “fix” it. Also, make sure you have the correct DTH added. What is the model of your Xiaomi device (normally listed on the battery panel)?

@TylerDurden that worked, thanks. Silly question but there’s no lux sensor in the Aqara Xiaomi motion sensors is there? For some reason i thought there was but playing around with them today, it appears not.

Do you mean the human motion sensor or the vibration sensor. The former (https://www.gearbest.com/alarm-systems/pp_659226.html?wid=1433363) does have the lux sensor. The vibration sensor (https://www.aliexpress.com/item/Xiaomi-Aqara-Shock-Sensor-Mijia-Aqara-Smart-Motion-Sensor-Vibration-Detection-Alarm-Monitor-for-MiHome-Aqara/32916169237.html?spm=a2g0s.9042311.0.0.18604c4d8Zls1x) does not.

I see a lux reading when I view my motion sensor in the Smartthings app.

Hello All,

I am hoping I’m posting to the right thread.
I’m super new to Smartthings and this forum, so might be missing something very basic. I’m hoping this is the place where someone can point me in the right direction.

I have a Smartthings Link plugged into an Nvidia Shield. The hub says it’s online. I have 8 Xiaomi Aqar door and window sensors in various areas of my house. All can be paired relatively easily from their doors and window locations using bsprangers device handlers, and they all work fine for about one hour. Then they become “unavailable” until I pair them again with the Smartthings Classic app. It doesn’t seem to be a range issue since all pair again with relative ease. I also have two wemo plugs and one wemo light switch that do not get disconnected from smartthings.

In some post somewhere I read that the problem may be that I’m using a Smartthings Link and buying a v2 hub would fix the disconnect problem. But now they have a cheaper v3 hub. Except I’m not sure if the v3 hub would fix the disconnect issue and the two different Smartthings app might further complicate things.

Would buying a v2 or v3 hub fix this disconnect problem?

Thanks for any help and tips!

I originally got into SmartThings with a ST Link for NVIDIA Shield, and ran into the same exact problem. Long story short, Xiaomi devices won’t stay connected to the Link because of its different firmware from the v2 hub. The issue lays on the side of the Xiaomi devices because they don’t conform 100% to the Zigbee mesh networking protocol.

However, most people seem to have relative success with Xiaomi devices connected to a v2 hub, but there are pitfalls where the use of Zigbee-repeating devices are concerned, as you’ve heard in your original thread asking about this.

I have a v2 hub myself, and the jury is still out on the v3 hub playing well with Xiaomi devices or not, so I will defer to any people on here who have tried it.

However, as mentioned in my other reply, you could also try getting a Xiaomi Gateway Hub for your Xiaomi devices and integrating it with SmartThings using this solution:

I should also mention that Wemo plugs and switches are WiFi-based, so that’s very different from Zigbee-based devices used with a SmartThings hub solution.

Thank you! Sounds like my best bet at this point is a v2 hub unless someone else can comment on the v3 hub. I’m afraid I don’t know how to begin to understand the Xiaomi hub integration (even with the link which is much appreciated), so I think I will leave that for later in case the v2 hub doesn’t work.

Thank you again!

Its a long shot, but reconnect your Xiaomi devices and keep them by your hub until regular batter reports are coming through, then try move them. I’ve no idea if it works with the ST Link, but its been more reliable for me with my v2 (UK).

If we are talking about Motion Sensor & Detector - Aqara then yes there is a lux sensor in it. However it only reports when motion is detected.

I’ve also found that while the reading is capable of gradually dropping down to 0, once it gets there it isn’t so keen to go back up again and doesn’t show changes until you get to about 50 lux. So I find it pretty useless in that respect.

You do have to make sure you have the model you think you have as there is a similar looking earlier model that might not have the lux sensor (sometimes advertised under the Mijia brand). The Aqara one comes with a stand, is branded Aqara on the top and has the model number RTCGQ11LM, though I have a suspicion I’ve seen something about there being a newer model around now. You also need to make sure you have the right device driver (i.e. the one that says Aqara in the name).