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

Add Mopping Mode selection #443

Open
1 task done
Rhapsodyan opened this issue Sep 25, 2023 · 5 comments
Open
1 task done

Add Mopping Mode selection #443

Rhapsodyan opened this issue Sep 25, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@Rhapsodyan
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and no issue is describing my feature request or idea

Is your feature request related to a problem?

Hi,
thanks for your wonderful work.
I've an Ecovacs X10 OMNI and I've seen that there's no option for "Mopping Mode" (Standard/Deep) in your integration.
I would like to add this option.

Suggested solution

I've sniffed the traffic between Ecovacs app and Ecovacs servers and I've found the command sent. See Api example request.

Api example request

{
    "app": {
        "id": "ecovacs"
    },
    "auth": {
        "realm": "ecouser.net",
        "resource": "XXXXX",
        "token": "XXXXX",
        "userid": "XXXXX",
        "with": "users"
    },
    "cmdName": "setCustomAreaMode",
    "payload": {
        "body": {
            "data": {
                "sweepMode": 1
            }
        },
        "header": {
            "pri": 1,
            "ts": "1695644868714",
            "tzm": 120,
            "ver": "0.0.50"
        }
    },
    "payloadType": "j",
    "td": "q",
    "toId": "REDACTED",
    "toRes": "TNLD",
    "toType": "1vxt52"
}

Alternatives you've considered

No response

Additional information

Let me know if you need more informations to add this feature.
Thanks!

@Rhapsodyan Rhapsodyan added the enhancement New feature or request label Sep 25, 2023
@Rhapsodyan
Copy link
Author

Additional details:
"sweepMode": 1 corresponds to Deep
"sweepMode": 0 corresponds to Standard

@edenhaus
Copy link
Contributor

As my bot does not have this option, I have some additional questions:

  • Are you setting this option in the settings or for each cleaning cycle?
  • Can you please share a screenshot of the option (Please select English as language first)

@Rhapsodyan
Copy link
Author

Hi,
I set this in the Cleaning Preferences, where other options such as Suction Power and Cleaning Times resides.
Here’s a screenshot from the app:

IMG_7958

@NEVdataDyne
Copy link

NEVdataDyne commented Sep 29, 2023

This feature request is included in issue #441 but with a third sweep mode called «fast» for some robots such as the T20 omni

@edenhaus edenhaus transferred this issue from DeebotUniverse/Deebot-4-Home-Assistant Feb 27, 2024
@Ulfmerbold2000
Copy link
Contributor

Ulfmerbold2000 commented May 22, 2024

In the ecovacs-deebot.js this command implemented in the setWaterinfo command for the 950-type robots(they differentiate beween 950-types and non950-types)

/**
 * Sets the 'Water Flow Level'
 * (and the 'Scrubbing Pattern' for a few models)
 * @extends VacBotCommand
 */
class SetWaterLevel extends VacBotCommand {
    constructor(level, sweepType = 0) {
        // 'Water Flow Level'
        const payload = {
            'amount': level
        };
        // 'Scrubbing Pattern' (e.g. OZMO T8 AIVI)
        // 1 = 'Quick Scrubbing'
        // 2 = 'Deep Scrubbing'
        if ((sweepType === 1) || (sweepType === 2)) {
            Object.assign(payload, {'sweepType': sweepType});
        }
        super('setWaterInfo', payload);
    }
}

In my logs i found corresponding messages:

[deebot_client.mqtt_client] Got message: topic=iot/atr/onWaterInfo/310b014d-e138-4268-b4f2-eea7bc4bebfa/lf3bn4/hOdT/j, payload=b'{"header":{"pri":1,"tzm":120,"ts":"1716364281938","ver":"0.0.1","fwVer":"1.76.0","hwVer":"0.1.1","wkVer":"0.1.54"},"body":{"data":{"amount":3,"enable":1,"sweepType":1,"type":1}}}'

[deebot_client.device] Try to handle message onWaterInfo: b'{"header":{"pri":1,"tzm":120,"ts":"1716364281938","ver":"0.0.1","fwVer":"1.76.0","hwVer":"0.1.1","wkVer":"0.1.54"},"body":{"data":{"amount":3,"enable":1,"sweepType":1,"type":1}}}'

[deebot_client.messages] Falling back to legacy way for onWaterInfo

[deebot_client.event_bus] Event is the same! Skipping (WaterInfoEvent(amount=<WaterAmount.HIGH: 3>, mop_attached=True))

But i can't "write" nor expand that script for python...hardly missing skills in java and python :/

imho just needed an extension of the water_info.py and the _mqtt_params of the class SetWaterInfo needs an "OR" to diffentiate the payload from amount and sweepType of that command

Should be {"amount":3,"enable":1,"sweepType":1,"type":1} where the amount leads to the setwaterinfo command...
"enable" could be the mop attached message and
"sweepType" is the magic part missing
what that "type" is, idk

Btw what that "falling back to legacy way" means and what the non legacy way could be, i have no clue but would be cool to know


Question:
IS something like

@dataclass(frozen=True)
class onWaterInfo(EnableEvent):
    """onWaterInfo event."""
    amount: int
    enable: int
    sweepType: int
    type: int

in the init.py under events a thing what needed?

and in the water_info.py something like:

@unique
class sweepType(IntEnum):
    """Enum class for all possible sweeping Methods."""

    # Values should be sort from low to high on their meanings
    Off = 0
    Standard = 1
    Deep = 2

Makes this sense to start with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants