Yes, another topic about the Xiaomi gateway… im sorry guys but i had to, the other topics i found didn’t had an answer for me and were long (and yes ive read all the replies over the last days…)
Im currently automating my parents home and thats all going fine. First time running hass.io on a raspberry pi 3 (at my own place i’m running home-assistant installed on a ubuntu vm), the only thing which i cannot get to work is the Xiaomi gateway that i want to use.
I’ve setup the gateway with an Android phone (i read that iOS can give trouble) and that worked all fine connected some switches and door sensors and everything works nicely inside the “Mii home app”. (note; my country is on Mainland China)
In the app i went to setup LAN access and copied the key and started to configure it in my configuration.yaml file.
Currently i have the following block of configuration:
I use the git addon on hass.io to pull my changes and after that i restart hass. The next thing i constantly see is that its failing to initialize the gateway. Im not getting the error that the key is incorrect.
I tried several combinations already, only key, only mac and key, host and key, and like above with mac empty.
By reading the docs and some other topics regarding the gateway i read that multicast can be an issue? My parents have a router from their ISP and a TP-Link something wifi router which they use as a wifi access point, the DHCP is taking care of by the ISP router. On both routers IGMP Proxy is enabled. I didn’t find any other multicast option.
Would this be an network issue, maybe hassio?
It would be great if anyone can point me in some direction or had this issue before that can help me out. I can provide more debug info if needed.
That sounds indeed very similar! I will bring my own gateway to their place (will go through the pain of resetting it here at home again) to try if that one works. Will try it tomorrow.
I tried my own gateway at their place and im still having the same issue…
Home assistant is telling me the following errors:
Setup of xiaomi_aqara is taking over 10 seconds.
No gateway discovered
Setup failed for xiaomi_aqara: Component failed to initialize.
Like @hoedha suggested i tried to nmap both and this are the outputs:
Response from parents gateway:
$ sudo nmap -sU 192.168.178.18 -p 9898,4321
Starting Nmap 7.70 ( https://nmap.org ) at 2018-09-26 10:33 CEST
Nmap scan report for 192.168.178.18
Host is up (0.051s latency).
PORT STATE SERVICE
4321/udp open|filtered rwhois
9898/udp open monkeycom
MAC Address: 34:CE:00:90:92:EE (Xiaomi Electronics,co.)
Nmap done: 1 IP address (1 host up) scanned in 1.75 seconds
Response from working (at my own place) gateway:
$ nmap -sU 192.168.178.32 -p 9898,4321
Starting Nmap 7.70 ( https://nmap.org ) at 2018-09-26 11:39 CEST
Nmap scan report for 192.168.178.32
Host is up (0.066s latency).
PORT STATE SERVICE
4321/udp open|filtered rwhois
9898/udp open monkeycom
MAC Address: 34:CE:00:85:3D:AA (Xiaomi Electronics,co.)
Nmap done: 1 IP address (1 host up) scanned in 1.90 seconds
I have the feeling that its a network issue, i just tried adding their LG TV home assistant is also not able to discover the tv. So or its the network or its hassio on the pi that for some reason cannot access other devices? Its connected with the Philips Hue though that works fine…
Hmm since my dad recently bought that device im not sure i can… I can try creating another wifi hotspot on the ISP router and connect the gateway to that one to see if that works.
Your Nmap results are normal for both gateway, I would suggest to check your parent gateway in your home network. If needed perform tcpdump or ngrep to see whether multicast traffic can be transmitted or received successfully.
I’m going there again today. I will do some ngrep to see the multicast traffic and like @sjee suggested i will try to disconnect the TP-Link from the network and see if that helps. Will report back later today with some results.