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

Auto Clean no longer works (after a firmware update) #484

Closed ScottEgan closed 6 months ago

ScottEgan commented 6 months ago

Checks

The problem

The way I have been triggering an auto clean no longer works. I have been using the following in a script reliably for more than a year:

service: vacuum.send_command
data:
  command: auto_clean
  params:
    type: auto
target:
  entity_id: vacuum.robot3000

For some reason this no longer works

The documentaion mentions auto clean but I can't seem to see any information on how to call it. image

What is the correct way to send the auto clean command?

Diagnostics information

Deebot T8

Anything in the logs that might be useful for us?

This is what home assistant reports:

This error originated from a custom integration.

Logger: deebot_client.commands.json.custom
Source: custom_components/deebot/vacuum.py:269
Integration: Deebot 4 Home Assistant (documentation, issues)
First occurred: 2:50:46 PM (1 occurrences)
Last logged: 2:50:46 PM

Command "auto_clean" was not successfully: {'ret': 'fail', 'errno': 500, 'debug': 'wait for response timed out'}

Additional information

No response

edenhaus commented 6 months ago

{'ret': 'fail', 'errno': 500, 'debug': 'wait for response timed out'} means there was no response from the bot... So nothing I can do...

Please verify that your bot is online and you are able to interact with it Did you recently install a firmware update?

ScottEgan commented 6 months ago

Hi @edenhaus thank you for looking into this!

The bot is online as I can command an auto clean from the ecovacs app. Firmware is set to auto-update so I'm not sure when it was last updated. I'm on 1.11.8 if that helps at all.

Here are some more logs that I trimmed. Let me know if you need more information:

2023-12-21 10:18:24.636 DEBUG (MainThread) [custom_components.deebot.vacuum] async_send_command auto_clean with {'type': 'auto'}
2023-12-21 10:18:24.636 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): 
2023-12-21 10:18:24.785 DEBUG (MainThread) [deebot_client.mqtt_client.client] Received PUBLISH (d0, q0, r0, m0), 
2023-12-21 10:18:24.785 DEBUG (MainThread) [deebot_client.mqtt_client] Got message: 
2023-12-21 10:18:24.785 DEBUG (MainThread) [deebot_client.mqtt_client] Command auto_clean does not support p2p handling (yet)
2023-12-21 10:18:39.779 DEBUG (MainThread) [deebot_client.authentication] Success calling api url=https://portal-ww.ecouser.net/api/iot/devmanager.do, params={}, response={'ret': 'fail', 'errno': 500, 'debug': 'wait for response timed out'}
edenhaus commented 6 months ago

Probably ecovacs has changed with a firmware update the commands of your bot and so the old one will not work anymore. {'ret': 'fail', 'errno': 500, 'debug': 'wait for response timed out'} means we don't get any response from the bot back. As you have written that the bot is online, it means the bot doesn't understand anymore the send command. This means you need to analyze the traffic of the app and find out what is different between the integration and the app.

I'm on 1.11.8 if that helps at all.

Not really as I don't have any information from ecovacs.

github-actions[bot] commented 6 months ago

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.

ScottEgan commented 6 months ago

Hi @edenhaus, Thanks for your help on this.

Can you confirm for my own sanity that this is the correct command to send for an "auto" cleaning?

service: vacuum.send_command
data:
  command: auto_clean
  params:
    type: auto
target:
  entity_id: vacuum.robot3000
edenhaus commented 6 months ago

auto_clean was deprecated for a log time and created a warning log entry each time you used it. It was removed in version 3.0.0. Please use "vacuum.start" instead.

service: vacuum.start
target:
  entity_id: vacuum.robot3000

Please check your logs frequently as there can be helpful information there