Deebot-4-Home-Assistant
Deebot-4-Home-Assistant copied to clipboard
Status updates stop a few hours after startup
Checks
- [X] I have searched the existing issues and no issue is describing my issue
- [X] I have checked the FAQ
- [X] I have checked the documentation
- [X] #237
The problem
I started using this custom integration with Deebot X1 OMNI a week ago. My login setup is as follows ID: my short ID Country: jp Continent: ww
Deebot-4-Home-Assistant works fine for a while after starting, but after a few hours, Home Assistant stops updating OMNI status. However, in this case, it is still possible to control OMNI from Home Assistant, and the status is updated normally on the Ecovacs app.
After reloading the integration, it will work normally again for a few hours, but after a few hours the status will no longer be updated.
It seems to be disconnecting on the Ecovacs server side, but reloading the integration resolves it, so is there any way to resolve this automatically in a similar way?
Diagnostics information
Deebot vacuum model: Deebot X1 OMNI Deebot-4-Home-Assistant version: 1.4.1 Home Assistant version: core-2022.7.7 Home Assistant installation type: Home Assistant OS (Ver.8.4) Country: jp Continent: ww Instance type: cloud
Anything in the logs that might be useful for us?
There does not seem to be any logs on this issue.
Additional information
No response
Can you please activate debug logs and post them here
@edenhaus
Thank you for your reply.
I tried the Example apps in mrbungle64/ecovacs-deebot.js and that did not stop the status updates. Therefore, it seems that the server is not blocking notifications to non Ecovacs apps.
So, I would like to submit a log to you. But I am not familiar with logs and I am not sure what information is contained in them, so I am not comfortable publishing them here.
If possible, could you give us your email address? I would like to email my log file to you.
Thanks.
@edenhaus
Additional question.
Do I use word "deebot" to extract them? That would include a lot of irrelevant content.
Can I use "deebot_client" to extract them?
I also have the same problem. My deebot T8 aivi is used in China This is my log of searching "deebot"
Logger: custom_components.deebot.hub
Source: custom_components/deebot/hub.py:113
Integration: Deebot 4 Home Assistant ([documentation](https://deebot.readthedocs.io/integrations/home-assistant), [issues](https://github.com/DeebotUniverse/Deebot-4-Home-Assistant/issues))
First occurred: 2022年8月8日 18:54:27 (4 occurrences)
Last logged: 09:36:44
failure (3002) on getting devices
Traceback (most recent call last):
File "/config/custom_components/deebot/hub.py", line 103, in _check_status_task
await self._check_status_function()
File "/config/custom_components/deebot/hub.py", line 113, in _check_status_function
devices = await self._api_client.get_devices()
File "/usr/local/lib/python3.10/site-packages/deebot_client/api_client.py", line 61, in get_devices
raise ApiError(
deebot_client.exceptions.ApiError: failure (3002) on getting devices
Logger: deebot_client.api_client
Source: custom_components/deebot/hub.py:113
Integration: Deebot 4 Home Assistant ([documentation](https://deebot.readthedocs.io/integrations/home-assistant), [issues](https://github.com/DeebotUniverse/Deebot-4-Home-Assistant/issues))
First occurred: 2022年8月8日 18:54:27 (4 occurrences)
Last logged: 09:36:44
Failed to get devices: {'todo': 'result', 'ret': 'fail', 'errno': 3002, 'code': 3002}
Logger: custom_components.deebot.hub
Source: custom_components/deebot/hub.py:105
Integration: Deebot 4 Home Assistant (documentation, issues)
First occurred: 2022年8月10日 04:30:49 (1 occurrences)
Last logged: 2022年8月10日 04:30:49
A client error occurred, probably the ecovacs servers are unstable: Cannot connect to host portal.ecouser.net:443 ssl:True [Try again]
Logger: deebot_client.commands.common
Source: runner.py:119
First occurred: 2022年8月9日 11:36:44 (1 occurrences)
Last logged: 2022年8月9日 11:36:44
Command "getCleanInfo" was not successfully: {}
@edenhaus
Hello.
I found your email address in your profile page and I will send the log file to your email address. ([email protected]) Logs were extracted for the following three words. Is this OK? -homeassistant.components.vacuum -custom_components.deebot -deebot_client
This is a log from the start of Home Assistant until after it no longer receives status from X1 OMNI. Some operationsto X1 OMNI are also included.
Can you please verify this?
Thanks.
Please don't send me the log via mail, instead post it here. Normally all sensitive information is hidden, but please verify it.
When you post it here, more people can help you and also @mrbungle64 can give it a look 😊
@edenhaus
OK. I understand what you are thinking, so I decided to post the log here. I am a little nervous, but this integration is the only thing I can rely on 😊
The attached file is the log from the start of Home Assistant until after it stopped receiving status from X1 OMNI. It also includes some operations on X1 OMNI, which are written in the first four lines of the log file.
Please analyze it.
Thank you.
@sympapa Ecovacs designed their api in a way that when one client changes the a setting (like continuous cleaning) all other clients will not be notified about this change. I have implemented a hack, that I also get this changes, but maybe ecovacs changed something on their side to prevent my hack.
For explanation the app is requesting (polling) each setting, when you open the settings view. This is not possible for this integration at it would continuous polling each second/minute or the specified interval.
If you start via the app a cleaning job, which the status be updated? (This event will be pushed to all clients)
Can you please verify if you have also log entries from gmqtt
@edenhaus
Hello. Thank you for your reply.
Sorry, I do not fully understand what you said.
Immediately after starting the Integration, the status on the Home Assistant change to "cleaning" when cleaning is start from the Ecovacs app. However, after a few hours of starting Integration and no longer receiving status, the status on the Home Assistant will not change when cleaning is started from the Ecovacs app. Even when the X1 OMNI start cleaning from the Ecovacs app, the status on the Home Assistant still "Docked" and does not change.
In other words, all status updates seems to be stopped. whether in settings(e.g. Continuous Cleaning) and in cleaning status (e.g. Docked or Cleaning).
What exactly should I do? Start Deebot from the app, extract its log with the word below (Include gmqtt), and then post it here? -homeassistant.components.vacuum -custom_components.deebot -deebot_client -gmqtt
I reloaded the integration to get that log and started the verification, but the status updates have not stopped yet now, so I will come back to that later.
Thanks.
Asynchronous updates will be handled over mqtt with the library gmqtt
. The library should reconnect automatically, if the connection is lost. Maybe the logs are showing something interesting... We need to find out, if the connection is the problem or if there is some other problem
@edenhaus
Hello.
The log is attached. But I am not sure if I have fulfilled all your requirements. I slept at night so log is long, sorry😅
When I started cleaning from the Ecovacs app at 5:28 16th Aug, the status on the Home Assistant did not change from Docked to Cleaning. Could you please analyze it ? deebot_log_4conditions.txt
Operations history (Times may be a bit inaccurate.) 15 Aug 22:45 Change settings for continuous cleaning from Home Assistant > Status on Home Assistant changed: Success 15 Aug 22:45 Change settings for continuous cleaning from Ecovacs app > Status on Home Assistant changed: Success 15 Aug 22:46 Start cleaning from the Ecovacs app > Status on Home Assistant changed to Cleaning: Success 15 Aug 23:13 Start cleaning from the Ecovacs app > Status on Home Assistant changed to Cleaning: Success 15 Aug 23:40 Start cleaning from the Ecovacs app > Status on Home Assistant changed to Cleaning: Success 15 Aug 23:42 Change settings for continuous cleaning from Home Assistant > Status on Home Assistant changed: Success 15 Aug 23:43 Start cleaning from the Ecovacs app >Status on Home Assistant changed to Cleaning: Success
16 Aug 5:28 Start cleaning from the Ecovacs app > Status on Home Assistant did not change: Failed 16 Aug 5:31 Change settings for continuous cleaning from Ecovacs app > Status on Home Assistant did not change: Failed 16 Aug 5:33 Turn off for continuous cleaning from Home Assistant > Status on Home Assistant did not change: Failed (But on the Ecovacs app it was turned off.)
16 Aug 5:35 Reload integration 16 Aug 5:36 Change settings for continuous cleaning from Ecovacs app> Status on Home Assistant changed: Success 16 Aug 5:37 Start cleaning from the Ecovacs app > Status on Home Assistant changed to Cleaning: Success 16 Aug 5:39 Start cleaning from the Ecovacs app >Status on Home Assistant changed to Cleaning: Success 16 Aug 5:40 Change settings for continuous cleaning from Home Assistant > Status on Home Assistant changed: Succes
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm trying to reproduce this issue, but I have no luck. On my production HA I got still updates after running it for more then a week.
Did you maybe find out something new?
@edenhaus
Thanks for your efforts. I understood that the issue is dependent on the environment.
Unfortunately, I have not found the cause of this issue. But, the Home Asssitant log shows "failure (3002) on getting devices" and "Could not parse getMapSet", although I do not know the causal relationship.
However, I would like to observe the issue carefully in the future. Do you have any ideas for pointers for this? Network? Other integrations? Something else? Please let me know if you can think of anything.
First, I would like to install Home Assistant and install this integration on another Raspberry PI to see if the same issue occurs.
Probably your issue is related to #233 as they get the error 3002
. We need to find out, what it means
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@edenhaus
Hi ! I am looking into error 3002, but do not found what it is. But, error 3002 occurs only once every few days. After reloading the integration, the status updates stop before error 3002 occurs. So error 3002 may not be related.
I will continue to look into error 3002.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Does someone find a fix for this? I'm in the same situation and i use the status to disable alarm movement sensor. Thank you
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@LucaBors are you also getting error 3002
?
I am also having the same issue with a Deebot T9.
I can control the robot still, but I don’t receive any updated status information whether it’s cleaning or not.
Logger: deebot_client.api_client Source: custom_components/deebot/hub.py:113 Integration: Deebot 4 Home Assistant (documentation, issues) First occurred: October 30, 2022 at 3:28:55 PM (2 occurrences) Last logged: October 30, 2022 at 9:25:41 PM
Failed to get devices: {} Failed to get devices: {'todo': 'result', 'ret': 'fail', 'errno': 3002, 'code': 3002}
Logger: custom_components.deebot.hub Source: custom_components/deebot/hub.py:113 Integration: Deebot 4 Home Assistant (documentation, issues) First occurred: October 30, 2022 at 3:28:55 PM (2 occurrences) Last logged: October 30, 2022 at 9:25:41 PM
failure () on getting devices failure (3002) on getting devices Traceback (most recent call last): File "/config/custom_components/deebot/hub.py", line 103, in _check_status_task await self._check_status_function() File "/config/custom_components/deebot/hub.py", line 113, in _check_status_function devices = await self._api_client.get_devices() File "/usr/local/lib/python3.10/site-packages/deebot_client/api_client.py", line 61, in get_devices raise ApiError( deebot_client.exceptions.ApiError: failure () on getting devices
I cannot reproduce the issue as I don't get the error 3002
. Probably this error comes only with newer models and I only have the 950. So please find out, why you get this error.
I know, it's hard to find that out, but unfortunately I cannot help you as I don't get this error
This error immediately precedes the 3002:
2022-10-30 15:28:06.757 WARNING (MainThread) [custom_components.deebot.hub] A client error occurred, probably the ecovacs servers are unstable: Cannot connect to host portal-ww.ecouser.net:443 ssl:True [None] 2022-10-30 15:28:55.709 WARNING (MainThread) [deebot_client._api_client] Timeout reached on api path: appsvr/app.do
I cannot reproduce the issue as I don't get the error
3002
. Probably this error comes only with newer models and I only have the 950. So please find out, why you get this error. I know, it's hard to find that out, but unfortunately I cannot help you as I don't get this error
I have a x1 and a 920 and problem is on both. So I don’t think is only on new models.
Can you please all share the configuration. Maybe there error exists in only country or region...
Has someone the skills to intercept the traffic of the app? Maybe the login has changed
This error immediately precedes the 3002:
2022-10-30 15:28:06.757 WARNING (MainThread) [custom_components.deebot.hub] A client error occurred, probably the ecovacs servers are unstable: Cannot connect to host portal-ww.ecouser.net:443 ssl:True [None] 2022-10-30 15:28:55.709 WARNING (MainThread) [deebot_client._api_client] Timeout reached on api path: appsvr/app.do
As the api returns an error, no devices could be setup correctly. We could improve the error handling, but more important is to find out what error 3002
means
I’ve created an automation that reload, every 30 minutes, the configuration for my 2 vacuum. I’ll check if this can be a workaround. Till now this seems to work.