New Xiaomi gateway firmware (xiaomi_aqara component)

how do you get the key now with the updated MI home app ?

having the same problem , did you use another andriod device ?

Hey @Danielhiversen is it possible to set the radio of the gateway to your country and have all the smart home features working?

Radio is not supported without some hackery to redirect the gateway calls to your own server. Search around on this forum as it was posted about before

Searched on this forum couldn’t find it mate.

Agree - hard to find as the search returns topics not posts.

Here is the one I meant:

1 Like

well it means I need to change the DNS server of my router to access local radio stations?

More than that - also need some kind of server that reformat the audio to a weird format that xiaomi use

2 Likes

Did you ever find the answer to this question? I’m having a hard time finding the password in the Mi Home app with the new interface…anyone know where to find it?

Just in case anyone comes across this in the future, I think the issue was that I was selecting the US server instead of “Mainland China” (not sure what that has to do with connecting my door sensors to the gateway). Anyway, I selected “Mainland China” and then I was able to pair my sensors.

Nevermind, found it. To see the button with the three dots you have to select your gateway first. I missed that step

1.4.1_151 is out and its filling up the log. Everything works fine though.

ERROR (Thread-19) [PyXiaomiGateway] Non matching response. Expecting write_ack, but got read_ack
ERROR (Thread-19) [PyXiaomiGateway] No data in response from hub None

I just got notified about new firmware …I might wanna wait then ?

Just updated to 1.4.1_151.0143 because my thermometers vanished from HA and MIAPP (don’t know if related), and after that no problem - both gateway and devices connected to it are shown and accessible in HA 0.58.0

Hopefully someone can help me!

I just received my xiaomi aqara set and directly connected it to home assistant. Unfortunately I run into problems:
[PyXiaomiGateway] Got error element in data {“error”:“Invalid key”}
Home Assistant is updated to current version 59.2
The firmware on the gateway also was updated to latest version.1.4.1_151.0143
My setup:
I run ubuntu on a NUC with docker and portainer installed. Home Assistant runs in a docker.
the configuration part of home assistant:

xiaomi_aqara:
gateways:
- host: 192.168.1.24
mac: 28:6c:07:f1:xx:xx
key: 2av21502esxxxxxx
(discovery I have turned off.)

When opening home assistant, I nicely see all the connected sensors and devices. Happy so far!
However, when sending a command to the plug, or gateway, it returns the ‘invalid key’ error (which I checked and changed already at least 10 times, including resets)

Then I checked if the port (udp 9898, was open). Still fine
I have a Netgear R7000 Nighthawk, which should support multicast, all seems good

After spending a whole afternoon I ran out of inspiration on how to fix this.

Anybody can help?

Try changing the mac so it does not have : between and change the key to uppercase:

mac: 286c07f1xxxx
key: 2AV21502ESXXXXXX

Tried with no luck

Unfortunately probably this means either your router or HA device is not capable of handling multicast packets.

Any way to verify this? I would be surprised if the router is the issue, maybe less surprised with the NUC

I solved it. Errellion’s answer sent me to the right direction.
By simple adding the following rules to iptables and a restart it works now:

iptables -P OUTPUT ACCEPT
iptables -I INPUT -p udp -j ACCEPT

which surprises me, since I thought I added some rules for port 9898 udp and tcp before. (assumptions…)