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

ecovacs deebot x2 won't start #110177

Closed
bce626 opened this issue Feb 10, 2024 · 36 comments · Fixed by #116025 or #125207
Closed

ecovacs deebot x2 won't start #110177

bce626 opened this issue Feb 10, 2024 · 36 comments · Fixed by #116025 or #125207
Assignees

Comments

@bce626
Copy link

bce626 commented Feb 10, 2024

The problem

Ecovacs Deebot X2 won't start when you give the command to clean via home assistant.

Next in the log
"
Logger: deebot_client.commands.json.common
Source: components/ecovacs/vacuum.py:319
First occurred: 12:23:22 (2 occurrences)
Last logged: 12:23:25

Command "clean" was not successfully. body={'code': 20003, 'msg': 'rcp not support'}
"
home-assistant_ecovacs_2024-02-10T11-24-41.525Z.log

What version of Home Assistant Core has the issue?

2024.2.1

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

ecovacs

Link to integration documentation on our website

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

Diagnostics information

home-assistant_ecovacs_2024-02-10T11-24-41.525Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: deebot_client.commands.json.common
Source: components/ecovacs/vacuum.py:319
First occurred: 12:23:22 (2 occurrences)
Last logged: 12:23:25

Command "clean" was not successfully. body={'code': 20003, 'msg': 'rcp not support'}

Additional information

No response

@home-assistant
Copy link

Hey there @OverloadUT, @mib1185, @edenhaus, mind taking a look at this issue as it has been labeled with an integration (ecovacs) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ecovacs 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 ecovacs 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)


ecovacs documentation
ecovacs source
(message by IssueLinks)

@edenhaus
Copy link
Contributor

Please add the config entry diagnostic information. Without I cannot help you. Thanks

@bce626
Copy link
Author

bce626 commented Feb 13, 2024 via email

@mib1185
Copy link
Contributor

mib1185 commented Feb 13, 2024

here you can find the diagnostics data

@bce626
Copy link
Author

bce626 commented Feb 13, 2024

@edenhaus
Copy link
Contributor

You have still installed the custom component Deebot 4 Home Assistant. Please uninstall it and restart HA, this is required as you currently overwrite the dependency of the core integration

@bce626
Copy link
Author

bce626 commented Feb 14, 2024

I took Ecovacs out of devices and services and then a reboot. Then took it out of HACS and rebooted again. After the restart, I looked up the application in devices and services and installed it on new, but the problem remains.
config_entry-ecovacs-e21baaf5502e44c766a4927588f77ce8 (1).json

Logger: deebot_client.message
Source: /usr/local/lib/python3.12/site-packages/deebot_client/message.py:69
First occurred: 12:24:41 (1 occurrences)
Last logged: 12:24:41

Could not parse getCleanInfo: {'code': 20003, 'msg': 'rcp not support'}
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/deebot_client/message.py", line 62, in wrapper
if response.state == HandlingState.ANALYSE:
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

@edenhaus
Copy link
Contributor

It looks like Ecovacs introduced a new cleaning command, which is currently unsupported by deebot-client.
Feel free to add support for it directly to the library

@edenhaus edenhaus added problem in dependency waiting-for-upstream We're waiting for a change upstream labels Feb 16, 2024
@chrfin
Copy link

chrfin commented Feb 21, 2024

@bce626 Does the Map work with your X2? I get all the status information, but the map only returns HTTP 500, but I did not investigate any further until now...

@bce626
Copy link
Author

bce626 commented Feb 21, 2024

@chrfin No, the Map does not work. I get a broken logo sign.
I just don't know if it's a 500 code, or if the file doesn't exist.

@kerashin
Copy link

@chrfin No, the Map does not work. I get a broken logo sign. I just don't know if it's a 500 code, or if the file doesn't exist.

I have the same issue, the map was working before the migration. Now it's a broken logo sign.
Is there an issue logged for this or do I need to log one?

@Elle4u
Copy link

Elle4u commented Mar 22, 2024

Same to me. Map not working.

@ytorres
Copy link

ytorres commented Mar 24, 2024

Same to me. Map not working. 500 code

@edenhaus
Copy link
Contributor

It will not help to comment "Same to me". Please use reactions on the issue descriptions.

I don't own an X2 and therefore I cannot implement support for it. Someone with an X2 needs to add the missing commands to the client.

@GK-hassio
Copy link

