I recently bought a xiaomi motion senor and it pairs perfectly with the mi control hub. The sensor shows up in home assistant, however, it does not update in home assistant. Weirdly enough, the sensor updates in the mi home app.
It appears that after triggering the motion sensor once, it could no longer be triggered for about 5 minutes.
I am facing the exact problem since this morning, but last night everything worked perfectly (sensor events are picked up by HA, and I could use it to activate triggers).
This morning, the mi sensor events stopped flowing to HA. I looked at the HA logs, it doesn’t pick up the events it used to pick up yesterday. For example, the following was from yesterday when motion was detected and picked up by HA:
2018-08-20 20:23:21 INFO (MainThread) [homeassistant.core] Bus:Handling <Event motion[L]: entity_id=binary_sensor.motion_sensor_158d0001d90a65>
2018-08-20 20:23:21 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: old_state=<state binary_sensor.motion_sensor_158d0001d90a65=off; friendly_name=Motion Sensor_158d0001d90a65, device_class=motion, No motion since=0 @
I tried the following this afternoon:
Unpair the sensor and pair with the gateway again
Unpair gateway with wifi, and paired again
Updated the wifi key on gateway (via app), and updated its config in HA config, restarted HA
I’m seeing the sensor appearing in HA, but HA is not picking up the sensor events.
I have resolved this problem by specifying the mac, key, and host (ip address) of the gateway in the HA configuration file. The sensor events were not picked up by HA because the Xiaomi Aqara module failed to initialise as it didn’t manage to discover the Gateway automatically.
Guys, I’m having the same exact problem:
My hub and motion sensors work OK on the mi app.
They also appear in HA, but I see no updates of motion or anything (always shows “clear”) even though mi app does see them. There aren’t any errors or warnings in the log file as well.
This is my config:
Guys, thanks a lot, but I can’t figure it out. I tried all your suggestions. Tried the following:
Restart xiaomi aqara gateway
Re-generate the LAN key from both iOS and Android
And all the above…
Basically, I can see the gateway in HA (and all sensors connected to it), but it doesn’t do anything. I see the gateway light switch, but can’t activate it (it just turns off by itself). Also: I keep getting “invalid key” in the log file, can’t figure out why, I switched the key multiple times and it doesn’t help.