Looks like the HA 0.62 version has the same bug 0.61.1 used to have
Is there any workaround? I am using hass.io, how can I switch to developpment
Issue is logged here
2018-01-28 21:50:38 ERROR (MainThread) [homeassistant.components.vacuum] 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
from miio.protocol import Message, Utils
File “/usr/lib/python3.6/site-packages/miio/protocol.py”, line 179, in
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
I was having problems this weekend too. I had upgraded the miio component manually when I was having problems with 0.61. I got them working again in 0.62 by deleting the component files from the home-assistant lib directory. I’m also running docker.
Using Hassio. Updated to 0.62.1 this morning. Still not working. Error as follows for both switches:
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/switch/xiaomi_miio.py", line 41, in async_setup_platform
from miio import Device, DeviceException
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
Just chipping in to say also on Hassio, all things requiring a token have disappeared on me a. Should have checked the forum before troubleshooting.
I think this might need to be done on the hassio container end for those on a pi.
I’m running on ubuntu and have installed hassio manually so have access to the container.
Following instructions provided by @syssi I have got my things back on 62.1 with
# list the containers
docker ps -a
# start a shell
docker exec -it "id of the homeassistant container" bash
pip3 install https://github.com/rytilahti/python-miio/archive/master.zip
pip3 install construct==2.8.22
I’m not sure of your environment but I have manually installed docker on my machine to run other services besides hassio and not used the NUC image. I’ll try to find the install procedure I followed and link it in later.
docker ps -a
just lists all the containers. I can see you have the same error using
docker ps -notrunc
Does the user you are logged in with have docker privileges?