Dear @edenhaus, I have a Omni X2 available for testing. If you could give some guidance how to experiment with the coding? I have some experience.
DeebotOmniX2DebugLog.txt

@Ulfmerbold2000
Copy link
Contributor

I have an x2 Omni too.
Integration fails at these points:
Map fails, Rooms missing fully, all Stationfunctions(for example when bot is washing the pads, drying)

If the X1 working fully now, how to get at the config data in python 3.12(have searched, cant find the whole dir ^^)

As i have seen, the classfile and the reference is missing (must be "class": "lf3bn4"), but without to come into the deebot-client directory in python...
Functions in ecovacs-deebot.js are implemented now and same as with X1 and come from T20.

But as i sayed, without access to deebot-client directory i cant give it a try to make some files.

Any hint how to come into the magic parts would be great(i'm not an programmer nor did i anything with homeassistant scripting, but be an sysadmin)

@edenhaus
Copy link
Contributor

Should be fixed with #116025

@pranktap
Copy link

pranktap commented May 2, 2024

I am on 2024.5.0 and map is still not working for x2.

@Ulfmerbold2000
Copy link
Contributor

X2 got the device file in 7.0.0 deebot_client(this is the main component for functionality)

But it is referenced to the Deebot T20, 7.0.1 gives the X2 his own featureset but with the map settings from T20(still)
I've an pull request open to change this into V2 of Map generation(hopefully this will do the trick)

I would love to test it in my own HA installation first, but i can't find a way to go into the needed container at file level.
So changes comes slowly over the HA updates

there are some things that will be better with deebot_client 7.0.1, more sensors(round mop, voice etc), but the map and the rooms are obvious bound together and need some try and error with the v2 map generation(my hope that this will do the trick then later)

generally my x2 send the rooms in debuglog, but at the end they are not in the vaccum entity at the moment

@DieterKoblenz
Copy link

DieterKoblenz commented May 15, 2024

While the map is fixed, this specific issue is not in deebotclient 7.2.0

2024-05-15 10:30:34.683 DEBUG (MainThread) [homeassistant.components.ecovacs.vacuum] async_send_command spot_area with {'rooms': '0,1,2', 'cleanings': 2}
2024-05-15 10:30:34.683 DEBUG (MainThread) [deebot_client.authentication] Calling api(1/3): url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '84bd0abe-a201-4c00-af5a-47a5b8a5f4fc', 'td': 'q', 'u': 'fcirumq0e0f6f242', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'clean', 'payload': {'header': {'pri': '1', 'ts': 1715761834.683294, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'act': 'start', 'type': 'spotArea', 'content': '0,1,2', 'count': 2}}}, 'payloadType': 'j', 'td': 'q', 'toId': '84bd0abe-a201-4c00-af5a-47a5b8a5f4fc', 'toRes': 'yQnl', 'toType': 'lf3bn4'}
2024-05-15 10:30:34.723 DEBUG (MainThread) [deebot_client.mqtt_client.client] Received PUBLISH (d0, q0, r0, m0), 'iot/p2p/clean/HelperMQClientId-awseu-sts-ngiot-mqsjmq-1/ecosys/1234/84bd0abe-a201-4c00-af5a-47a5b8a5f4fc/lf3bn4/yQnl/q/2a4l/j', ...  (148 bytes)
2024-05-15 10:30:34.723 DEBUG (MainThread) [deebot_client.mqtt_client] Got message: topic=iot/p2p/clean/HelperMQClientId-awseu-sts-ngiot-mqsjmq-1/ecosys/1234/84bd0abe-a201-4c00-af5a-47a5b8a5f4fc/lf3bn4/yQnl/q/2a4l/j, payload=b'{"header":{"pri":"1","ts":1715761834.683294,"tzm":480,"ver":"0.0.50"},"body":{"data":{"act":"start","type":"spotArea","content":"0,1,2","count":2}}}'
2024-05-15 10:30:34.723 DEBUG (MainThread) [deebot_client.mqtt_client] Command clean does not support p2p handling (yet)
2024-05-15 10:30:34.837 DEBUG (MainThread) [deebot_client.authentication] Success calling api url=https://portal-eu.ecouser.net/api/iot/devmanager.do, params={'mid': 'lf3bn4', 'did': '84bd0abe-a201-4c00-af5a-47a5b8a5f4fc', 'td': 'q', 'u': 'fcirumq0e0f6f242', 'cv': '1.67.3', 't': 'a', 'av': '1.3.1'}, json={'cmdName': 'clean', 'payload': {'header': {'pri': '1', 'ts': 1715761834.683294, 'tzm': 480, 'ver': '0.0.50'}, 'body': {'data': {'act': 'start', 'type': 'spotArea', 'content': '0,1,2', 'count': 2}}}, 'payloadType': 'j', 'td': 'q', 'toId': '84bd0abe-a201-4c00-af5a-47a5b8a5f4fc', 'toRes': 'yQnl', 'toType': 'lf3bn4'}, response={'ret': 'ok', 'resp': {'header': {'pri': 1, 'tzm': 60, 'ts': '1715761834672', 'ver': '0.0.1', 'fwVer': '1.75.0', 'hwVer': '0.1.1', 'wkVer': '0.1.54'}, 'body': {'code': 20003, 'msg': 'rcp not support'}}, 'id': '2a4l', 'payloadType': 'j'}
2024-05-15 10:30:34.837 WARNING (MainThread) [deebot_client.commands.json.common] Command "clean" was not successfully. body={'code': 20003, 'msg': 'rcp not support'}

