Xiaomi gateway not discovered

Did you set up your first Gateway with an older app/firmware?

Yes. Both (app & firmware). The new and the old gateway runs the same firmware (149) now.

Don’t invest to much time. It will just work tomorrow. :wink: Stick tight to the documentation and use this configuration if you own a single gateway:

xiaomi:
  gateways:
   - mac:
     key: xxxxxxxxxxxxxxxx

The key is alphanumeric (a-z, 0-9) and not hexadecimal. If you use a wrong key the discovery step should report a discovered gateway nevertheless.

Yeah, now. But it seems to be a problem with the firmware and/or the app to activate the LAN-protocol. Devices with previously activated LAN shouldn’t be affected to this problem. Okay, I’ll wait for the next updates, maybe it will be fixed :slight_smile:
So… danke für deine Bemühungen und gut Nacht :smiley:

It will work tomorrow? I try since saturday😂

Et es wie et es.
Et kütt wie et kütt.
Et hätt noch emmer joot jejange.

Ich wills hoffen… :slight_smile:

Thanks for the info, it gives me a way to debug. I only have one xiaomi gateway with ip address 192. 168.0.112, but when i use nmap to scan port 9898, it’s always closed and unknown no matter how many times i re-generate the key on xiaomi app. any idea for that? thanks very much!

root@kali:~/.homeassistant# nmap -sU -p 9898 192.168.0.112

Starting Nmap 7.25BETA2 ( https://nmap.org ) at 2017-08-28 20:34 EDT
Nmap scan report for 192.168.0.112
Host is up (0.082s latency).
PORT STATE SERVICE
9898/udp closed unknown
MAC Address: 34:CE:00:8B:E0:94 (Unknown)

I’m trying to enable the local network protocol with MiHome 4.2.5 (the about page shows 2.34) on Android.

Ooo does this mean we get a new Xiaomi firmware??? :wink:

Nobody knows. In the past most of the people just was able to discover the gateway suddenly without changing anything.

I’ve tested one of the early MiHome android version (3.5.14, shows 2.19 at the about page). The menu item and confirm button is chinese there. The behavior is the same. No luck.

I don’t understand. I just enable the LAN access on my 2.34 android app without any trouble
Menus are all in english.

What fails ?

It looks like there are some gateways out there where the local network protocol cannot be enabled at the moment. The app reports success but the gateway cannot be discovered by home assistant and the udp ports of the local network protocol are closed. We are digging for a solution or hint.

Okay So I’m a lucky guy ! Discovery works on y third attempt.
I’m using google wifi as router if it helps.

After problems with discovering my gateway in home assistant I searched on google and found this topic.
I have exact the same problem. I configured the gateway in de Mi Home app but the HA can’t discover the gateway.
So I will wait for more info.

Same as killabee.nl, got same issue. i am so glad I found this thread.

Setup:
HA version:0.52.1 running in virtual environment on Raspberry Pi 3
iOS MiHome version: 3.23.2
XiaoMi Gateway Firmware:1.4.1_149.0143
Meraki switch & AP + Netgear cable modem as LAN gateway.

Error:
2017-08-29 12:28:43 ERROR (Thread-12) [homeassistant.components.xiaomi] No gateway discovered
2017-08-29 12:28:43 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component failed to initialize.

Troubleshooting:
no matter enable or disbale LAN protocol, the nmap status always the same:
Host is up (0.0051s latency).
PORT STATE SERVICE
9898/udp open|filtered monkeycom

open|filtered
Nmap places ports in this state when it is unable to determine whether a port is open or filtered. This occurs for scan types in which open ports give no response. The lack of response could also mean that a packet filter dropped the probe or any response it elicited. So Nmap does not know for sure whether the port is open or being filtered. The UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way.

I think syssi is right. Seems LAN protocol is the problem.

May be you are lucky. Open is fine. The bad case is “closed”.

It’s not “open”. it’s “open|filtered” which basically means UNKNOWN :worried:

The gateway would response with “close” (ICMP: Destination unreachble (Port unreachable)) if the port is closed. Are you familiar with tcpdump/wireshark? Could you provide or analyse a dump of your network traffic?