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 Q Revo - Entities periodically become unavailable #105898

Open
Pippo1989 opened this issue Dec 17, 2023 · 24 comments
Open

Roborock Q Revo - Entities periodically become unavailable #105898

Pippo1989 opened this issue Dec 17, 2023 · 24 comments

Comments

@Pippo1989
Copy link

The problem

Hi,

I first installed the integration after purchasing a Roborok Q Revo.

The problem is that entities associated with the integration periodically become unavailable.

As an example, here you will find a photo attached in which you can see the behavior of one of the entities over 1 hour.

Here you will find also the integration logs, for the same time slot, since the restart.

Q Revo unvailable entity

home-assistant_roborock_2023-12-17T10-10-29.988Z.log

What version of Home Assistant Core has the issue?

core-2023.12.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Roborock

Link to integration documentation on our website

https://www.home-assistant.io/integrations/roborock

Diagnostics information

home-assistant_roborock_2023-12-17T10-10-29.988Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @humbertogontijo, @Lash-L, mind taking a look at this issue as it has been labeled with an integration (roborock) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of roborock can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign roborock Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


roborock documentation
roborock source
(message by IssueLinks)

@andi242
Copy link

andi242 commented Dec 19, 2023

same here, reloading the integration does the trick.
There is a lot of error messages in the logs. My guess is that the newly added map feature is causing issues.

Logger: roborock.cloud_api
Source: /usr/local/lib/python3.11/site-packages/roborock/api.py:326
First occurred: December 18, 2023 at 12:49:38 PM (13 occurrences)
Last logged: 9:26:27 AM

[Roborock S6 MaxV] ('Failed to decode %s for %s', b'C+N6D1RO\x00\x00\x00\x00\x00\x00\x00\x01V?\x00\x00\x00\x00\x00\x00U\xd8\x92\xf5(\xd2\xe8\x15\xef\x19\x16i\xf5=\x93\xd1\x [REDACTED]', 301)

This should be the image data encoded, I snipped off the main part with [REDACTED] since it is a very large entry.

some more entries in the logs, that may be related:

Logger: zigpy.zcl
Source: runner.py:188
First occurred: December 17, 2023 at 12:51:31 AM (89 occurrences)
Last logged: 12:52:11 AM

[0x6650:1:0xe001] Unknown cluster command 225 b'\x03\xebE\x12-b6\x01\x0045\x01\x00\x194\x01\x00\x00'
[0x7697:1:0xe001] Unknown cluster command 225 b'\n\xf0E\x12-\xc7D\x00\x00\xc6D\x00\x00`D\x00\x00`D\x00\x00`D\x00\x00`D\x00\x00\xe1C\x00\x00\xe1C\x00\x00\xe1C\x00\x00\x8bC\x00\x00\x01'
[0x7697:1:0xe001] Unknown cluster command 225 b'\nu\x97\x13-\xc8D\x00\x00\xc7D\x00\x00\xc6D\x00\x00`D\x00\x00`D\x00\x00`D\x00\x00`D\x00\x00\xe1C\x00\x00\xe1C\x00\x00\xe1C\x00\x00\x01'
[0x6650:1:0xe001] Unknown cluster command 225 b'\x04y\x97\x13-Y7\x01\x00b6\x01\x0045\x01\x00\x194\x01\x00\x00'
[0x0A2E:1:0xe001] Unknown cluster command 225 b'\nu\x97\x13-\xa7A\x00\x00\xa7A\x00\x00\xa6A\x00\x00lA\x00\x00lA\x00\x00kA\x00\x00kA\x00\x000A\x00\x000A\x00\x000A\x00\x00\x01'
Logger: roborock.local_api
Source: runner.py:188
First occurred: 2:02:30 AM (1 occurrences)
Last logged: 2:02:30 AM

[Roborock S6 MaxV] [Errno 104] Connection reset by peer
Logger: roborock.cloud_api
Source: /usr/local/lib/python3.11/site-packages/roborock/api.py:332
First occurred: December 17, 2023 at 2:01:18 AM (3 occurrences)
Last logged: 2:02:01 AM

[Roborock S6 MaxV] Client or broker did not communicate in the keepalive interval.
[Roborock S6 MaxV] The connection was lost.

@lewicki-pk
Copy link

Mine Roborock S5 Max has the same problem, I.e. becomes unavailable and reloading it brings it back. I didn’t check the logs for the error messages yet.

