Hey guys! I figured to post this problem to the forum as well in case someone else is experiencing problems
Home Assistant release with the issue:
0.88.0
Last working Home Assistant release (if known):
0.87.1
Operating environment (Hass.io/Docker/Windows/etc.):
Hassio running on a VM:
arch x86_64
dev false
docker true
hassio true
os_name Linux
python_version 3.7.2
timezone Europe/Madrid
version 0.88.0
virtualenv false
Component/platform:
Description of problem:
Xiaomi Gateway (v2) is working correctly as I can see all the devices responding well from the Mi Home app. The problem is when Home Assistant tries to connect with the gateway. Some of the devices will work (like the Aqara wall switches) but some other won’t like contact sensors or motion sensors.
For example, when I try to turn on a light through the Aqara wall switch on HA it works just fine. If I try to turn on/off the Xiaomi gateway light I get an invalid key error
Thu Feb 21 2019 09:04:15 GMT+0100 (Central European Standard Time) Got error element in data {"error":"Invalid key"}
If I move in front of a motion sensor or open a window it won’t report the state on HA (but it will on Mi Home app)
I’ve tried the following things:
- Created another key through the Mi Home app for the gateway
- Power cicle the gateway and the entire VM running Hassio
- Tried different configurations on configuration.yaml
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
Key was changed from original but still shows the format I’m currently using. I’ve also tried adding the mac and some other preferences like interface, etc with no luck.
xiaomi_aqara:
gateways:
- mac:
key: CACAE1C33CDC41281
Traceback (if applicable):
I get an Invalid Key when turning on the light using the Xiaomi Aqara Wall Switch, but the light actually turns on and off perfectly
2019-02-21 13:54:07 DEBUG (SyncWorker_12) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2019-02-21 13:54:07 INFO (SyncWorker_12) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2019-02-21 13:54:12 DEBUG (SyncWorker_12) [homeassistant.components.xiaomi_aqara] Gateways discovered. Listening for broadcasts
2019-02-21 13:54:57 ERROR (SyncWorker_4) [xiaomi_gateway] Got error element in data {"error":"Invalid key"}
Additional information:
As I said, I had this gateway working for years now. Today it just stop working so I’m trying to find out what’s going on.
Edit to add a video: when I turn on the Aqara Wall Switches lights will turn on even if I get a invalid key error. Also it seems some other devices are working like temperature sensors. However all the contact sensors seems to not be reporting anything. See video here https://d.pr/v/ckqd7j