@edenhaus I know this is not something you can fix, but could you re-open the issue?

@jota1906
Copy link

jota1906 commented May 29, 2024

I have an Ecovacs Deebot X2. When I try to start it, it won't work. In the logs, I see the error message: 'Command "clean" was not successful. Body={'code': 20003, 'msg': 'rcp not support'}.'
config_entry-ecovacs-7b27019369b4809b4fc4f87802e4d13d (1).json

any help, please.

@sebcbien37
Copy link

Hi, I have the same problem. Start, stop and pause don't work! :(

@edenhaus
Copy link
Contributor

I cannot analyze and debug the problem as I don't have the model. The only one who can solve it is you all by analyzing the traffic of the app and checking what is different

@sebcbien37
Copy link

Hi, how can I analyse the traffic of the app ? What application do you use to analyze the frames ?

@sebcbien37
Copy link

Hi @edenhaus, you can find attached my wireshark data of my iphone.
I have done start, stop, pause and every commands of my ecovacs x2

Thanks

ecovacs.pcapng.zip

@edenhaus
Copy link
Contributor

@sebcbien37 Did you use a proxy in between otherwise we cannot inspect the traffic as it is encrypted.
I use always man in the middle proxy for my analysis

@sebcbien37
Copy link

Hi,
I recorded a lot of messages.
I don't know what I'm allowed to post on the internet, I wouldn't want to post private things. This could help?

{"body":{"data":{"act":"go"}},"header":{"channel":"iOS","reqid":"XXXXXX","ts":"XXXXXX","ver":"0.0.50","m":"request","pri":1,"tzm":120}}

{"body":{"data":{"act":"stop"}},"header":{"channel":"iOS","reqid":"XXXXXX","ts":"XXXXXX","ver":"0.0.50","m":"request","pri":1,"tzm":120}}

{"body":{"data":{"act":"pause"}},"header":{"channel":"iOS","reqid":"XXXXXX","ts":"XXXXXX","ver":"0.0.50","m":"request","pri":1,"tzm":120}}

{
"app": {
"id": "ecovacs"
},
"auth": {
"realm": "ecouser.net",
"resource": "IOS581F4F7G8",
"token": "XXXXX,
"userid": "XXXXX",
"with": "users"
},
"cmdName": "GetWKVer",
"payload": {},
"payloadType": "j",
"td": "q",
"toId": "XXXXX",
"toRes": "2TWb",
"toType": "lf3bn4"
}

@edenhaus
Copy link
Contributor

The important part is probably "cmdName": "GetWKVer",, but there must be different commands for cleaning.
Until now I now the following cleaning commands clean and clean_V2

@DieterKoblenz
Copy link

I've finally had some time to enter the game using mitmproxy.

The ecovacs deebot x2 also uses clean_v2:
This is where I clean three rooms:

POST https://api-ngiot.dc-eu.ww.ecouser.net/api/iot/endpoint/control?<redacted>&apn=clean_V2&fmt=j HTTP/2.0