@SaaX-IRL
Copy link

Same here with Q8 Max

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

Hello - I am working on a solution but I need more information. Is anyone technical enough to try to update their python-roborock library to 0.40.0 and then getting an instance of the error again and sending me their diagnostic information?

@SaaX-IRL
Copy link

SaaX-IRL commented Mar 4, 2024

I'm too much of a newbie for that, sorry for not being able to help. I "solved" it by creating an automation that reloads the Roborock integration when it becomes "unavailable".

@Pippo1989
Copy link
Author

I'm sorry, I'm as well a newbie and I can't help you with that, unless you can guide me throught the process.

I'm too much of a newbie for that, sorry for not being able to help. I "solved" it by creating an automation that reloads the Roborock integration when it becomes "unavailable".

@SaaX-IRL could you share that code? It may be helpful. Thanks in advance.

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

I'm sorry, I'm as well a newbie and I can't help you with that, unless you can guide me throught the process.

I'm too much of a newbie for that, sorry for not being able to help. I "solved" it by creating an automation that reloads the Roborock integration when it becomes "unavailable".

@SaaX-IRL could you share that code? It may be helpful. Thanks in advance.

  1. Have some method of transfering files to your Home Assistant
  2. I use Samba(addon super easy to install.) - With samba you go to windows explorer then in the top bar go to \homeassistant.local and enter in your login from when you setup samba.
  3. Download the latest version of the roborock package here: https://github.com/humbertogontijo/python-roborock/archive/refs/tags/v0.40.0.zip
  4. unzip that file, and open it up until you see a folder just named 'roborock'.
  5. Move the roborock folder to the config folder on your home assistant instance (again you can see this at \homeassistant.local if you're using samba)
  6. Restart Home Assistant.
  7. Wait until you get the error again that says cannot decode %s for %s.
  8. Download your log
  9. Download your Diagnostic data.

All in all should just take you 5-10 minutes. No pressure if you don't want to.

@SaaX-IRL
Copy link

SaaX-IRL commented Mar 4, 2024

@Pippo1989 sure, see below. I initially used the state change as the trigger but HA missed it once only yesterday - so since then I'm checking every 5 mins and reload if unavailable.

alias: Roborock Reload
description: ""
trigger:

  • platform: time_pattern
    minutes: /5
    condition:
  • condition: state
    entity_id: vacuum.roborock_q8_max
    state: unavailable
    action:
  • service: homeassistant.reload_config_entry
    metadata: {}
    data: {}
    target:
    entity_id: vacuum.roborock_q8_max
    mode: single

@SaaX-IRL
Copy link

SaaX-IRL commented Mar 4, 2024

@Lash-L I could do that - but I never got an error that said "cannot decode %s for %s". For me the integration just becomes unavailable, multiple times per day. Maybe I never got that error because I never looked at the logs?

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

@Lash-L I could do that - but I never got an error that said "cannot decode %s for %s". For me the integration just becomes unavailable, multiple times per day.

You likely have a different issue then. Can you share any logs from when it happens?

@SaaX-IRL
Copy link

SaaX-IRL commented Mar 4, 2024

@Lash-L I could do that - but I never got an error that said "cannot decode %s for %s". For me the integration just becomes unavailable, multiple times per day.

You likely have a different issue then. Can you share any logs from when it happens?

Sure, if you'd hold my hand telling where to look - I'm tech savvy but such an HA noob, sorry.

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

Sure, if you'd hold my hand telling where to look - I'm tech savvy but such an HA noob, sorry.

Settings -> system -> logs should get you there

@SaaX-IRL
Copy link

SaaX-IRL commented Mar 4, 2024

Sure, if you'd hold my hand telling where to look - I'm tech savvy but such an HA noob, sorry.

Settings -> system -> logs should get you there

Well, that was easy - ty ;) I had a look at the log but am a bi lost - so I've attached it. Shout if there's anything else I can do.

home-assistant_2024-03-04T15-54-22.427Z.log

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

Sure, if you'd hold my hand telling where to look - I'm tech savvy but such an HA noob, sorry.

Settings -> system -> logs should get you there

Well, that was easy - ty ;) I had a look at the log but am a bi lost - so I've attached it. Shout if there's anything else I can do.

home-assistant_2024-03-04T15-54-22.427Z.log

