Skip to content

In HA my X5 Pro did'nt accept cleaning commands (rcp not support error) #845

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

Open
4 tasks done
blueroseslol opened this issue Mar 6, 2025 · 10 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@blueroseslol
Copy link

Checks

  • I have searched the existing issues and no issue is describing my issue
  • I have checked the FAQ
  • I have checked the documentation
  • I have installed the latest version

The problem

Map generation works smoothly.
Can only command him to send his position and to return to station.
Cleaning commands are fully ignored

Looks like #492

On which deebot device (vacuum) you have the issue?

DEEBOT X5 PRO (3sp2in)

Which version of the deebot-client are you using?

1.74.0

Country

China

Continent

Asia

Anything in the logs that might be useful for us?

Start
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"start","content":{"type":"auto"}}},"header":{"channel":"iOS","reqid":"RIzVHS","ts":"1741248430546","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

Pause
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"pause"}},"header":{"channel":"iOS","reqid":"yepkRW","ts":"1741248436662","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

Resume
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"resume"}},"header":{"channel":"iOS","reqid":"nYtIgx","ts":"1741248438194","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

Stop
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"stop"}},"header":{"channel":"iOS","reqid":"EiLUjr","ts":"1741248516782","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

AI Clean Start
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"start","content":{"type":"entrust"}}},"header":{"channel":"iOS","reqid":"pSKuSb","ts":"1741249424264","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

Charge
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"go"}},"header":{"channel":"iOS","reqid":"GDJHxj","ts":"1741249495751","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

This is a single room vacuum only:
https://api-ngiot.dc-cn.cn.ecouser.net/api/iot/endpoint/control?si=<redacted>&apn=clean_V2&fmt=j
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,0"}}},"header":{"channel":"iOS","reqid":"MMTIad","ts":"1741249568936","ver":"0.0.50","m":"request","pri":1,"tzm":480,"tzc":"Asia\/Shanghai"}}

Additional information

config_entry-ecovacs-01JMPW5P2M96E6ND4G3XEDEVNJ.json
home-assistant_ecovacs_2025-03-05T02-12-32.445Z.log

@blueroseslol blueroseslol added the bug Something isn't working label Mar 6, 2025
@blueroseslol
Copy link
Author

I use
ln -svfT lr4qcs.py 3sp2in.py
HA has show my deetbot.

@STRHOME
Copy link

STRHOME commented Apr 9, 2025

My model is DEEBOT X8 PRO PLUS AI. Is it similar to X5 Pro Omini (lr4qcs. py). If they are similar, may I ask how to create a symbolic link between the model and similar models, and how to operate it specifically? Please guide me, thank you!

@blueroseslol
Copy link
Author

blueroseslol commented Apr 9, 2025

My model is DEEBOT X8 PRO PLUS AI. Is it similar to X5 Pro Omini (lr4qcs. py). If they are similar, may I ask how to create a symbolic link between the model and similar models, and how to operate it specifically? Please guide me, thank you!

It's hard to say if it's the same, but I think the functionality is similar enough to try it out.

I used Docker to build HomeAssistant. here are the steps for reference:

  1. go to the container's CMD, docker exec -it sh
  2. cd /usr/local/lib/python3.13/site-packages/deebot_client/hardware/deebot
  3. ln -svfT lr4qcs.py 3sp2in.py

If your model doesn't exist, check the log for the corresponding model. And run:
ln -svfT xxxxxx.py 3sp2in.py

@STRHOME
Copy link

STRHOME commented Apr 9, 2025 via email

@STRHOME
Copy link

STRHOME commented Apr 11, 2025 via email

@blueroseslol
Copy link
Author

I am using Hass OS, but I couldn't find deebot_client/hardware/demo under packages. Do I need to manually add it?---- Replied Message @.>Date04/09/2025 16:37 @.> @.>@.>SubjectRe: [DeebotUniverse/client.py] In HA my X5 Pro did'nt accept cleaning commands (rcp not support error) (Issue #845)

My model is DEEBOT X8 PRO PLUS AI. Is it similar to X5 Pro Omini (lr4qcs. py). If they are similar, may I ask how to create a symbolic link between the model and similar models, and how to operate it specifically? Please guide me, thank you!

It's hard to say if it's the same, but I think the functionality is similar enough to try it out.
I used Docker to build HomeAssistant. here are the steps for reference:

go to the container's CMD
cd /usr/local/lib/python3.13/site-packages/deebot_client/hardware/deebot
ln -svfT lr4qcs.py 3sp2in.py

If your model doesn't exist, check the log for the corresponding model. And run:
ln -svfT xxxxxx.py 3sp2in.py—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

blueroseslol left a comment (DeebotUniverse/client.py#845)

My model is DEEBOT X8 PRO PLUS AI. Is it similar to X5 Pro Omini (lr4qcs. py). If they are similar, may I ask how to create a symbolic link between the model and similar models, and how to operate it specifically? Please guide me, thank you!

It's hard to say if it's the same, but I think the functionality is similar enough to try it out.
I used Docker to build HomeAssistant. here are the steps for reference:

go to the container's CMD
cd /usr/local/lib/python3.13/site-packages/deebot_client/hardware/deebot
ln -svfT lr4qcs.py 3sp2in.py

If your model doesn't exist, check the log for the corresponding model. And run:
ln -svfT xxxxxx.py 3sp2in.py

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

[
{
@.": "http://schema.org",
@.
": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "#845 (comment)",
"url": "#845 (comment)",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.
": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

Sorry,i'm never used HomeAssistantOS.But try looking at the debug logs as well.

@slflowfoon
Copy link

Writing a python script using CleanV2 instructs the robovac to start cleaning

import aiohttp
import asyncio
import logging
import time

from deebot_client.api_client import ApiClient
from deebot_client.authentication import Authenticator, create_rest_config
from deebot_client.commands.json.clean import CleanAction, CleanV2
from deebot_client.events import BatteryEvent
from deebot_client.mqtt_client import MqttClient, create_mqtt_config
from deebot_client.util import md5
from deebot_client.device import Device

device_id = md5(str(time.time()))
account_id = "your email or phonenumber (cn)"
password_hash = md5("yourPassword")
country = "DE"


async def main():
  async with aiohttp.ClientSession() as session:
    logging.basicConfig(level=logging.DEBUG)
    rest_config = create_rest_config(session, device_id=device_id, alpha_2_country=country)

    authenticator = Authenticator(rest_config, account_id, password_hash)
    api_client = ApiClient(authenticator)

    devices_ = await api_client.get_devices()

    bot = Device(devices_[0], authenticator)

    mqtt_config = create_mqtt_config(device_id=device_id, country=country)
    mqtt = MqttClient(mqtt_config, authenticator)
    await bot.initialize(mqtt)

    # Execute commands
    await bot.execute_command(CleanV2(CleanAction.START))

if __name__ == '__main__':
  loop = asyncio.get_event_loop()
  loop.create_task(main())
  loop.run_forever()

@slflowfoon
Copy link

slflowfoon commented Apr 15, 2025

So far, I've been able to find that the following commands work:
Cleaning Mode:

await bot.execute_command(SetWorkMode(WorkMode.MOP_AFTER_VACUUM))

[<WorkMode.VACUUM_AND_MOP: 0>, <WorkMode.VACUUM: 1>, <WorkMode.MOP: 2>, <WorkMode.MOP_AFTER_VACUUM: 3>]

Suction Power:

await bot.execute_command(SetFanSpeed(FanSpeedLevel.MAX_PLUS))

[<FanSpeedLevel.QUIET: 1000>, <FanSpeedLevel.NORMAL: 0>, <FanSpeedLevel.MAX: 1>, <FanSpeedLevel.MAX_PLUS: 2>]

Cleaning Passes:

await bot.execute_command(SetCleanCount(1))

[<1>, <2>]

Start Cleaning:

await bot.execute_command(CleanV2(CleanAction.START))

Maybe someone with a big more Python knowledge can implement these:
Water Flow Rate: customAmount appears to be the set value

Topic: iot/atr/onWaterInfo/<did>/n0vyif/N77sTJy1/j
Payload:
{"body":{"data":{"customAmount":10,"enable":1,"mopCount":2,"sideMop":0,"sweepType":1,"type":1}},"header":{"fwVer":"1.101.0","hwVer":"0.1.1","pri":1,"ts":"1744734574192","tzm":480,"ver":"0.0.1","wkVer":"0.1.54"}}

Cleaning Speed:

Topic: iot/atr/onCustomAreaMode/<did>/n0vyif/N77sTJy1/j
Payload:
{"body":{"data":{"sweepMode":1}},"header":{"fwVer":"1.101.0","hwVer":"0.1.1","pri":1,"ts":"1744734272721","tzm":480,"ver":"0.0.1","wkVer":"0.1.54"}}

Set Area: value appears to be how specific rooms are selected. 1,0 was my office and 1.1 was my kitchen

Topic: iot/p2p/clean_V2/<did>/n0vyif/N77sTJy1/HelperMQClientId-sts-ngiot-mqserver-eco0-4/ecosys/1234/p/riRh/j
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,0"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"Watb6n","ts":"1744735315488","tzc":"Europe/London","tzm":60,"ver":"0.0.22"}}

Topic: iot/p2p/clean_V2/<did>/n0vyif/N77sTJy1/HelperMQClientId-sts-ngiot-mqserver-eco0-4/ecosys/1234/p/riRh/j
{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,1"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"FhY7rH","ts":"1744735616838","tzc":"Europe/London","tzm":60,"ver":"0.0.22"}}

Will continue to update this as I discover more.

@slflowfoon
Copy link

I've been able to implement room clean and scenario clean by adding the following to models.py under CleanMode (L83):

    FREE_CLEAN = "freeClean"
    SCENARIO_CLEAN = "qcClean"
    await bot.execute_command(CleanAreaV2(CleanMode.FREE_CLEAN, "1,0"))
    await bot.execute_command(CleanAreaV2(CleanMode.SCENARIO_CLEAN, "5638"))

If you add the below to mqtt_client.py under line 248, then when you make a request from your app. you can see the value for each room or scenario:

        _LOGGER.info("FULL MQTT MESSAGE:\nTopic: %s\nPayload:\n%s", message.topic, message.payload.decode("utf-8", errors="replace"))
        self._last_message_received_at = datetime.now()

For example, freeClean, 1.3 is to clean my Living Room:

{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,3"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"FhY7rH","ts":"1744735616838","tzc":"Europe/London","tzm":60,"ver":"0.0.22"}}

qcClean, 5395 is to start a scenario:

{"body":{"data":{"content":{"type":"qcClean","value":"5395"},"act":"start"}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"8XEXbC","ts":"1744822549783","tzc":"Europe/London","tzm":60,"ver":"0.0.22"}}

Also added the below to models.py below line 73 to stop and return the robovac to the station:

    STOP_AND_RETURN = "stop_and_return"

@blueroseslol
Copy link
Author

我已经能够通过在(L83)下添加以下内容来实现房间清洁场景清洁:models.py``CleanMode

    FREE_CLEAN = "freeClean"
    SCENARIO_CLEAN = "qcClean"
    await bot.execute_command(CleanAreaV2(CleanMode.FREE_CLEAN, "1,0"))
    await bot.execute_command(CleanAreaV2(CleanMode.SCENARIO_CLEAN, "5638"))

如果您将以下内容添加到第 248mqtt_client.py行,那么当您从应用程序发出请求时,您可以看到每个房间或场景的值:****

        _LOGGER.info("FULL MQTT MESSAGE:\nTopic: %s\nPayload:\n%s", message.topic, message.payload.decode("utf-8", errors="replace"))
        self._last_message_received_at = datetime.now()

例如,freeClean1.3清洁我的客厅:

{"body":{"data":{"act":"start","content":{"type":"freeClean","value":"1,3"}}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"FhY7rH","ts":"1744735616838","tzc":"Europe/London","tzm":60,"ver":"0.0.22"}}

qcClean5395就是开始一个场景:

{"body":{"data":{"content":{"type":"qcClean","value":"5395"},"act":"start"}},"header":{"channel":"Android","m":"request","pri":2,"reqid":"8XEXbC","ts":"1744822549783","tzc":"Europe/London","tzm":60,"ver":"0.0.22"}}

还将以下内容添加到第 73 行models.py以下,以停止并将机器人吸尘器返回到站点:****

    STOP_AND_RETURN = "stop_and_return"

I can generally understand your code. But I would like to know how to fix the inability to execute Clean in HA and what files need to be changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants