Xiaomi sensors not updating

Hi all

I’ve having some issues with the Xiaomi sensors updating. I have a temperature sensors and some door/window opening sensors. They only update on restarting HASS.

I’ve gone through the process of connecting to the Aqara gateway via serial/UART and opening the required ports. The Aqara gateway appears in hass and I can successfully interact with the gateway, turn the light on/off etc.

I’m stumped with the update frequency of the sensors. I’ve tried regenerating the key, re-adding the sensors, etc.

I’m currently running
Home assistant 0.86.3
Xiaomi Aqara hub 1.4.1_164 revision 2

Any suggestions would be great, cheers

1 Like

I also noticed some issues with Xiaomi sensors after updating to 0.86.3. Some window/door sensors remain open in HA for 40-50 mins, but in MiApp they are closed.
There are some errors in the log:

No data in response from hub None
4:09 PM components/light/xiaomi_aqara.py (ERROR)

Cannot connect to Gateway
4:09 PM components/light/xiaomi_aqara.py (ERROR)

I’ve noticed this also

Is anyone else experience problems?

I’m running HASSIO 86.3 and I have 2 Xiaomi Aqara Hubs with a bunch of sensors. Everything seems to be working fine.

Hello, since I moved from my RPI with homeassitant in docker to hassio in docker on windows, all my aqara sensor appears but they don’t get updated.
If anyone can help :slight_smile:

Same here. Temperature sensors only update on restart. I’m on 0.95.1. Any fix?

1 Like

Finaly i connect my Xiaomy Gateway to HA
But sensors only update on restart.
HA run on Windows 10 Python virtual environment.

port 9898 looks close in Zenmap, but gateway is online and i can turn his light on

Ok i solve problem, first of all you need make shure your multicast working.
I tryed everyting i even open my gate and connect via USB-UART
But port 9898 stay closed, and sensors dont update

Finaly, I used Multicast Tester
IP 224.0.0.50 , port - 9898 .
And it show that gateway send Heartbeat, but Windows 10 Python virtual environment cant see it.
So i do
route delete 224.0.0.0 mask 240.0.0.0
route add -p 224.0.0.0 mask 240.0.0.0 192.168.1.3
An everything works fine.
More info here (russian).

1 Like

I have 9 Xiaomi sensors and they’re not properly updating. Some can update every 10 minutes (sometimes), but others can take a lot longer than that. Two rooms haven’t updated for hours, one of which hasn’t updated for 13 hours!

It’s very common that they don’t report anything for 2-3 hours.

I have an Intel NUC with Hassio, Conbee 2, two IKEA outets (possible routers) and 9 sensors. My Hue lights and other things are on another channel.

Any help is greatly appreciated!

if you try warm you temperature sensor in hands, how fast it updates?

I feel very stupid right now. I took one that hadn’t updated for 3 hours and it only took a minute (maybe less). Makes sense to only update when there’s been an actual change, I guess I didn’t think they would work that way. Thank you!

Hi,

I know is an old thread, but maybe can still help somebody. I had the same problems, using an intel nuc and Home Assistant installed in virtual machine and notices the sensors only updated randomly or after the server has rebooted. I tried reinstalling several times the Home Assistant, I tried opening the ports, disable firewall in the router, put the server behind DMZ, but nothing helps. At this point I start thinking that the Chinese server or poor quality of the Xiaomi product must the fault.

But it turns out I was wrong; the Xiaomi gateway works perfectly. To test the gateway, I downloaded an app from play store called multicast tester under ip address I set the 224.0.0.50 and the port 9898 and noticed the gateway is sending the multicast correctly, every time a sensor is triggered.

In my case I have a mesh system installed, and the mesh system apparently cant forward the multicast signal, so what I did is I bought a TPLINK 5 port switch TL-SG105E, connect the switch to the router and the mesh router to the switch instead of the router, then in the switch menu enable IGMP Snooping. And since then everything works great, and no more dropouts. The problem is the isp router and not Xiaomi or Home assistant.

I hope it helps.

1 Like

Hi Smic,

You reply did give me some hint when I try to solve the similiar issue.

in my case, in steading of using a physical switch, I set up a (virtual) bridge in truenas scale, and use that bridge when setting up the NIC for the VM which is used by homeassistant… and solved the problem…

Thank you…

My case was also solved by this post. I added a multicast route and then suddenly every sensor update reaches the HomeAssistant server which is running on a NUC (Python virtual env).

So it seems, the root cause was the missing multicast route in Ubuntu OS which is not there by default.