Open Ulfmerbold2000 opened 2 months ago
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"}}
https://github.com/home-assistant/core/issues/110177
This is the AI Intelligent Hosting command start:
{"body":{"data":{"act":"start","content":{"type":"entrust"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"QSxQGy","ts":"1718695963637","tzm":120,"ver":"0.0.22"}}
This is a single room vacuum only:
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,0"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"wRrYAR","ts":"1718696053617","tzm":120,"ver":"0.0.22"}}
Thanks, @DieterKoblenz for analyzing it :)
Unfortunately, it looks like Ecovacs changed the API/endpoints again.
Currently, we use the following endpoint https://portal-eu.ecouser.net/api/iot/devmanager.do
and the command is in the payload
From your analysis, it looks like there is a new endpoint https://api-ngiot.dc-eu.ww.ecouser.net/api/iot/endpoint/control
and we need to pass the command as query param.
If <redacted>
was the token, then also the authentication has changed, and there is a lot more analysis needed.
Hi, do you need help ? I don't know if I can help you, but I can try !
Help is always welcome :) I don't have the model so I can't analyze the traffic between the app and the ecovacs servers
Click on start
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,4;1,1"}}},"header":{"channel":"iOS","reqid":"QwYzgr","ts":"1719048898865","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
{ "auth": { "realm": "ecouser.net", "resource": "IOS581F4F7G8", "token": "XXX", "userid": "XXXX", "with": "users" }, "channel": "c_appstore", "country": "FR", "defaultLang": "en", "device": { "did": "018348f0-6893-457b-ad08-87946a9f64c5", "mid": "lf3bn4", "res": "2TWb", "sn": "XXXX" }, "et1": "1719048899263", "lang": "FR", "location": [ "nps_pop" ], "reqid": "FPFfHp2y", "tags": [ "lf3bn4" ], "uid": "idzlodae8a187147", "version": "v2" }
{"body":{"data":{}},"header":{"channel":"iOS","reqid":"FTOgIf","ts":"1719048899656","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
Click on Pause
{"body":{"data":{"act":"pause"}},"header":{"channel":"iOS","reqid":"CdnAiV","ts":"1719048925959","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
{"body":{"data":{}},"header":{"channel":"iOS","reqid":"sOyGAR","ts":"1719048927244","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
Click on return
{"body":{"data":{"act":"go"}},"header":{"channel":"iOS","reqid":"NIibkB","ts":"1719048977092","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
{"body":{"data":{}},"header":{"channel":"iOS","reqid":"qRFhIv","ts":"1719048978161","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
Click on stop
{"body":{"data":{"act":"stop"}},"header":{"channel":"iOS","reqid":"ZtTdIw","ts":"1719048953531","ver":"0.0.50","m":"request","pri":1,"tzm":120}}
@edenhaus , I can send you all saved messages in private. I can't do more, It's beyond my skills.
I'm currently short on time for the next month at least. So if someone will step in, feel free to do it
Checks
The problem
Since Map generation works smoothly now i tried to program something in HA with my bot.
Poorly you can only command him to send his position and to return to station. Cleaning commands are fully ignored...vacuum only, mop and all other variants same negative result
This is far over my skills :/
On which deebot device (vacuum) you have the issue?
Deebot X2 Omni
Which version of the deebot-client are you using?
7.2.0
Country
de
Continent
eu
Anything in the logs that might be useful for us?
Additional information
This happens in automations and directly by the vacuum entity over the integration of Ecovacs