But it does mean it is easily fixable and will no doubt be included in the next update. I don’t have a pi install so I have no idea what the SSH plugins and such allow but that might be a starting point. Perhaps they allow only basic access?
You get an SSH plugin and as the root user but it’s locked down tight so you can’t do diddly squat which is fine most of the time.
I was hoping it would be fixed in 0.62.1 as it first came up in 0.62 but it wasn’t. There is an issue logged for it as it’s affecting quite a lot of components.
Then, I tried to upgrade yesterday to v0.62.1 and the following were not discovered:
xiaomi vacuum
xiaomi philips desk light
xiaomi power strip
yeelight colored bulbs
But yeelight light strips were discovered automatically and works!
Then I tried to execute the same codes above but with pip3 install construct==2.8.22
The vacuum, table light and power strip are now available and works but yeelight colored bulbs still not discovered. Im not sure how to fix this… but Im ok for now as long I can voice control my vacuum using google home / alexa.
I have Xiaomi Gateway and a couple of door sensors and a xiaomi button that all work great. I just got the Xiaomi Robot Vacuum and got the token and set up the component but then I got this error:
2018-02-04 12:31:06 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/home/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/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 "/home/hass/lib/python3.6/site-packages/homeassistant/components/vacuum/xiaomi_miio.py", line 90, in async_setup_platform
from miio import Vacuum
File "/home/hass/lib/python3.6/site-packages/miio/__init__.py", line 2, in <module>
from miio.protocol import Message, Utils
File "/home/hass/lib/python3.6/site-packages/miio/protocol.py", line 179, in <module>
Const(0x2131, Int16ub),
File "/home/hass/lib/python3.6/site-packages/construct/core.py", line 1927, in __init__
super(Const, self).__init__(subcon)
File "/home/hass/lib/python3.6/site-packages/construct/core.py", line 288, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
I’m guessing it is the same issue since my error includes the construct field. Did anybody figure this out or is there an ETA for when the issue will be solved?
I got all my Xiaomi components working on Hassbian 0.62.1 with the above instructions. I did the following (as mentioned before) but with an extra step to update python:
thanks i tried this, while the components get upgraded without error, HASS switches and fan still doesnt work.
Xiaomi gateway and motion sensors is working fine.
2018-02-06 23:12:55 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform xiaomi_miio
any idea?
Here’s the full log
Error while setting up platform xiaomi_miio
Traceback (most recent call last):
File "/srv/homeassistant/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 "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/fan/xiaomi_miio.py", line 93, in async_setup_platform
from miio import AirPurifier, DeviceException
File "/srv/homeassistant/lib/python3.4/site-packages/miio/__init__.py", line 2, in <module>
from miio.protocol import Message, Utils
File "/srv/homeassistant/lib/python3.4/site-packages/miio/protocol.py", line 190, in <module>
Const(Int16ub, 0x2131),
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 2440, in __init__
super(Const, self).__init__(subcon)
File "/srv/homeassistant/lib/python3.4/site-packages/construct/core.py", line 549, in __init__
raise TypeError("subcon should be a Construct field")
TypeError: subcon should be a Construct field
what i seems to have done wrong, i ran home assistant upgrade but it didnt seem to upgrade to 0.62
reran the upgrade and reran your method which downgrade construct to 2.8.22 and it is now working again. thanks for your help