Zigbee integration of Xiaomi Aqara sensors

Hi guys,

I want to use (as also a lot of other users) Xiaomi Aqara sensor without the official hub/gateway. I would like to connect the sensors directly via Zigbee.

I know, thet the sensors are not fully compliant to the Zigbee standard. That’s why there are some problems.

A recommended solution is to use zigbee2mqtt. With that solution the sensors are connected to a Zigbee gateway and the communication is mapped to MQTT. That works very well.

May question is, why does it work there? Obviously zigbee2mqtt also uses Zigbee. Why is it working with that solution and why isn’t it working with the Zigbee binding?

Thanks for support here.

BR,
cpa

1 Like

zigbee2mqtt as well as some zigbee adapters in other smart home solutions (e.g. ioBroker) are using zigbee-shepherd.
This makes the non-standard zigbee devices more standard conform (in highly simplified terms).

And with the openhab zigbee binding it is not possible to use something similar?

The developer of the openHAB zigbee binding would have to change the code.

Can you describe what isn’t working? As I understand it, most Xiaomi sensors are working - I think the cube doesn’t work at the moment, but I believe that others do.

If you want something changed, I really need you to be more specific as to what is wrong. I know there are quite a few people using the Xiaomi devices with the binding, so please report any specific issues.

I am using zigbee2mqtt so I don’t need the zigbee binding. I just wanted to make clear, that zigbee-shepherd can’t just be activated to make it work with the current zigbee binding in openHAB.

This is definitely true - the two use very different libraries. Of course that in itself isn’t any great reason for devices not to work. In the Z-Smart Systems library I have to focus on standards and certification as it’s more commercially focused, but the the binding can add support (extensions) for other devices such as Xiaomi, and that is what we have done.

Thats news to me, Chris… Which sensors is suppose to work with the Zigbee binding?
I have a few different sensors, (Xiaomi-Mi series). A few weekes ago I supplied with an Xiaomi Aqara door/window sensor as well, just to test. I have not been able to get any of them to work with the Zigbee binding.

Have you changed anything lately? (I use the 2.5 snapshot binding with 1.11 lib.).

I haven’t tried it yet. But while I was waiting for the ordered sensors, I was reading a lot how to integrate these sensors in openhab without any gateway/hub. And almost everyone was pointing out, that the Zigbee binding is not working very well with Aqara sensors, because they are not fully compliant with the standard.

For example they got it running, but the connection is getting lost after some time. And they don’t get values anymore.

But if you say, there are some people who are using the zigbee binding with aqara sensors successfully, I will try it out.

The Aqara WSDCGQ11LM Temperature Humidity Sensor (the square one) works fine for me, beside that the pairing could be a bit annoying.
The Xiaomi Mijia Temperature and Humidity Sensor (the round one) don’t work. I could pair them, but they only get updated once during discovery.

1 Like

I’ve personally tried the door sensors, and the temperature/humidity sensors. I can always suggest reading the documentation as it does list some devices even if it’s probably incomplete -:

image

No - there haven’t been any major changes.

With some effort it should b possible to make them work. Someone would probably just need to work out the clusters they support and define the thing definition.

I wonder why I have not been able to succeed. I have had focus on xiaomi door/window sensors for long, but not matter how many times I´ve tried, I cant get it to work.
The Aqara can be included, but with no channels. The Mi sensor has never worked at all.

Yes thats what I read in the most threads. Thats why I was asking here why it is working with zigbee2mqtt but not with the zigbee binding. But I will also try it out.

The Xiaomi devices are problematic to include - you need to keep them awake, and many people don’t succeed. Please remember - these are not ZigBee compliant devices.

you need to keep them awake,

But zigbee2mqtt seems to be able to keep them awake. That was my original question. Waht the difference here is. So it is possible, but not easily and not integrated in the zigbee binding.

I have no idea what the difference is. Are you sure that zigbee2mqtt really keeps them awake, or does it assume the device structure rather than discovering the services? Can you provide more information about how zigbee2mqtt works to keep them awake?

Keeping the devices awake is pretty simple - just press the button. This issue is not an openHAB issue - you can also read this same issue on other systems such as SmartThings, Hubitat etc…

I thought that are the ones, which have already a static thing definition (zigbee:xiaomi_lumisensorht:..)?

I’m not sure I understand this point? The static thing definitions are required where a device doesn’t properly comply with ZigBee standards, but is not required if the device using more standard features.

Which makes it a bit difficult to understand. First most devices are working, and then, they´re problematic.

I did try the trick with hitting the button every 1 sec. That way I managed to include the Aqara sensor one time, without channels though. But the Mi sensors I have never been able to include at all. Thats not problematic, Thats impossible to me :slight_smile:

I’m not sure what I can say. The devices are problematic - even for zigbee2mqtt (just search for zigbee2mqtt xiaomi problems - there are a lot of people with issues here, so I don’t think it’s just openHAB or SmartThings or Hubitat.