Can't configure Xiaomi gateway

The config you used is wrong. You have no indentation.

image

1 Like

Please see the instructions at the top of each forum page for how to post your code.

2 Likes

hi @orcool, try tu put MAC, KEY and HOST in this order, it solved me

Best

1 Like

Prove the port is closed. Try the following on the Hass.io ssh console

ping x.x.x.x (ip of gateway) to prove the Hub is on network

nmap -Su -v -p 9898 x.x.x.x if this port is closed that’s the problem !

Confirm the the Key and the wireless communication protocol are on. If they are unfortunately you need the fix

1 Like

Is this an Aqara Hub with Apple home-kit support ? If so I don’t think this hub is supported in HA . The above fix only work for v2 hubs see

I have this one:
https://www.gearbest.com/living-appliances/pp_344667.html?lkid=12972004

thank you all,
I will try your suggestions and I will update tomorrow

That model is fine. Same as mine, should work fine with HA

We haven’t seen the result of the nmap test yet. Please provide.

nmap not installed on this ssh console

Well then run it on another machine.

1 Like

C:\Users\>nmap -PN -sV -p 9898 192.168.1.65
Starting Nmap 7.70 ( https://nmap.org ) at 2019-02-03 22:11 ???? ???? ???????
Nmap scan report for 192.168.1.65
Host is up (0.018s latency).

PORT     STATE  SERVICE   VERSION
9898/tcp closed monkeycom
MAC Address: 7C:49:EB:88:CB:1B (Unknown)

Service detection performed. Please report any incorrect results at https://nmap
.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 24.94 seconds
Starting Nmap 7.70 ( https://nmap.org ) at 2019-02-03 22:21 ?
Nmap scan report for 192.168.1.65
Host is up (0.0081s latency).

PORT     STATE  SERVICE
9898/udp closed monkeycom
MAC Address: 7C:49:EB:88:CB:1B (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 22.05 seconds

how can I open this port on my router ?
Thank you again :slight_smile:

The nmap is showing the TCP not the UDP port . Sorry my predictive text reversed the syntax

nmap -sU -v -p 9898 x.x.x.x

For HA to connect to the gateway you need this port open

9898/udp open monkeycom

If this port is closed and and the wireless communication protocol is on in the MI app. You will need to connect a serial port to the gateway and open it.

Im running https://github.com/hassio-addons/addon-ssh in Hass.io which include nmap

edit sorry its late I can see UDP port is closed from your output. Confirm the above . This was my problem and connecting serail cable to the gateway fixed it for me.

It could be router issue but I don’t think so. I did find this

https://en.miui.com/thread-4874941-1-1.html

1 Like

Hey :slight_smile:
the second log related to the udp test and it’s also close .
just to make sure i made this test through my laptop instead Hassio because it haven’t nmap

sorry see above. Your test is fine. Just confirm the ip address is your Gateway

yes it is :frowning:

With UDP port 9898 and 4321 closed . HA will never connect :frowning:

So currently soldering is the only option?

Look like a bug or feature in the the firmware is not opening the ports. The Serial connection will allow to issue the command to open the ports . The MI App should do this for you with the wireless communication protocol turned on . It maybe a bug and Xiaoami may issue a firmware fix ? It could be a firewall ? Serial connection is the next logical step

1 Like