Cannot connect to gateway - Mijia Control Hub

Hello all,

I’ve gotten myself two(2) Mijia Control Hub (gateway). I have been trying to get it connected with HA but no luck.

My Hass.io is running on Oracle Virtual Machine on Windows 10, and I could ping both gateway and the hassio. I’ve checked the 9898 port with nmap and it appeared to be “open | filtered” on both gateway. Soldered wire on TX RX GND pin and written psm-set network.open_pf 3. Following is the error log from HA:

2019-09-11 17:09:26 DEBUG (SyncWorker_0) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2019-09-11 17:09:26 INFO (SyncWorker_0) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2019-09-11 17:09:26 INFO (SyncWorker_0) [xiaomi_gateway] Xiaomi Gateway 7811dcxxxxxx configured at IP 10.0.xxx.xx:9898
2019-09-11 17:09:26 DEBUG (SyncWorker_0) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"7811dcxxxxxx"}'
2019-09-11 17:09:35 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2019-09-11 17:09:36 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to Gateway
2019-09-11 17:09:36 ERROR (SyncWorker_0) [xiaomi_gateway] No data in response from hub None
2019-09-11 17:09:36 INFO (SyncWorker_0) [xiaomi_gateway] Discovering Xiaomi Devices
2019-09-11 17:09:36 DEBUG (SyncWorker_0) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-09-11 17:09:46 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to Gateway
2019-09-11 17:09:46 INFO (SyncWorker_0) [xiaomi_gateway] Discovering Xiaomi Devices
2019-09-11 17:09:46 DEBUG (SyncWorker_0) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-09-11 17:09:56 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to Gateway
2019-09-11 17:09:56 INFO (SyncWorker_0) [xiaomi_gateway] Discovering Xiaomi Devices
2019-09-11 17:09:56 DEBUG (SyncWorker_0) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-09-11 17:10:06 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to Gateway
2019-09-11 17:10:06 INFO (SyncWorker_0) [xiaomi_gateway] Discovering Xiaomi Devices
2019-09-11 17:10:06 DEBUG (SyncWorker_0) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-09-11 17:10:16 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to Gateway
2019-09-11 17:10:16 INFO (SyncWorker_0) [xiaomi_gateway] Discovering Xiaomi Devices
2019-09-11 17:10:16 DEBUG (SyncWorker_0) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-09-11 17:10:26 ERROR (SyncWorker_0) [xiaomi_gateway] Cannot connect to Gateway
2019-09-11 17:10:31 INFO (SyncWorker_0) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-09-11 17:10:31 INFO (SyncWorker_0) [xiaomi_gateway] Creating Multicast Socket
2019-09-11 17:10:31 DEBUG (SyncWorker_0) [homeassistant.components.xiaomi_aqara] Gateways discovered. Listening for broadcasts
2019-09-11 17:10:31 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.xiaomi_aqara

The log above is when I use the following:

xiaomi_aqara:
  discovery_retry: 10
  gateways:
   - host: xx.xx.xx.xxx
     mac: xxxxxxxxxxxx
     key: xxxxxxxxxxxxxxxx

Also, I’ve tested host, mac and key all sort of combination but still no luck.

Appreciate your help. Thanks in advance! :smiley: