core: Xiaomi Gateway missing alarm panel and light

The problem

Hi. After upgrading core from 2021.11.5 to 2021.12b0 Xiaomi gateway alarm panel and light becomes inactive. I tried to reinstall integration, it finishes properly, but alarm and light are still inactive. Steering from Xiaomi app works.

What version of Home Assistant Core has the issue?

2021.12.0b3

What was the last working version of Home Assistant Core?

2021.11.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Xiaomi Miio

Link to integration documentation on our website

https://www.home-assistant.io/integrations/xiaomi_miio/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.light
Source: components/xiaomi_miio/light.py:1008
Integration: Światło (documentation, issues)
First occurred: 09:01:11 (3 occurrences)
Last logged: 13:02:19

xiaomi_miio: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update
    await task
  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/light.py", line 1008, in async_update
    state_dict = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/miio/click_common.py", line 186, in _wrap
    self._fetch_info()
  File "/usr/local/lib/python3.9/site-packages/miio/device.py", line 149, in _fetch_info
    devinfo = DeviceInfo(self.send("miIO.info"))
  File "/usr/local/lib/python3.9/site-packages/miio/device.py", line 103, in send
    return self._protocol.send(
  File "/usr/local/lib/python3.9/site-packages/miio/miioprotocol.py", line 161, in send
    self.send_handshake()
  File "/usr/local/lib/python3.9/site-packages/miio/miioprotocol.py", line 74, in send_handshake
    raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device None

Additional information

device: lumi.gateway.v3-MW300 firmware: 1.4.1_176

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 9
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Another user affected

I think the problem is in the click command in the upstream python-miio library. This PR schould fix the problem https://github.com/rytilahti/python-miio/pull/1229/files

Can you elaborate at all for the non technical? or with this be fixed in a new update?

I am working on a fix together with @rytilahti, as soon as that is done and another unrelated issue is also fixed a new python-miio version will be released. Than a HomeAssistant Pull Request can be made to start using the new python-miio version. Can take a few days but schould be possible this week. Hopefully we will be in time for a 2021.12.X bugfix release, I think so, but of course we can’t garantee anything.

I think the problem is in the click command in the upstream python-miio library. This PR schould fix the problem https://github.com/rytilahti/python-miio/pull/1229/files

Same here. Any suggestions?