{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,0;1,1;1,2"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"B5tzsN","ts":"1718695345068","tzm":120,"ver":"0.0.22"}}

And this is the stop command:

POST https://api-ngiot.dc-eu.ww.ecouser.net/api/iot/endpoint/control<redacted>l&apn=clean_V2&fmt=j HTTP/2.0

{"body":{"data":{"act":"stop"}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"AcsiQj","ts":"1718695488122","tzm":120,"ver":"0.0.22"}}

@bakernigel
Copy link

bakernigel commented Jul 22, 2024

I just bought a Ecovacs Deebot X2 Omni on the Amazon Prime day. Most items are working with HA (including the map) except the following commands. They all use clean_v2. I managed to capture the commands using mitmproxy.

`Start - no specific rooms
POST https://api-ngiot.dc-na.ww.ecouser.net/api/iot/endpoint/control?si=xxx&apn=clean_V2&fmt=j HTTP/2.0
{"body":{"data":{"act":"start","content":{"type":"auto"}}},"header":{"channel":"iOS","reqid":"mFzbaJ","ts":"1721578377422","ver":"0.0.50","m":"request","pri":1,"tzm":-420}}

Pause
POST https://api-ngiot.dc-na.ww.ecouser.net/api/iot/endpoint/control?si=xxx&apn=clean_V2&fmt=j HTTP/2.0
{"body":{"data":{"act":"pause"}},"header":{"channel":"iOS","reqid":"XJJVQC","ts":"1721501740569","ver":"0.0.50","m":"request","pri":1,"tzm":-420}}

Resume
POST https://api-ngiot.dc-na.ww.ecouser.net/api/iot/endpoint/control?si=xxx&apn=clean_V2&fmt=j HTTP/2.0
{"body":{"data":{"act":"resume"}},"header":{"channel":"iOS","reqid":"WkPeTw","ts":"1721683540650","ver":"0.0.50","m":"request","pri":1,"tzm":-420}}

Stop
POST https://api-ngiot.dc-na.ww.ecouser.net/api/iot/endpoint/control?si=xxx&apn=clean_V2&fmt=j HTTP/2.0
{"body":{"data":{"act":"stop"}},"header":{"channel":"iOS","reqid":"STGBNz","ts":"1721578535395","ver":"0.0.50","m":"request","pri":1,"tzm":-420}}

Clean laundry room only (room number 6)
POST https://api-ngiot.dc-na.ww.ecouser.net/api/iot/endpoint/control?si=xxx&apn=clean_V2&fmt=j HTTP/2.0
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,6"}}},"header":{"channel":"iOS","reqid":"FWIpXR","ts":"1721578761142","ver":"0.0.50","m":"request","pri":1,"tzm":-420}}

Clean two rooms (14 & 11)
POST https://api-ngiot.dc-na.ww.ecouser.net/api/iot/endpoint/control?si=xxxxxx&apn=clean_V2&fmt=j HTTP/2.0
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,14;1,11"}}},"header":{"channel":"iOS","reqid":"fAlguy","ts":"1721683330589","ver":"0.0.50","m":"request","pri":1,"tzm":-420}}

`
Please let me know if any more info is needed.

@edenhaus
Copy link
Contributor

Please feel free to extend the client library at https://github.com/DeebotUniverse/client.py

@bakernigel
Copy link

bakernigel commented Aug 1, 2024

The attached code files fix stop, start and pause for the X2 Omni. Tested with my X2.
Not sure best way to add clean a specific room.
As a workaround the following will clean room number 6 for example:

service: vacuum.send_command
target:
  entity_id: vacuum.deebot
data:
  command: clean_V2
  params:
    act: start
    content:
      type: freeClean
      value: 1,6

clean.py.txt
e6ofmn.py.txt

I'm not familiar with how changes are promoted to Github.

@qbushome
Copy link

qbushome commented Aug 4, 2024

@edenhaus
Hi, I also don't know how Github works, but I found this post, just after you closed this issue. Maybe this is of any help to you. Since @bakernigel didn't mention you, I just thought I could. If this is not the way this works, I'm sorry.

@edenhaus
Copy link
Contributor

edenhaus commented Aug 5, 2024

As I'm following any changes of this issue, pinging me will not help.
I created DeebotUniverse/client.py#552 from the files above, can someone please test it and give me feedback directly in the PR. Thanks

@mgguinne
Copy link

mgguinne commented Aug 14, 2024

It confirmed working for me in my Hass Dev instance :) Great work !!!
What's the next step to get this merged in Hass?
Anyway to merge the code into my production instance, it's clear to me it won't break it!

@sebcbien37
Copy link

Hi, could you push the update ? Thanks.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.