Xiaomi Aqara temperature/humidity sensors. Do I need a gateway?

I just received a couple of these sensors. I have no idea if they are the “original” or newest version.

Do I also need a Xiaomi gateway, or can I use Smartthings to connect the devices?

They can be used with SmartThings directly, however there are a few things to be aware of:

  • You have to install a custom device handler (DTH).
    Please see this thread for information and links to the most up-to-date device handers. You want the device handler for the Aqara Temperature Humidity Sensor, based on your LightInTheBox.com link.

  • The older SmartThings “classic” mobile app should be used with Xiaomi / Aqara devices
    Devices that use custom device handlers are not yet officially supported for use with the new SmartThings Samsung Connect mobile app.

  • Most non-battery powered ZigBee devices aren’t “friendly” with Xiaomi / Aqara devices
    Most ZigBee devices that are mains-powered (plugged into a wall socket) also function as ZigBee “repeaters”, which is similar to the what WiFi extenders do. Unfortunately, because Xiaomi / Aqara devices use ZigBee in a non-standard way, they will be dropped off the network by the majority of repeaters. So you would want to check whether you have any mains-powered ZigBee devices. Please see this thread for more information, and also this post on the Hubitat Hub forums which lists ZigBee repeater devices which are known to be compatible.

If you find that you already have “incompatible” ZigBee repeater devices, or you are unable to use the SmartThings “classic” mobile app, then there is a SmartThings solution called Mi Connector that allows integration of devices connected directly to a Xiaomi Gateway.

1 Like

They work fine in the new app btw… just not officially supported as noted by @veeceeoh

With bspranger DH, is it possible to make some changes that it shows temperature in front page instead of humidity, or show both in new app?

Aqura temp sensor works fine in the new app with the custom DH.
I also have a smartthings smart plug and I dont have any issues with it either regarding the repeater function.

@ryvaenge change the following lines (124 & 125) to your desires to the file here:

   main("temperature2")
        details(["temperature", "battery", "pressure", "humidity", "spacer", "lastcheckin", "spacer", "spacer", "batteryRuntime", "spacer"])

Thanks for your reply but I don`t understand. I tried to change places between “temperature” and “humidity” in the code, but no changes in new app.

Ahh the keyword is “new app”…

I’m not even sure that there are customizations allowed outside of some limited framework features — meaning my water sensor will have a single tile showing Wet/Dry — that’s all it will have not the extra tiles you re-arranged. All Groovy code will work though — just UI seems challenged in the new app. Most of the device code you see here will comply with SmartThings Classic not the new SmartThings. Just the old app will have all UI components.

The solution:

Edit metadata section in DH:

definition (name: “Xiaomi Aqara Temperature Humidity Sensor”, namespace: “bspranger”, author: “bspranger”, mnmn: “SmartThings”, vid: “SmartThings-smartthings-Xiaomi_Temperature_Humidity_Sensor”, ocfDeviceType: “oic.d.thermostat”)

That edited line will cause errors, because the double-quote marks were converted to open/close quote marks, and it’s missing the open curly bracket ({) at the end of the line.

Use this replacement text for the Aqara temp-humidity sensor DTH instead:

definition (name: "Xiaomi Aqara Temperature Humidity Sensor", namespace: "bspranger", author: "bspranger", mnmn: "SmartThings", vid: "SmartThings-smartthings-Xiaomi_Temperature_Humidity_Sensor", ocfDeviceType: "oic.d.thermostat") {

To update the DTH for the Xiaomi model, use this replacement text:

definition (name: "Xiaomi Temperature Humidity Sensor", namespace: "bspranger", author: "bspranger" mnmn: "SmartThings", vid: "SmartThings-smartthings-Xiaomi_Temperature_Humidity_Sensor", ocfDeviceType: "oic.d.thermostat") {

I went into the IDE and changed the Type to “SmartSense Temp/Humidity Sensor” instead of the bspranger custom DH. The main tile now reports temperature instead of humidity in the new app.

Is there any danger of instability or damage if I continue using this DH?

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.