Xiaomi gateway not discovered

The firmware?
It’s also new firnware?
It’s also reset?

Its the latest version of HA (0.52) and of the Xiaomi-Gateway (1.41_149.0143). And installed the factory new xiaomi.stuff yesterday for the first time.

Still no luck? I would like to provide some support.

I do not know for your concern… sorry.
I’ve encounter some errors too and I think one can update the xiaomi gateway guide :

  • In new android app, to enable the advanced menu (to switch on LAN for your gateway) you need to click several time on the version number in the about section (not in the white area as in the community post)

  • To have your access token, it’s not necessary to use adb or something else. The token is in the infos of the advanced options.

Oh no! The first(?) person who stumbled upon the token & key information on the same page. The key is needed for the xiaomig gateway (zigbee). The token is just needed for xiaomi wifi devices without an open api (vacuum.xiaomi, xiaomi_philipslight and xiaomi_plug).

I’m answering to your post from the other thread here since I have the same discovery problem.

So I did test multicast traffic with this app on my phone : https://play.google.com/store/apps/details?id=net.liveforcode.multicasttester&hl=fr

The phone is on the same Wifi than the gateway.

When I listen to 224.0.0.50:4321 while restarting home-assistant, I can see the “whois” message from my NAS. And when I send a message from the app, I can see it whith a tcpdump on the NAS. With a tcpdump, the only multicast data I’ve seen from the gateway are the mDNS ones.

Like @PatteWi, my gateway is brand new and I don’t have any subdevice on it yet. Maybe that’s the reason it’s not sending anything ?

1 Like

I know but now in the info you can get the access token directly in “gateway informations” (a big Json)
“token”:“d…CCb6”

The question now is do not get feedback for xiaomi gateway

Uh. This is strange. I will check it. Please power-cycle your gateway in the mean time and try again. Please don’t update/regenerate the key.

I’ll try that when I’m back from work. I did try to reset it but I haven’t thought about simply unplug and replug it.

About regenerating the key, I’m afraid I did that a few times already.

Just wanted to let everyone know, that i was having trouble with HA detecting the gateway aswell. For me it started since i bought a new router ( Asus RT-AC88U). So i messed arround with the settings but i couldn’t get it to work and i also used the newest custom merlin firmware which did not work either. A few times it worked but after HA restart it was gone again.

Only thing that did work for me was flashing the oldest firmware possible on the router (version 3.0.0.4.380.3941).
So it sucks i can’t use a newer firmware version but at least everything is working now for me.

Nice, that it worked for you. But in my case, a friend of mine has the same router and firmware (AVM Fritz!Box 7590) and it works for him. So the router can’t be the problem (for me)

I`m home from working now :slight_smile:
I´m having HA on a Raspberry Pi 3 on a Fritz!Box (Router). The Gateway is connected via WiFi (what else :smiley:) to the Router; the RPi is connected via LAN to the Router. All Devices have the latest firmware (incl. Raspian Stretch)

I i´ve tried:

  • Discover the Gateway on my RPi
  • Discover tge GW on 2 different Virtual Machines with Docker-Images of hass.io and homeassistant
  • Setting up/reset the key multiple times on iOS and Android
  • Connect the GW with a Guest-Network
  • Tried another Xiaomi-Account
  • Tried to connect the RPi via WLAN to the Router
  • Tried with/without mac, interface (IP) and key in the config

None of this ways discovered the Gateway via Homeassistant

Still no success. I’ve found a french forum where a handful of people where having the same issue after buying a gateway recently. Maybe we have a faulty serie ?

Your setup is very like mine. Please connect the raspberry pi by WiFi just for testing. Which fritzbox generation and firmware do you use? I will try to build the same setup for debugging.

I´ve tried the WiFI-Raspberry (second last point on my list :smiley: ) Its a Fritz!Box 7590 (latest generation) with 6.86 and two days ago 6.88 Labor (beta). Are you from germany?

Yes. The fritzbox country. :wink: Did you power-cycle the xiaomi gateway once?

Multiple times. Maybe we could talk on another medium, like discord? We could post the solution here, if we find it

I assume your setup is fine. Your enumeration is nearly complete and gapless. Give me some time to replicate your setup. I have an unused and untouched gateway lying around. May be I can reproduce something and compoare with my working gateway.

I was able to reproduce the behaviour of new gateways. A proper discovery would look like this:

192.168.130.35:54580 -> 224.0.0.50:4321: {"cmd":"whois"}
192.168.130.35:54580 <- 192.168.130.29:4321: {"cmd":"iam","port":"9898","sid":"286fffffffff","model":"gateway","ip":"192.168.130.29"}

In my case there are two gateways online (192.168.130.29 and 192.168.130.63). The second one should respond to the “whois” message, too but it doesn’t. I just connected the new gateway to my WiFi, updated the firmware to the current version (149), paired a wireless button and enabled the local network protocol by moving the slider and press “confirm”. The action was confirmed with “result: {“ok”}”.