I also get this same error in logfile, however my Aqara temperature sensors stop reporting and buttons stop working. Temporary fix is to restart HA, until it breaks again.
I have the same problem since yesterday
My sensors aren’t reporting anymore : “invalid key”
So I restart HA and it works again for a while, until it breaks again
Any ideas ?
EDIT : Gateway light control is still working, only sensors aren’t reporting
EDIT 2 : I tried to change my key, but the problem is still there… it works for 2 minutes and then it brokes.
I have the same problem: the gateway is discovered, but all sensors doesn’t work.
Using HA on virtualbox.
Any time I turn on the gateway light (that works), this message appears in the log:
Logger: xiaomi_gateway
Source: /usr/local/lib/python3.8/site-packages/xiaomi_gateway/__init__.py:432
First occurred: 19:05:15 (2 occurrences)
Last logged: 19:06:47
Got error element in data {"error":"Invalid key"}'