I have just updated to 61.1 and both my Xiaomi Vacuum and WiFi plugs are not being recognized and are producing the following errors (which I can not understand )
Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
result = next(coro)
File "/usr/lib/python3.4/asyncio/coroutines.py", line 141, in coro
res = func(*args, **kw)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/switch/xiaomi_miio.py", line 41, in async_setup_platform
from miio import Device, DeviceException
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/miio/__init__.py", line 2, in <module>
from miio.protocol import Message, Utils
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/miio/protocol.py", line 179, in <module>
Const(Int16ub, 0x2131),
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 1277, in __init__
super(Const, self).__init__(subcon)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/construct/core.py", line 287, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
Hi, I am on 0.62.0 too and I have now a different error:
2018-01-29 13:19:44 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/home/hcooh/hass/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 189, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib64/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/lib64/python3.6/asyncio/futures.py", line 243, in result
raise self._exception
File "/usr/lib64/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib64/python3.6/asyncio/coroutines.py", line 212, in coro
res = func(*args, **kw)
File "/home/hcooh/hass/lib/python3.6/site-packages/homeassistant/components/switch/xiaomi_miio.py", line 52, in async_setup_platform
device_info = plug.info()
File "/home/hcooh/hass/lib/python3.6/site-packages/miio/device.py", line 271, in info
return DeviceInfo(self.send("miIO.info", []))
File "/home/hcooh/hass/lib/python3.6/site-packages/miio/device.py", line 216, in send
m = Message.build(msg, ctx)
TypeError: build() takes 2 positional arguments but 3 were given
It seems the build function does not like those parameters anymoreâŚ
replacing ctx by token=self.token in the device.py seems to fix the issue (as fixed in github already)
I am running 0.62 on hassio 1.1 and seem to have the same problem as above, though my errors differs a bit (the first lines are the same but not the end) :
Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 189, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/lib/python3.6/asyncio/futures.py", line 245, in result
raise self._exception
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 210, in coro
res = func(*args, **kw)
File "/usr/lib/python3.6/site-packages/homeassistant/components/vacuum/xiaomi_miio.py", line 90, in async_setup_platform
from miio import Vacuum
File "/usr/lib/python3.6/site-packages/miio/__init__.py", line 2, in <module>
from miio.protocol import Message, Utils
File "/usr/lib/python3.6/site-packages/miio/protocol.py", line 179, in <module>
Const(0x2131, Int16ub),
File "/usr/lib/python3.6/site-packages/construct/core.py", line 1894, in __init__
super(Const, self).__init__(subcon)
File "/usr/lib/python3.6/site-packages/construct/core.py", line 291, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
pip3 is not possible to run as I am on hassio and I do not find a device.py anywhere.