Xiaomi Aqara gateway stopped working after HA update

Hi,

After I updated my home assistant to 0.75 the Xiaomi Aqara gateway stopped working and non of my sensors showed up (see error details below). My previous HA verison was 0.70 where everything work ok, so unfortunately I cannot say for sure when this bug occured, but somewhere between 0.70 and 0.75.

Xiaomi Aqara FW: 1.4.1_156.0143
Raspberry PI: Hassbian

Anyone experiencing the same issue? Or have any tips?

Thanks

Error details:

Error during setup of component xiaomi_aqara
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/xiaomi_aqara.py", line 125, in setup
    from xiaomi_gateway import XiaomiGatewayDiscovery
ImportError: cannot import name 'XiaomiGatewayDiscovery'

I had one gateway that didn’t show up initially but a reboot solved the issue.

@sjee thanks for the answer, but I have tried to reboot the Aqara as well as HA several times, but with the same result. Do you have the same FW version on your Aqara gateway as me?

Yes mine are using the same FW. Which python version are you running?

@sjee

pi@hassbian:~ $ python --version
Python 2.7.13
pi@hassbian:~ $ python3 --version
Python 3.5.3

@sjee Thanks for the tip! I updated Python to 3.6.5 according to this guide:
https://community.home-assistant.io/t/python-3-6-upgrade-of-a-virtualenv/21722

Noe it works! Thanks

1 Like