Cesc
January 3, 2019, 12:54pm
1
Hi,
I have a home assistant version 0.84.6 and I integrated a xiaomi gateway with two motion sensors. I can see two sensor in my home assistant but I can not do any trigger.
I can see that if I select the motion sensor, its state is “clear” but dont change if I move in front of sensor.
In the documentation I can see that the trigger must be like below:
trigger:
platform: state
entity_id: binary_sensor.motion_sensor_158d000xxxxxc2
from: 'off'
to: 'on'
but the state is not off or on, as I say before.
I looked for in this community but I can’t find any information that it can help me. Possibily I didnt use the correct words…
Can I help me please?
Thank you in advance.
Regards.
Yoinkz
January 3, 2019, 1:06pm
2
I’m not 100% sure what you mean, but if you move in front of it the dashboard icon you have doesn’t change at all?
Cesc
January 3, 2019, 2:20pm
3
No, nothing
Unavailable status is because I powered off my home assistant.
Yoinkz
January 3, 2019, 2:21pm
4
Cesc:
No, nothing
Hmm,
If you open the Mi Home app (if you are using it) do you then see the “motion” being detected?
How does your Xiaomi Gateway conf look like?
Cesc
January 3, 2019, 2:57pm
5
Yes, I use Mi Home app and can see motion:
Do you refer to home assistant configuration?
thank you!!!
Yoinkz
January 3, 2019, 4:17pm
6
Strange… mine works without an issue.
Do you see any errors in the log?
Currently I use only this in my conf file:
xiaomi_aqara:
discovery_retry: 10
gateways:
- key: xxxxxxxxxxxxxxxxxxxxx
ady8077
(Adrian Ewing)
January 3, 2019, 5:49pm
7
i set up my gateway yesterday and the first password the MI Home app gave me didn’t work, try refreshing the password
Yoinkz
January 3, 2019, 6:49pm
8
Good idea suggested here. I did the same for a friend, I did hit the refresh key a couple of times and finally it worked.
Cesc
January 3, 2019, 9:45pm
9
Hi guys,
I changed it the password and the motion sensor doesn’t work
I think the comunication of gateway with home assistant is correct.
@Yoinkz do you have motion sensors too? do you have additional configuration?
Cesc
January 3, 2019, 11:35pm
10
I found in the log this:
2019-01-04 00:23:12 ERROR (SyncWorker_1) [xiaomi_gateway] Got error element in data {“error”:“Invalid key”}
ElSlabo
(Ed)
January 4, 2019, 4:48am
11
My Config is the same as Yonkz
xiaomi_aqara:
discovery_retry: 5
gateways:
- key: XXXXXXXXXXX
Try removing the Host and Mac. If I remember correctly the Mac is only needed if your’re using 2+ Gateways…
Yoinkz
January 4, 2019, 6:41am
12
Cesc:
{“error”:“Invalid key”}
I would also try refreshing the key in the MI Home le app and paste the new one into your config file. Then restart hassio and give it another shot.
Cesc
January 4, 2019, 4:40pm
13
If I remove the host and mac the gateway disappear in the hasio and in the log appear this missage:
2019-01-04 17:25:02 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aq
ara is taking over 10 seconds.
2019-01-04 17:25:44 ERROR (SyncWorker_3) [homeassistant.components.xiaomi_aqara]
No gateway discovered
2019-01-04 17:25:44 ERROR (MainThread) [homeassistant.setup] Setup failed for xia
omi_aqara: Component failed to initialize.
Also I tried some times refreshing the key in the Mi Home and doesnt work neither.
I found this thread: https://community.home-assistant.io/t/xiaomi-motion-sensor-problems/
And I think is the same problem that mine. For two reason:
I can not power on the light of gateway because power off itself.
The Home assistant doesnt pick up the motion information of sensor and for this reason not change the state.
I will try to fresh install of all devices (HA, gateway, sensors…). But I think is not the solution.
Thank you everybody.
You need to fix this first. The key is invalid. Removing key won’t help.