Uh - do you have internet on your Home assistant right now? You have 3 integrations that all fail to connect seemingly.

@SaaX-IRL
Copy link

SaaX-IRL commented Mar 4, 2024

Uh - do you have internet on your Home assistant right now? You have 3 integrations that all fail to connect seemingly.

I usually do, FTTH - but have noticed very short drops (some secs) in the last couple of days, maybe the provider messin'. According to my "roborock reload" automation it was last triggered 18h ago, which makes it this (I believe):

2024-03-03 22:16:35.949 ERROR (MainThread) [homeassistant.components.roborock.coordinator] Error fetching roborock data: id=23793 Timeout after 4 seconds

Would that short timeout possibly render the entity unavailable?

@andi242
Copy link

andi242 commented Mar 4, 2024

I added the roborock replacement as described. Waiting for the integration to fail now.
I got the Error fetching roborock data: id=23793 Timeout after 4 seconds as well, but it appears the log is being cut off after some time.
Is there a way to get the full log from cli or something like that? journalctl does not seem to be present on hassio installs.

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

I added the roborock replacement as described. Waiting for the integration to fail now. I got the Error fetching roborock data: id=23793 Timeout after 4 seconds as well, but it appears the log is being cut off after some time. Is there a way to get the full log from cli or something like that? journalctl does not seem to be present on hassio installs.

if you go on your HA server, go to settings -> system -> logs, you can hit load full logs or download logs and that should show you everything. You have to refresh the page whenever you want an update though.

@Lash-L
Copy link
Contributor

Lash-L commented Mar 4, 2024

@andi242 has the error popped up yet? How frequently has the error occurred for you in the past?

@andi242
Copy link

andi242 commented Mar 4, 2024

@andi242 has the error popped up yet? How frequently has the error occurred for you in the past?

sorry, not popped up, yet.
It's rather erratic sometimes a couple of times a day, then every other day. Not really sure what's causing this.
It seems to build up over time, or something.

/edit: or this might be just as I hit the 'go' button. Will try this tomorrow, it's to late here to start the vacuum.

(I do have loads of zha errors, though :D )

@andi242
Copy link

andi242 commented Mar 5, 2024

so the unavaiability occured twice this night and is still ongoing.
The only error related to roborock in the logs is this:
2024-03-05 03:16:34.010 ERROR (MainThread) [homeassistant.components.roborock.coordinator] Error fetching roborock data: Failed connecting to 192.168.1.118
I had an router reboot 1 hour before (at 02:00:00) but there was no error in roborock.

home-assistant_2024-03-05T05-13-33.638Z.log
log attached.

/edit

What I tried to get more information:

  • wake device by removing the waste bin
  • enabled the debug log on the integration and hit reload

This is the log with a little bit of redacting on what I believe was personal information.
home-assistant_roborock_2024-03-05T06-26-54.731Z-filtered.log

/edit 2
the device just became unavailable while cleaning.
no error messages except this
2024-03-05 10:40:11.850 ERROR (MainThread) [homeassistant.components.roborock.coordinator] Error fetching roborock data: id=15783 Timeout after 4 seconds

Logger: homeassistant.components.roborock.coordinator
Source: helpers/update_coordinator.py:345
Integration: Roborock (documentation, issues)
First occurred: 12:42:09 AM (4 occurrences)
Last logged: 10:40:11 AM

Error fetching roborock data: id=23666 Timeout after 4 seconds
Error fetching roborock data: id=19700 Timeout after 4 seconds
Error fetching roborock data: Failed connecting to 192.168.1.118
Error fetching roborock data: id=15783 Timeout after 4 seconds

Started debug log after device became unavailable.
Log consists mainly of local connection errors, while cloud connect is successful.

roborock.local_api fails to connect, while roborock.cloud_api is successful (indicates network is available, no errors on that level)

