Xiaomi Roborock S50 issues setting up

Hey guys,

I’m struggling setting this thing up. I’ve set it up within the Mi Home app within the Singapore region (closest to me). I’ve extracted the token from within the SQLite DB but I’m getting the following error on HA startup:

2019-03-13 13:16:08 ERROR (MainThread) [homeassistant.components.vacuum] xiaomi_miio: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 348, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/xiaomi_miio/vacuum.py", line 397, in update
    self.last_clean = self._vacuum.last_clean_details()
  File "/usr/local/lib/python3.7/site-packages/miio/vacuum.py", line 194, in last_clean_details
    last_clean_id = self.clean_history().ids.pop(0)
IndexError: pop from empty list

Any help would be amazing.

Have you manually run the vacuum yet?

I had this same error on a brand new vacuum that hadn’t done a cleaning cycle. Once I ran it for 5 mins, and return ed to dock, everything worked.

Vacuum is currently doing a clean. I’ll see if anything changes once it’s done. If that works, I’ll go ahead and update the docs with the info :slight_smile:

Yep that worked. Once he’d finished the clean and I restarted HA, the vacuum was added to HA.

:+1: Good to hear

just set mine up today also i love it except my couches are slightly to low and my darn carpet have black lines that it thinks are the border :frowning:

Mark this as solved when you can.

A few pieces of tape can solve your dark carpet problem, it is working for me.

1 Like

Sorry to bring up an old thread but I have just tried to set up my Roborock S5 but I’m having issues.

config:

vacuum:
  - platform: xiaomi_miio
    host: 192.168.0.152
    token: 32xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  # not my real token...
    name: George

error:

Log Details (ERROR)

Logger: homeassistant.components.vacuum
Source: components/xiaomi_miio/vacuum.py:294
Integration: Vacuum (documentation, issues)
First occurred: 14:46:26 (1 occurrences)
Last logged: 14:46:26

Error while setting up xiaomi_miio platform for vacuum

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 186, in _async_setup_platform await asyncio.gather(*pending) File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 295, in async_add_entities await asyncio.gather(*tasks) File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 446, in _async_add_entity entity.async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 297, in async_write_ha_state self._async_write_ha_state() # type: ignore File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 314, in _async_write_ha_state attr = self.capability_attributes File “/usr/src/homeassistant/homeassistant/components/vacuum/init.py”, line 344, in capability_attributes return {ATTR_FAN_SPEED_LIST: self.fan_speed_list} File “/usr/src/homeassistant/homeassistant/components/xiaomi_miio/vacuum.py”, line 294, in fan_speed_list return list(self._fan_speeds) TypeError: ‘NoneType’ object is not iterable

running HA 0.110.5, any ideas? I tried the solution above regarding letting it do a clean and return to dock then restarted HA… no luck