Xiaomi V2 Gateway discovery issues

Hi,

I have received my V2 Xiaomi (mijia) gateway today and have come to set it up in my HAAS HA but i keep getting an error every time i reset it and it says xiaomi-aqara could not be set up check my config.

But in my config i just have

#Hub V2
xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - key: jnznx9f4zwp182kj

I have as you can see got the key from the developer screen on an andriod device and toggled the Wireless communication protocol on but still nothing is happening.

I have also toggled the wireless communication off & on and and changed the password to no avail and have also removed the gateway from the mi home app, reset the gateway and added it again with no luck.

Have i missed anything?

Thanks
Richard

try adding the host: IP.IP.IP.IP in case your home router borks the multicast detection - this seems to be an issue for some people. (this also assumes you have a static IP allocated to the gateway - which you should)

Hi John,

Thanks for this i have added this is (i think it’s) 192.168.1.199 as i got this from the android app and the whole extract is below

Version no:257
网关ID:131876479
Zigbee通道:25
网关信息:
{"life":2944,"cfg_time":0,"token":"e30af64e5a34dcb865b605b862e31dbb","mac":"04:CF:8C:8F:B5:AD","fw_ver":"1.4.1_170","hw_ver":"MW300","model":"lumi.gateway.v3","mcu_fw_ver":"0158","wifi_fw_ver":"SD878x-14.76.36.p84-702.1.0-WM","ap":{"rssi":-45,"ssid":"AthaWifi","bssid":"24:F5:A2:A3:D1:DD"},"netif":{"localIp":"192.168.1.199","mask":"255.255.255.0","gw":"192.168.1.1","gw_mac":"24:F5:A2:A3:D1:DC"},"mmfree":181400,"ot":"otu","otu_stat":[201,175,85,3,82,12],"ott_stat":[0,0,0,0]}

子设备信息:
[{"model":"lumi.sensor_motion.aq2","did":"lumi.158d000304223d","name":"Aqara Motion Sensor"}]

but still nothing. I now have my config as

#Hub V2
xiaomi_aqara:
  interface: '192.168.1.199'
  discovery_retry: 45
  gateways:
    - key: jnznx9f4zwp182kj

Still not able to get it working though so really puzzled.

assuming you have the software/cli try

nmap -sU -p 9898 192.168.1.199

and

nmap -sU -p 4321 192.168.1.199

Both ports need to be open for the LAN access to the hub to work - see https://community.home-assistant.io/t/cannot-connect-xiaomi-gateway-lumi-gateway-v3-to-ha for more.