2024-03-05 10:52:50.911 DEBUG (MainThread) [homeassistant.components.roborock.coordinator] Finished fetching roborock data in 3.071 seconds (success: False)
2024-03-05 10:52:53.978 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Disconnecting from 192.168.1.18
2024-03-05 10:52:53.979 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Connecting to 192.168.1.18
2024-03-05 10:52:57.050 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Disconnecting from 192.168.1.18
2024-03-05 10:52:57.051 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Connecting to 192.168.1.18
2024-03-05 10:53:00.122 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Disconnecting from 192.168.1.18
2024-03-05 10:53:00.123 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Connecting to 192.168.1.18
2024-03-05 10:53:03.078 DEBUG (Thread-50 (_thread_main)) [roborock.cloud_api] [Roborock S6 MaxV] Received PUBLISH (d0, q0, r0, m0), 'rr/m/o/xxx/xx/xxx', properties=[], ... (71 bytes)
2024-03-05 10:53:03.081 DEBUG (Thread-50 (_thread_main)) [roborock.cloud_api] [Roborock S6 MaxV] Got device update for battery: 80
2024-03-05 10:53:03.194 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Disconnecting from 192.168.1.18
2024-03-05 10:53:03.195 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Connecting to 192.168.1.18
2024-03-05 10:53:20.843 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Disconnecting from 192.168.1.18
2024-03-05 10:53:20.843 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Connecting to 192.168.1.18
2024-03-05 10:53:23.898 DEBUG (MainThread) [homeassistant.components.roborock.coordinator] Finished fetching roborock data in 3.059 seconds (success: False)
2024-03-05 10:53:46.137 DEBUG (Thread-50 (_thread_main)) [roborock.cloud_api] [Roborock S6 MaxV] Sending PINGREQ
2024-03-05 10:53:46.151 DEBUG (Thread-50 (_thread_main)) [roborock.cloud_api] [Roborock S6 MaxV] Received PINGRESP

cleaned up debug logfile after restarting the integration:
home-assistant_2024-03-05T10-00-28.105Z-filtered.log

Not sure why, but apparently the roborock cloud api is reporting a different IP.

2024-03-05 10:58:46.516 DEBUG (MainThread) [roborock.cloud_api] [Roborock S6 MaxV] id=24852 Response from get_network_info: {'ssid': 'xxx', 'ip': '192.168.1.118', 'mac': 'xxx', 'bssid': 'xxx', 'rssi': -44}
2024-03-05 10:58:46.518 DEBUG (MainThread) [roborock.local_api] [Roborock S6 MaxV] Connecting to 192.168.1.118

as the local IP query indicates, the IP is .18, which is correct. Not sure why there is a .118 in the cloud query. The device never had this IP since I created a reservation on my DHCP for the roborock.

/update
I have an issue with my DHCP server, not sure why, but the router decided to reactivate DHCP again. I will fix and test again.

@Pippo1989
Copy link
Author

I'm sorry, I'm as well a newbie and I can't help you with that, unless you can guide me throught the process.

I'm too much of a newbie for that, sorry for not being able to help. I "solved" it by creating an automation that reloads the Roborock integration when it becomes "unavailable".

@SaaX-IRL could you share that code? It may be helpful. Thanks in advance.

  1. Have some method of transfering files to your Home Assistant
  2. I use Samba(addon super easy to install.) - With samba you go to windows explorer then in the top bar go to \homeassistant.local and enter in your login from when you setup samba.
  3. Download the latest version of the roborock package here: https://github.com/humbertogontijo/python-roborock/archive/refs/tags/v0.40.0.zip
  4. unzip that file, and open it up until you see a folder just named 'roborock'.
  5. Move the roborock folder to the config folder on your home assistant instance (again you can see this at \homeassistant.local if you're using samba)
  6. Restart Home Assistant.
  7. Wait until you get the error again that says cannot decode %s for %s.
  8. Download your log
  9. Download your Diagnostic data.

All in all should just take you 5-10 minutes. No pressure if you don't want to.

I followed this short guide. Below you can see the complete logs of almost 1 hour since the restart. Consider that, while the logs were being recorded, roborock was running.

home-assistant_roborock_2024-03-06T17-25-42.867Z.log

@Lash-L
Copy link
Contributor

Lash-L commented Mar 6, 2024

I followed this short guide. Below you can see the complete logs of almost 1 hour since the restart. Consider that, while the logs were being recorded, roborock was running.

home-assistant_roborock_2024-03-06T17-25-42.867Z.log

I don't see any issues in your logs pertaining to Roborock. Did your entities ever stop being available during this time?

@Pippo1989
Copy link
Author

Hi,

I'm sorry for the late response.

After downloading the package, the situation seems stable.

The only "problem" is that, strangely, all entities briefly become "unavailable" at around 3.15am.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants