Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roborock S4 stopped working after upgrading to 2022.8.1 #76381

Closed
DevSecNinja opened this issue Aug 7, 2022 · 18 comments
Closed

Roborock S4 stopped working after upgrading to 2022.8.1 #76381

DevSecNinja opened this issue Aug 7, 2022 · 18 comments

Comments

@DevSecNinja
Copy link
Contributor

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:

image

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=, dnd_status=, 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.

@probot-home-assistant
Copy link

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)

@rytilahti
Copy link
Member

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?

@DevSecNinja
Copy link
Contributor Author

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.

@bigbangus
Copy link

My roborock S7 vacuum stopped working with 2022.8 as well.

@mccasian
Copy link

mccasian commented Aug 8, 2022

my S6 stopped working as well. The status of everything became "Unavailable"

@rytilahti
Copy link
Member

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?

@mccasian
Copy link

mccasian commented Aug 8, 2022

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.

@DevSecNinja
Copy link
Contributor Author

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?

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': []}

@DevSecNinja
Copy link
Contributor Author

DevSecNinja commented Aug 16, 2022

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:

image

@rytilahti
Copy link
Member

rytilahti commented Aug 16, 2022

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 (rytilahti/python-miio#1495), I haven't had time to look into fixing that. Anyway, when rytilahti/python-miio#1328 gets done it should start working. If someone wants to tackle that specific problem earlier, I'm open for PRs :-)

@DevSecNinja
Copy link
Contributor Author

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?

@rytilahti
Copy link
Member

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.

@DevSecNinja
Copy link
Contributor Author

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!

@bigbangus
Copy link

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.

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Nov 15, 2022
@DevSecNinja
Copy link
Contributor Author

Good bot, but still an issue AFAIK

@github-actions github-actions bot removed the stale label Nov 15, 2022
@teshiburu2020
Copy link

also still an issue on 2023.01.1

@issue-triage-workflows
Copy link

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.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants