I am trying to work on the Xiaomi Door/Contact Switch handler.
The problem I have is that the sensor stops reporting battery after a while and I am not able to get it back no matter what I do (drop the device and rejoin it) so I though maybe the DH could request some data. When I try I do not get any response.
So am I doing my Zigbee commands correctly??
Here is my refresh:
In my experience the Xiaomi sensors do not do a very good job of responding to any commands we send to it. Whether that’s because they are extremely sleepy and just don’t hear the commands, or because they only sort of follow the Zigbee spec (in other cases they don’t do what they are supposed to), I’m not sure. It’s been several months since I was getting them setup in my house, but I’m not sure they really allow for configuration, or reading attributes. They seem to sort of do their own thing. One thing I haven’t done (or seen a writeup of someone who has), is set some up with a Xiaomi hub and sniff the Zigbee traffic which could give some clues to how their hub handles it, but unless you have the equipment to do that you’re probably out of luck.
For the time being though, what you have here would be correct for a normal device, but the fact that it is not responding further enforces my experience that Xiaomi devices don’t typically respond to commands.