Xiaomi miio - DeviceException during setup of gateway

I’m using Xiaomi miio integration to add my Xiaomi Mi hub to HA which works perfectly. Now I have purchased a second hub located in a completely different building / network from where my HA instance is hosted. When i attempt to add the second gateway to HA i get the following error
2022-01-28 00:08:53 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Gateway2' for xiaomi_miio integration not ready yet: DeviceException during setup of xiaomi gateway with host {self._host}; Retrying in background

Am i not allowed to add a Mi gateway to HA which is not on the same network as HA?

1 Like

I just rebooted my HA instance after a while (last reboot was the last update, last year). Now I can’t seem to have it connect to Xiaomi Mi cloud… (Actually, it authenticates, finds my devices - a gateway and a Roborock) but neither can complete discovery and fall into error.

image image

Logs show this:

2022-02-04 01:33:56 ERROR (SyncWorker_4) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:34:16 ERROR (SyncWorker_1) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:34:16 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Mi Control Hub' for xiaomi_miio integration not ready yet: DeviceException during setup of xiaomi gateway with host {self._host}; Retrying in background
2022-02-04 01:34:41 ERROR (SyncWorker_5) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:35:11 ERROR (SyncWorker_6) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:35:43 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Roborock S5 Max' for xiaomi_miio integration not ready yet; Retrying in background
2022-02-04 01:35:51 ERROR (SyncWorker_8) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:36:51 ERROR (SyncWorker_7) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:38:31 ERROR (SyncWorker_0) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:40:12 ERROR (SyncWorker_5) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:41:52 ERROR (SyncWorker_2) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:43:32 ERROR (SyncWorker_2) [miio.miioprotocol] Got error when receiving: timed out
2022-02-04 01:45:12 ERROR (SyncWorker_7) [miio.miioprotocol] Got error when receiving: timed out

Hello! Just got exactly the same problem today. My aquara m1s gateway (in mi home mode) works fine. Today i just updated HaOS core to 2022.2. And now gateway unavailable. With exactly same errors.
Restarting or reinstalling integration didn’t help… Strange thing - roborock vacuum cleaner still working fine through same integration and Mi account…

Upd. Problem resolved after rebooting gateway by unplugging it from AC…

1 Like

product model?