DeebotUniverse / Deebot-4-Home-Assistant

Home Assistant integration for deebot vacuums
https://deebot.readthedocs.io/integrations/home-assistant/
GNU General Public License v3.0
179 stars 37 forks source link

Continuos errors in log #501

Closed xtimmy86x closed 5 months ago

xtimmy86x commented 5 months ago

Checks

The problem

From version 3.0.0 my log is filled by errors (2000 errors in a day) from the integration, but all seem to work correcrly

Diagnostics information

home-assistant_2024-01-09T17-05-38.403Z.log

Anything in the logs that might be useful for us?

No response

Additional information

No response

Nanny1988 commented 5 months ago

Same here. A lot of errors

Logger: deebot_client.command
Source: /usr/local/lib/python3.11/site-packages/deebot_client/command.py:89
First occurred: 17:06:22 (937 occurrences)
Last logged: 22:14:13

Could not execute command getStats
Could not execute command getWorkMode
Could not execute command getError
Could not execute command getTrueDetect
Could not execute command getNetInfo
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/deebot_client/command.py", line 76, in execute
    result = await self._execute(authenticator, device_info, event_bus)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/command.py", line 100, in _execute
    response = await self._execute_api_request(authenticator, device_info)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/command.py", line 140, in _execute_api_request
    return await authenticator.post_authenticated(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/authentication.py", line 358, in post_authenticated
    return await self._auth_client.post(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/deebot_client/authentication.py", line 294, in post
    raise ApiError("Unknown error occurred")
deebot_client.exceptions.ApiError: Unknown error occurred
Nanny1988 commented 5 months ago

And it takes about 30 seconds until an input about the vacuum cleaner is sent

edenhaus commented 5 months ago

Please activate debug logs and attach them here.

From the error messages it looks like you both have a connection problem. The library tries 3 times to send the request before raising the error above. Please check that the robot and home assistant have a stable internet connection and no ad block or co is in the middle.

rayfoster14 commented 5 months ago

I have started seeing this behavior too. My logs have the same errors - I can't send right now as I don't have the means to download right now. I have two robots, but they are seeing the same behavior too but not at the same time - completely independent of eachother.

edenhaus commented 5 months ago

Without debug logs, I cannot help as there is an issue with the communication to the ecovacs servers or the robot. I don't see these issues on my side. Please also add the diagnostic information, when you submit the debug logs as it could be also a regional problem (maybe one ecovacs server has currently problems)

Nanny1988 commented 5 months ago

Internet connection is ok. This is the only integration with those issues.

error_log-30.txt

Nanny1988 commented 5 months ago

EU Server and Germany Location

edenhaus commented 5 months ago

Internet connection is ok. This is the only integration with those issues.

error_log-30.txt

You get a lot of Bad Gateway (502) back from the ecovacs URL. Please check, which IP will be returned from your DNS for portal-eu.ecouser.net. Maybe it is possible to use another server by using another DNS service (1.1.1.1 or 8.8.8.8) Please also check if a firewall, adblocker or whatever is causing the problem.

And it takes about 30 seconds until an input about the vacuum cleaner is sent

Currently, the library tries to resend the request up to three times if 502 is returned with a delay of 10 seconds in between.

I can only confirm that I can use the EU servers from Italy without any problem. 2-3 requests a day fail on the first attempt, but they will succeed on the second one due the retry code

xtimmy86x commented 5 months ago

I have 30 integrations and the only who have this problem is deebot, with the original app the robot works fine, no internet or wifi problem... This issue happened for me from the 3.0.0 version I'm from Italy

xtimmy86x commented 5 months ago

error_log.txt

Here is the debug log

edenhaus commented 5 months ago

Are you executing one of the following services deebot.refresh or homeassistant.update_entity? You try to constanly try to refresh all states

xtimmy86x commented 5 months ago

No, none of the above And for a plus of no connectivity problem, this is the link quality of the last 24h

Screenshot_20240110_165140

xtimmy86x commented 5 months ago

With the latest 3.1.1 update, which was released today, errors have been significantly reduced. Now, there are only around 10 errors per hour.

Are you executing one of the following services deebot.refresh or homeassistant.update_entity? You try to constanly try to refresh all states

edenhaus commented 5 months ago

With the latest 3.1.1 update, which was released today, errors have been significantly reduced. Now, there are only around 10 errors per hour.

Are you executing one of the following services deebot.refresh or homeassistant.update_entity? You try to constanly try to refresh all states

3.1.1 fixed the unnecessary polling of the map and so the amount of requests are now lower, therefore you get less errors. Please try changing DNS as described in https://github.com/DeebotUniverse/Deebot-4-Home-Assistant/issues/501#issuecomment-1884774618. Do you have multiple bots connected to your account?

kauthmbt commented 5 months ago

I am also from Germany and seeing some connection drops throughout the last days.

But to be honest, I see the problem somewhere in the route to ECOVACS servers (or the server itself). I did some testing from my mobile device connected directly to the cell network and with the diagnostics on the website https://who.is/tools

PING portal-eu.ecouser.net (3.68.172.231) 56(84) bytes of data.

--- portal-eu.ecouser.net ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4031ms
traceroute to portal-eu.ecouser.net (3.68.172.231), 30 hops max, 60 byte packets
 1  ip-10-0-0-14.ec2.internal (10.0.0.14)  1.141 ms  1.254 ms  1.190 ms
 2  ec2-3-236-63-25.compute-1.amazonaws.com (3.236.63.25)  5.368 ms ec2-3-236-63-49.compute-1.amazonaws.com (3.236.63.49)  38.702 ms ec2-3-236-63-19.compute-1.amazonaws.com (3.236.63.19)  4.092 ms
 3  240.0.224.67 (240.0.224.67)  1.753 ms 240.0.224.99 (240.0.224.99)  1.955 ms 240.0.224.66 (240.0.224.66)  1.759 ms
 4  240.0.224.94 (240.0.224.94)  1.818 ms 240.0.224.121 (240.0.224.121)  1.817 ms 240.0.224.87 (240.0.224.87)  1.795 ms
 5  100.100.38.36 (100.100.38.36)  2.674 ms 100.100.6.12 (100.100.6.12)  18.802 ms 100.100.8.8 (100.100.8.8)  2.719 ms
 6  100.92.5.99 (100.92.5.99)  92.474 ms 100.92.24.91 (100.92.24.91)  91.559 ms 100.92.5.175 (100.92.5.175)  91.556 ms
 7  240.0.96.7 (240.0.96.7)  91.705 ms 240.0.92.7 (240.0.92.7)  91.547 ms 240.0.92.4 (240.0.92.4)  91.610 ms
 8  242.8.149.145 (242.8.149.145)  91.740 ms 242.8.140.17 (242.8.140.17)  92.618 ms  92.599 ms
 9  240.0.92.12 (240.0.92.12)  91.562 ms 240.0.92.15 (240.0.92.15)  91.566 ms 240.0.92.14 (240.0.92.14)  91.535 ms
10  242.1.95.33 (242.1.95.33)  97.674 ms 242.1.95.217 (242.1.95.217)  97.900 ms 242.1.95.53 (242.1.95.53)  97.032 ms
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
xtimmy86x commented 5 months ago

With the latest 3.1.1 update, which was released today, errors have been significantly reduced. Now, there are only around 10 errors per hour.

Are you executing one of the following services deebot.refresh or homeassistant.update_entity? You try to constanly try to refresh all states

3.1.1 fixed the unnecessary polling of the map and so the amount of requests are now lower, therefore you get less errors. Please try changing DNS as described in #501 (comment). Do you have multiple bots connected to your account?

No only one bot

I tried to change the DNS server but the result is the same

xtimmy86x commented 5 months ago

Today, I tried reinstalling version 3.0.0, and with this version no errors appear, and everything is working smoothly.

rayfoster14 commented 5 months ago

Today, I tried reinstalling version 3.0.0, and with this version no errors appear, and everything is working smoothly.

I left the issue alone as it was an assumed it was a server error on Ecovacs side. Problem went away around 8am GMT with no actions or changes my end.

Nanny1988 commented 5 months ago

Can confirm it. No more problems since around 8:00 a.m. Commands are executed immediately and I no longer have any errors in the logs.

edenhaus commented 5 months ago

Closing it as the issue was on ecovacs side.

If you constantly have this issue please open a new bug report and attach all required informations