We are on Home Assistant 0.108.9 Home Assistant 0.109.3 (just upgraded). Today we are trying to connect a Xiao Mi Robot Vacuum into the system. After backup the iOS system, retrieved the database file and decrypted the token. Adding the following YAML into the configuration file seems could not get the robot connected.
vacuum:
- platform: xiaomi_miio
name: "Xiao-Mi-Robot"
host: 192.168.20.10
token: A_VALID_TOKEN_WAS_USED
A static IP had been assigned to the robot and pinging it is ok (see screenshot below)
![CleanShot 2020-05-03 at 21.09.09]()
These is the error log showing on our system.
2020-05-03 21:43:55 DEBUG (SyncWorker_4) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:43:54, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:43:55 DEBUG (SyncWorker_4) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6685, 'method': 'get_status', 'params': []}
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] Retrying with incremented id, retries left: 1
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\x9f' (total 16)
value = Container:
length = 32
unknown = 0
device_id = b'\x12j \xdd' (total 4)
ts = 2020-05-03 13:43:59
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:43:59, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:00 DEBUG (SyncWorker_4) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6786, 'method': 'get_status', 'params': []}
2020-05-03 21:44:05 ERROR (SyncWorker_4) [miio.miioprotocol] Got error when receiving: timed out
2020-05-03 21:44:05 WARNING (SyncWorker_4) [homeassistant.components.xiaomi_miio.vacuum] Got exception while fetching the state: No response from the device
2020-05-03 21:44:06 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6787, 'method': 'get_status', 'params': []}
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 3
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\xaa' (total 16)
value = Container:
length = 32
unknown = 0
device_id = b'\x12j \xdd' (total 4)
ts = 2020-05-03 13:44:10
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:44:10, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:11 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6888, 'method': 'get_status', 'params': []}
2020-05-03 21:44:16 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.xiao_mi_robot is taking over 10 seconds
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 2
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\xaf' (total 16)
value = Container:
length = 32
unknown = 0
device_id = b'\x12j \xdd' (total 4)
ts = 2020-05-03 13:44:15
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:44:15, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:16 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 6989, 'method': 'get_status', 'params': []}
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 1
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.protocol] Unable to decrypt, returning raw bytes: b''
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x12j \xdd^\xae\xca\xb4' (total 16)
value = Container:
length = 32
unknown = 0
device_id = b'\x12j \xdd' (total 4)
ts = 2020-05-03 13:44:20
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 126a20dd with ts: 2020-05-03 13:44:20, token: b'ffffffffffffffffffffffffffffffff'
2020-05-03 21:44:21 DEBUG (SyncWorker_3) [miio.miioprotocol] 192.168.20.10:54321 >>: {'id': 7090, 'method': 'get_status', 'params': []}
I am reading https://github.com/home-assistant/core/issues/11048 which looks like the exact issue I am having but seems it had been resolved long time ago. I am presuming that upgrading Home Assistant would also have all its dependencies updated to the latest version which means the issue mentioned in the issue above should had been fixed in the version I am running in 2020.
Has anyone had encountered this issue recently? Any hint would be greatly appreciated.