core
core copied to clipboard
Roborock S4 stopped working after upgrading to 2022.8.1
The problem
My Roborock S4 stopped working after upgrading to 2022.8.1. This integration worked for several years. The log shows a time-out. I can still control the vacuum with the mirobo
tool:
What version of Home Assistant Core has the issue?
core-2022.8.1
What was the last working version of Home Assistant Core?
core-2022.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Xiaomi Miio
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_miio/#xiaomi-mi-robot-vacuum
Diagnostics information
"coordinator_data": "VacuumCoordinatorData(status=<VacuumStatus battery=94 clean_area=7.23 clean_time=0:05:54 error=No error error_code=0 fanspeed=103 got_error=False in_segment_cleaning=True in_zone_cleaning=False is_on=True is_paused=False is_water_box_attached=None is_water_box_carriage_attached=None is_water_shortage=None map=True state=Segment cleaning state_code=18>, dnd_status=<DNDStatus enabled=True end=08:00:00 start=22:00:00>, last_clean_details=<CleaningDetails area=0.28 complete=False duration=0:00:16 end=2022-08-07 13:49:47 error=No error error_code=0 start=2022-08-07 13:46:27>, consumable_status=<ConsumableStatus filter=6 days, 5:31:35 filter_left=0:28:25 main_brush=12 days, 13:20:07 main_brush_left=-1 day, 22:39:53 sensor_dirty=4 days, 17:03:27 sensor_dirty_left=-4 days, 12:56:33 side_brush=12 days, 13:20:07 side_brush_left=-5 days, 18:39:53>, clean_history_status=<CleaningSummary count=1006 dust_collection_count=None ids=[1659872787, 1659872519, 1659731122, 1659646905, 1659599758, 1659559533, 1659510859, 1659475844, 1659392092, 1659300162, 1659211123, 1659076950, 1659037499, 1658951995, 1658813241, 1658780606, 1658693883, 1658599350, 1658525677, 1658435476] total_area=21299.49 total_duration=12 days, 12:44:20>, timers=[], fan_speeds={'Silent': 38, 'Standard': 60, 'Medium': 77, 'Turbo': 90}, fan_speeds_reverse={38: 'Silent', 60: 'Standard', 77: 'Medium', 90: 'Turbo'})"
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2022-08-06 11:45:32.002 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching roborock.vacuum data
Additional information
Could be similar to #75835, although I have the S4 and I've added the integration before.
Hey there @rytilahti, @syssi, @starkillerog, @bieniu, mind taking a look at this issue as it has been labeled with an integration (xiaomi_miio
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
xiaomi_miio documentation xiaomi_miio source (message by IssueLinks)
Looking at the diagnostics data you gave, it looks like that the device was (at least) initialized correctly as some data was obtained from the device.
Could you clarify what exactly is not working? Are you not getting any state updates after the initial update? Are the commands working?
Thanks for your swift reply! Yes correct, the device has worked fine over the last few years with this integration. Nothing is working at the moment. No state updates, no service calls to the device etc.
My roborock S7 vacuum stopped working with 2022.8 as well.
my S6 stopped working as well. The status of everything became "Unavailable"
Is there anything else useful in the logs? If you enable debug logging for homeassistant.components.xiaomi_miio
(and maybe for miio
to get even more details), is the device responding to the requests?
it turned out that in my case, due to multiple changes in the same day(Upgrade + Roborock IP Change) the issue was that the integration was still looking for old Roborock IP.
I have deleted the integration, then re-added it and it detected my Roborock immediately. Also, the automations and scripts are still linked to my Roborock... so it's "config-safe" to delete and re-add the Xiaomi Miio integration.
Since delete + re-add Integration is config-proof, I suggest that the others who have problems after upgrade to give a try, it could work.
Is there anything else useful in the logs? If you enable debug logging for
homeassistant.components.xiaomi_miio
(and maybe formiio
to get even more details), is the device responding to the requests?
Not in the 'warn' logs for sure. (Only log that I've seen is in the opening post)
Enabled debug logging for:
homeassistant.components.xiaomi_miio: debug
miio: debug
Got the following (very detailed! 🚀) logs back:
2022-08-09 14:08:55.012 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Initializing with host <VacuumInternalIp> (token 56456...)
2022-08-09 14:08:55.013 DEBUG (SyncWorker_1) [miio.click_common] Unknown model, trying autodetection. None None
2022-08-09 14:08:55.021 DEBUG (SyncWorker_1) [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\x0f\x99/\xfd\x00\x00\x97\xee' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('0f992ffd')
ts = 1970-01-01 10:48:14
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)
2022-08-09 14:08:55.025 DEBUG (SyncWorker_1) [miio.miioprotocol] Discovered 0f992ffd with ts: 1970-01-01 10:48:14, token: b'ffffffffffffffffffffffffffffffff'
2022-08-09 14:08:55.026 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
2022-08-09 14:09:00.031 DEBUG (SyncWorker_1) [miio.miioprotocol] Retrying with incremented id, retries left: 3
2022-08-09 14:09:00.036 DEBUG (SyncWorker_1) [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\x0f\x99/\xfd\x00\x00\x97\xf3' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('0f992ffd')
ts = 1970-01-01 10:48:19
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)
2022-08-09 14:09:00.036 DEBUG (SyncWorker_1) [miio.miioprotocol] Discovered 0f992ffd with ts: 1970-01-01 10:48:19, token: b'ffffffffffffffffffffffffffffffff'
2022-08-09 14:09:00.037 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 102, 'method': 'miIO.info', 'params': []}
2022-08-09 14:09:05.015 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching roborock.vacuum data in 10.002 seconds (success: False)
2022-08-09 14:09:05.015 WARNING (MainThread) [homeassistant.config_entries] Config entry 'roborock.vacuum' for xiaomi_miio integration not ready yet; Retrying in background
2022-08-09 14:09:05.042 DEBUG (SyncWorker_1) [miio.miioprotocol] Retrying with incremented id, retries left: 2
2022-08-09 14:09:05.046 DEBUG (SyncWorker_1) [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\x0f\x99/\xfd\x00\x00\x97\xf8' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('0f992ffd')
ts = 1970-01-01 10:48:24
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)
2022-08-09 14:09:05.047 DEBUG (SyncWorker_1) [miio.miioprotocol] Discovered 0f992ffd with ts: 1970-01-01 10:48:24, token: b'ffffffffffffffffffffffffffffffff'
2022-08-09 14:09:05.047 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 203, 'method': 'miIO.info', 'params': []}
2022-08-09 14:09:05.051 DEBUG (SyncWorker_1) [miio.protocol] Unable to parse json '': Expecting value: line 1 column 1 (char 0)
2022-08-09 14:09:05.052 DEBUG (SyncWorker_1) [miio.integrations.vacuum.roborock.vacuum] Unable to query info, falling back to dummy rockrobo.vacuum.v1
2022-08-09 14:09:05.052 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 204, 'method': 'get_timer', 'params': ['']}
2022-08-09 14:09:05.063 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 204) << {'result': [], 'id': 204}
2022-08-09 14:09:05.064 DEBUG (SyncWorker_1) [miio.integrations.vacuum.roborock.vacuum] Got robov1, checking for firmware version
2022-08-09 14:09:05.064 DEBUG (SyncWorker_1) [miio.integrations.vacuum.roborock.vacuum] Using fanspeeds <enum 'FanspeedV1'> for rockrobo.vacuum.v1
2022-08-09 14:09:05.064 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 205, 'method': 'get_status', 'params': []}
2022-08-09 14:09:05.074 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 205) << {'result': [{'msg_ver': 2, 'msg_seq': 2181, 'state': 8, 'battery': 100, 'clean_time': 1207, 'clean_area': 26192500, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'in_returning': 0, 'in_fresh_state': 1, 'lab_status': 1, 'fan_power': 103, 'dnd_enabled': 0, 'map_status': 3, 'is_locating': 0, 'lock_status': 0}], 'id': 205}
2022-08-09 14:09:05.075 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 206, 'method': 'get_dnd_timer', 'params': []}
2022-08-09 14:09:05.082 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 206) << {'result': [{'start_hour': 22, 'start_minute': 0, 'end_hour': 8, 'end_minute': 0, 'enabled': 1}], 'id': 206}
2022-08-09 14:09:05.083 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 207, 'method': 'get_clean_summary', 'params': []}
2022-08-09 14:09:05.093 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 207) << {'result': [1084797, 21341645000, 1008, [1659981472, 1659872987, 1659872787, 1659872519, 1659731122, 1659646905, 1659599758, 1659559533, 1659510859, 1659475844, 1659392092, 1659300162, 1659211123, 1659076950, 1659037499, 1658951995, 1658813241, 1658780606, 1658693883, 1658599350]], 'id': 207}
2022-08-09 14:09:05.094 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 208, 'method': 'get_clean_record', 'params': [1659981472]}
2022-08-09 14:09:05.101 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 208) << {'result': [[1659981472, 1659982679, 1207, 26192500, 0, 1, 2, 3, 56]], 'id': 208}
2022-08-09 14:09:05.102 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 209, 'method': 'get_consumable', 'params': []}
2022-08-09 14:09:05.115 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 209) << {'result': [{'main_brush_work_time': 1086944, 'side_brush_work_time': 1086944, 'filter_work_time': 540432, 'filter_element_work_time': 0, 'sensor_dirty_time': 409144}], 'id': 209}
2022-08-09 14:09:05.116 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 210, 'method': 'get_clean_summary', 'params': []}
2022-08-09 14:09:05.126 DEBUG (SyncWorker_1) [miio.miioprotocol] <VacuumInternalIp>:54321 (ts: 1970-01-01 10:48:24, id: 210) << {'result': [1084797, 21341645000, 1008, [1659981472, 1659872987, 1659872787, 1659872519, 1659731122, 1659646905, 1659599758, 1659559533, 1659510859, 1659475844, 1659392092, 1659300162, 1659211123, 1659076950, 1659037499, 1658951995, 1658813241, 1658780606, 1658693883, 1658599350]], 'id': 210}
2022-08-09 14:10:03.039 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Initializing with host <VacuumInternalIp> (token 56456...)
2022-08-09 14:10:03.053 DEBUG (SyncWorker_3) [miio.click_common] Unknown model, trying autodetection. None None
2022-08-09 14:10:08.059 DEBUG (SyncWorker_3) [miio.miioprotocol] Unable to discover a device at address <VacuumInternalIp>
2022-08-09 14:10:08.059 DEBUG (SyncWorker_3) [homeassistant.components.xiaomi_miio] Unable to fetch timers, this may happen on some devices: Unable to discover the device <VacuumInternalIp>
2022-08-09 14:10:08.061 DEBUG (SyncWorker_3) [miio.click_common] Unknown model, trying autodetection. None None
2022-08-09 14:10:08.071 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\x0f\x99/\xfd\x00\x00\x987' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('0f992ffd')
ts = 1970-01-01 10:49:27
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)
2022-08-09 14:10:08.072 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 0f992ffd with ts: 1970-01-01 10:49:27, token: b'ffffffffffffffffffffffffffffffff'
2022-08-09 14:10:08.073 DEBUG (SyncWorker_3) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
2022-08-09 14:10:13.040 DEBUG (MainThread) [homeassistant.components.xiaomi_miio] Finished fetching roborock.vacuum data in 10.001 seconds (success: False)
2022-08-09 14:10:13.079 DEBUG (SyncWorker_3) [miio.miioprotocol] Retrying with incremented id, retries left: 3
2022-08-09 14:10:13.086 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\x0f\x99/\xfd\x00\x00\x98<' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('0f992ffd')
ts = 1970-01-01 10:49:32
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)
2022-08-09 14:10:13.087 DEBUG (SyncWorker_3) [miio.miioprotocol] Discovered 0f992ffd with ts: 1970-01-01 10:49:32, token: b'ffffffffffffffffffffffffffffffff'
2022-08-09 14:10:13.088 DEBUG (SyncWorker_3) [miio.miioprotocol] <VacuumInternalIp>:54321 >>: {'id': 102, 'method': 'miIO.info', 'params': []}
I just re-added the vacuum manually like @mccasian suggested. Thanks! The vacuum entity is now visible along with the other sensors. Although the vacuum got initialized without a unique ID and now it's called an unnamed device:
I think your vacuum is blocked from the internet (or is otherwise not responding to the info query properly), so there's no unique id to be had. There is a hack that uses IP address for that, but it doesn't work unless the device is initialized using the RoborockVacuum
class (https://github.com/rytilahti/python-miio/blob/master/miio/integrations/vacuum/roborock/vacuum.py#L253) which is not apparently the case.
As I'm currently working on restructuring the library (https://github.com/rytilahti/python-miio/issues/1495), I haven't had time to look into fixing that. Anyway, when https://github.com/rytilahti/python-miio/pull/1328 gets done it should start working. If someone wants to tackle that specific problem earlier, I'm open for PRs :-)
Yes that's correct, I'm blocking outgoing the internet connection for the vacuum. (Always had it configured like this) I can also remove the block, re-add the vacuum and put the block back in place. Would that help?
I wouldn't work, the root cause why the dummy IP-based, unique_id is not being set to the vacuum's config entry should be figured out and fixed. In any case, if the vacuum gets initialized once with the real mac address, it wouldn't match with the dummy one after cutting the cloud connectivity so that's not a working solution.
I wouldn't work, the root cause why the dummy IP-based, unique_id is not being set to the vacuum's config entry should be figured out and fixed. In any case, if the vacuum gets initialized once with the real mac address, it wouldn't match with the dummy one after cutting the cloud connectivity so that's not a working solution.
Aaah, I didn't think about that. Thanks!
Removing and re-adding the integration just fixed it for me in 2022.8.5, but I am not blocking the vacuum to the internet. it's documented that it won't work if you do. I do have HA on a separate network with IP masquerading for the traffic going from HA to Vacuum.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Good bot, but still an issue AFAIK
also still an issue on 2023.01.1
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.