Xiaomi Sensors reliability

the reliability of XIAOMI devices is rather bad for me. Do you have tips or rules for monitoring your devices? Sometimes I do not get it for days, that a sensor no longer delivers values because he is offline. Only after a reset of the sensor it seems to work again. Basically, I think the devices from XIAOMI great, but even the low price is of no use, if they do not work reliably.
I use temperature sensors, motion detectors and window contacts.
I hope you can help me with simple rules :slight_smile:

Which xiaomi sensores exactly? I use the MI ones, several door/window sensors, one motion sensor, and a temperature&humidity sensor. They´re working pretty well.


Most “problems” I have with the temperature sensors and window contacts.

Are you using the xiaomi hub?

Hello Patrik,

I have 40 xiaomi devices of all types devided over two xiaomi hubs (max 30 per hub)and they all work perfectly, I only have a problem with one of my 10 temp/humid sensors which is outside on the gallery off my appartment, since i replaced the battery a couple off months ago it has lost its connection three times.
Reconnecting it is easy with the binding, so for me only the distance is a problem in 1 in 40 devices and I still havent found a good replacement battery to replace the original after about two years!
The ones I bought so far only last months 6 to 10, bought some duracells last week, see how the last…

I use the Xiaomi Gateway V2. I dont know why i have all the problems. How do you recognize the connection issues? Do you have a rule or something else? The biggest problem i have is, that the connection issues are quite. I do not notice it.

I use xiaomi hub V2 as well…

In openhab I use rules for all motion and door/window sensors, postupdate to a DateTime item, so I know for sure when they have triggered last time. Xiaomi motionsensor got a build in DateTime channel, which you can map to an DateTime item as well. For the door/window sensors, you´ll have to create a rule. But it´s very simple. Put all the door/window sensor into a group, and the use a rule like this:

rule "PIR BIN opdateringer"
    Member of gMotion changed from OFF to ON
    val String itemName = triggeringItem.name.toString
    postUpdate(itemName + "_stamp", now.toString)
        logInfo("PIR BIN", itemName)

You´ll need to create a DateTime item with the name “_stamp” for each sensor, like this:

//Xiaomi Mi Motion Sensor
Switch 	XiaomiMotionSensorMotion			"Xiaomi PIR bevægelse [MAP(motion.map):%s]"				                <cum_motion>	(gMotion)		{channel="mihome:sensor_motion:158d000222ee37:motion"}
DateTime XiaomiMotionSensorMotion_stamp 		"Xiaomi PIR bevægelse Sensor [%1$tH:%1$tM:%1$tS %1$td.%1$tm.%1$tY]" 			<time>		(motion_stamp)

This example is just for the manual DateTime update of the Xiaomi motion sensor. But it´s the same for the door/window sensor. Just add them to the group and they´ll be updated as well.

This is how all my motionsensors updates looks like in BasicUI: (this not updating are Zigbee which isn´r running atm).

I use rules like that alot, It gives me some quite time when I know things are working the way it should… Some calls me a control freak… Maybe they´re right :smiley:

I have 12 temp sensors and use the Expires binding to let me know if one has not posted an update after 6 hours… That works well…

But shows me that I have 3 sensors at the moment that are very unreliable, But all the rest have been 100% perfect for the last 9 months.

I’m thinking it might be a range issue so I have ordered some powered sockets to act as extenders to see if that helps.


Thanks for your reply.

I did not even know this binding. Do you have an example of your configuration? Do you have that at every value of the sensor? I have noticed that the battery level seems to be transmitted much less frequently than the temperature. Is that a problem?

Can you tell me how to reset a aquara temp/hum/pressure sensor?

When i press the button on it, i can hear the chinese voice in the xiaomi hub. But i don´t get new values…

So the connection is there.

Any idea? Is there a way to reset or make a new connection?

I only press the button, if i can hear the chinese voice i get new values. But i check it in the MiHome App. How can i reconnection with the binding @X-Ray181 ? Yout Wrote its very easy :slight_smile:

No not really. As long as the device report battery value once in a while (like once a day) you should be covered just fine.
The temp/humidity should report every change though, maybe with a small thresshold like ± 0.5 degree.

Press and hold the button on the device untill it blinks blue… (or minimum 5 sec). Thats the usual way to reset an xiaomi device.

1 Like

And after that i have to pair the sensor with the hub again?

I have this in my sitemap:
Switch item=Gateway_AddDevice label=“Add Device to Gateway[]” mappings=[ON=“Pair”]

And this in my items file:
Switch Gateway_AddDevice { channel=“mihome:gateway:34cexxxxxxx:34cexxxxxx:joinPermission” }


i dont know the Channel joinPermission. Do you sure that the V2/v3 Gateway has a Channel like this? Or is it only available on Aqara Gateway?

I tninking about to buy a conbee or raspbee and some Zigbee repeater to improve the signal.

Yes (I have V2/V3) and it’s in the documantation: