Xiaomi Gateway setup HA 0.112

I am not sure if this will help someone, but it helped in my case. What I had to do was to:

  1. remove section xiaomi_aqara from configuration.yaml
  2. add zeroconf section
  3. I have also updated PyXiaomiGateway to latest version 0.13.0 ( I am not sure if this is mandatory as might that only 2 first steps are needed)

more info: https://github.com/home-assistant/core/issues/37306

It seems like we won’t have to wait much longer.

Could you elaborate on what you mean by ‘updating the PyXiaomiGateway’? How did you do that?

once 13.0 has been release to pypi

pip install PyXiaomiGateway

Hi there. I am experiencing the same issue. I did some tests and the integration works well when HA and the Xiaomi device are in the same VLAN. When on different VLANS, the autodiscovery works but the integration cannot be configured. Note that the integration was working before 112.0 from YAML so I believe fix should be around parameter setting from the Integrations UI.

Unfortunately, the fix for this doesn’t seem to have been added to today’s release:


No worries, I’ve already rolled back and will wait patiently for the fix. :slight_smile:

Well if upgrading PyXiaomiGateway to 13.0 is needed, that hasn’t been uploaded to pypi yet it seems. https://pypi.org/project/PyXiaomiGateway/

EDIT hopefully… https://github.com/Danielhiversen/PyXiaomiGateway/issues/176

I have two gateways, in both I can see:
Version no. 272
fw ver: 1.4.1_176
model: lumi.gateway.v3

Both worked untill 0.111, now one is working without any problem, the other one is discovered but can’t connect.
I’ve double checked, I can’t find any difference beetween them.
If I remove the connected gateway, still can’t connect the other one. It’s like if the problem is on that specific device.
In logs I can see, every 70seconds:
2020-07-16 00:03:11 ERROR (Thread-5) [xiaomi_gateway] Unknown gateway ip 192.168.21.22

Rolling back to 0.111, the device works again.

In the meanwhile I’ve setted up a new HassIO that will replace my old Home Assistant Core on Docker, and the situation is the same.

Have someone found a solution?

Thank you all very much!

I’ve solved connecting the gateway on the same accesspoint of the working gateway. For now, after configuration, connecting back the gateway on the original accesspoint, it’s still working.
No idea the reason, I have a plan network without vlan, hope it could be usefull to someone, if have have similar problem.

1 Like

Can confirm that this workaround works!

Let’s see if I can clarify because I’m afraid I don’t quite understand the solution. Here is a small diagram of my network, any problem here that may affect the connection to the gateway or HASS? Thanks!

There should not be any problem, because I can see just a single broadcast domain in your LAN.
But you could try to connect the Raspberry directly on the wifi router and have a try.

Can the gateway version have something to do with this issue? I have two gateways right now, the oldest one is this:

And the new one is this:

As far as I know, the new one is not compatible with Home Asistant (according to other threads that I have read) but the old one should work.

I have two gateways like the first one of your images. Try to check in Xiaomi Home App, select you gateway, tap […], tap [About], finally tap [Hub Info].
In my gateways I see:
Version no. 272
hw ver: 0220
fw ver: 1.4.1_176
model: lumi.gateway.v3
Let’s check if you have some difference from mine.

In addition, what you see in home assistant logs?

Only difference I found is the hw_ver. It says: MW300
The rest is similar. :thinking:

Today. My HA network interface error was cleared.

First of all. You guys are needs to check the 4321 & 9898 port of your xiaomi gateway.
Please using NMAP with command “nmap -sU -p 9898,4321 your xiaomi gateway IP”

image

If you cannot find “open” signal from that comman.

You should better take an action by last things in (bottom page of the site)
https://www.home-assistant.io/integrations/xiaomi_aqara

The port open work.

After open the port 9898 & 4321. I can connect to HA easily just with network key

  • This solution did not work on brand new bluetooth gateway (which there is no OD ring light)

My gate way look like below
image

My knowledge of this has come to a dead end here. The ports are closed; I may try to solve it with the article you mention but I don’t know if it’s worth it.

Captura

As far as “worth it” is concerned, zigbee2mqtt is definitely worth it :slight_smile:

Gateway is asking for FW update but I don’t want to do it just in case it closes the port again