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

Add the switch between "mop" and "vacuum and mop" for X1 OMNI #492

Open js4jiang5 opened 6 months ago

js4jiang5 commented 6 months ago

Is there an existing issue for this?

Is your feature request related to a problem?

X1 OMNI does not support mop after vacuum with mop always attached. It can only change mode by manually detach the mop from the robot, which is troublesome. Vacuum and mop simultaneously results in high humidity in the dust-collecting box and become smelly in couple of weeks. I've figured out a way to achieve the function, but needs the feature of switching between "mop only" and "vacuum and mop", which can be done on ECOVACS HOME APP, so I think it should be feasible.

Suggested solution

My approach to achieve mop after vacuum without manually attach or detach the mop is as follows. The mop is always attached. (I don't have any carpet, so it's ok to keep it always attached)

Vacuum Stage:

  1. Set the mode to "vacuum and mop"
  2. Google Home call "OK, YIKO, Exit the station". YIKO leave the station with dry mop.
  3. Send spot clean command to let YIKO clean one region, and when the cleaning is done and status changed to "returning', trigger "vacuum stop".
  4. Repeat step 3 for all regions. During the vacuum stage, the mop is always dry because returning to station to wash mop is interrupted.
  5. After vacuum is done, return to the station to start the mop stage.

Mop stage:

  1. After mop washing is done, set the mode to "mop only"
  2. Start the mop stage for all regions.

What I can't do automatically is switch to "vacuum and mop" in vacuum stage, so the robot just move without vacuum. I need this function to make this "project" complete. I'll appreciate if you can implement this function. Thank you. By the way, the reason I need Google to call YIKO exit is because Exit command is also not available. It would be nice if the exit can also be added. That way Google is not necessary.

Api example request

No response

Alternatives you've considered

No response

Additional information

No response

edenhaus commented 6 months ago

It is already implemented (https://github.com/DeebotUniverse/Deebot-4-Home-Assistant/pull/449) but has yet to be released in a stable version. The only missing part is to activate it for the X1 by setting in on the capabilities file (https://github.com/DeebotUniverse/client.py/tree/dev/deebot_client/hardware/deebot). Can you open a PR for it?

js4jiang5 commented 6 months ago

It is already implemented (#449) but has yet to be released in a stable version. The only missing part is to activate it for the X1 by setting in on the capabilities file (https://github.com/DeebotUniverse/client.py/tree/dev/deebot_client/hardware/deebot). Can you open a PR for it?

Honestly I'm a newbie. I'll need some time to figure out what "open a PR" means and how to do it.

Nismonx commented 6 months ago

It is already implemented (#449) but has yet to be released in a stable version. The only missing part is to activate it for the X1 by setting in on the capabilities file (https://github.com/DeebotUniverse/client.py/tree/dev/deebot_client/hardware/deebot). Can you open a PR for it?

Honestly I'm a newbie. I'll need some time to figure out what "open a PR" means and how to do it.

The least you can do is head to #439 down load the archives to your HA and test it then report back.

That would be most helpful 👍

js4jiang5 commented 6 months ago

It is already implemented (#449) but has yet to be released in a stable version. The only missing part is to activate it for the X1 by setting in on the capabilities file (https://github.com/DeebotUniverse/client.py/tree/dev/deebot_client/hardware/deebot). Can you open a PR for it?

Honestly I'm a newbie. I'll need some time to figure out what "open a PR" means and how to do it.

The least you can do is head to #439 down load the archives to your HA and test it then report back.

That would be most helpful 👍

I'm in trouble. I downloaded and overwritten original files. After that, the deebot-4-home-assistant device in HA is shown as "not loaded". Like the picture https://i.imgur.com/9oGr7Ph.jpg I started using Home Assistant from last month, and not acquainted with it. What did I do wrong? Could it be saved?

js4jiang5 commented 6 months ago

I deleted the integration and redownloaded it to solve the issue. Since overwritten all files will cause crash, what is the right procedure to test the beta version?

js4jiang5 commented 6 months ago

Finally I found the file const.py is the one that cause loading fail. I replace all files with version #449 except const.py, but I cannot find work_mode selection in the service. The only thing that can be selected is water_amount. What should I do next?

mrbungle64 commented 6 months ago

@js4jiang5 @edenhaus

For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode).

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

js4jiang5 commented 6 months ago

@js4jiang5 @edenhaus

For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode).

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

That's fantastic.

applegeeks commented 5 months ago

@js4jiang5 @edenhaus

For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode).

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Am safe to assume that the option to swtich between MopOnly and Vac+Mop is not yet available for the X1 Omni? If it is available already on the ha release, can someone share the parameters to use? Assuming ofcourse the service call is setSweepMode?

Nismonx commented 5 months ago

@js4jiang5 @edenhaus For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode). I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Am safe to assume that the option to swtich between MopOnly and Vac+Mop is not yet available for the X1 Omni? If it is available already on the ha release, can someone share the parameters to use? Assuming ofcourse the service call is setSweepMode?

I don't see this option in the official app, infact you can't turn the vaccum off totally like in some other bots of the same generation. The options for vacuum goes from 'Quite' to 'Max+'. The mopping is managed depending on whether the pops are fitted and the ranges water level is set by the user from 'low' to 'high'.

Personally, I understand the op is trying to have a vacuum cleaning pass and then later a mopping pass to prevent wet contaminates to make a mess inside the the vacuum collection bin. But this is not a feature in the X1 (or any other vacuum of the same generation that i know off)

One way around the problem is to strategically set the cleaning routines.

Everything we own need some sort or maintenance or attention of sort....

I can check in the next couple of days if the vacuum can be turn off completely if this helps in any way.

applegeeks commented 5 months ago

@js4jiang5 @edenhaus For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode). I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Am safe to assume that the option to swtich between MopOnly and Vac+Mop is not yet available for the X1 Omni? If it is available already on the ha release, can someone share the parameters to use? Assuming ofcourse the service call is setSweepMode?

I don't see this option in the official app, in fact you can't turn the vaccum off like in some other bots. The options for vacuum goes from 'Quite' to 'Max+'. The mopping is managed depending on whether the pops are fitted and the ranges water level is set by the user from 'low' to 'high'.

Personally, I understand the op is trying to have a vacuum cleaning pass and then later a mopping pass to prevent wet contaminates to make a mess inside the the vacuum collection bin. But this is not a feature in the X1 (or any other vacuum of the same generation that i know off)

One way around the problem is to strategically set the cleaning routines.

Everything we own need some sort or maintenance or attention of sort....

It should be there for the X1 Omni model anyway. It's a separate setting to the VacMode settings. It's called Mop-Only feature that you can toggle on/off. However, it only takes effect in Vac&Mop Mode as per the app description.

Currently, I have to toggle it in the Deebot app before triggering the mop routines in HA if I only like a mop only run on the floors. Floor locations and water amount I can currently configure in the HA routines, just not enable or disabling the mop-only function.

Nismonx commented 5 months ago

@js4jiang5 @edenhaus For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode). I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Am safe to assume that the option to swtich between MopOnly and Vac+Mop is not yet available for the X1 Omni? If it is available already on the ha release, can someone share the parameters to use? Assuming ofcourse the service call is setSweepMode?

I don't see this option in the official app, in fact you can't turn the vaccum off like in some other bots. The options for vacuum goes from 'Quite' to 'Max+'. The mopping is managed depending on whether the pops are fitted and the ranges water level is set by the user from 'low' to 'high'. Personally, I understand the op is trying to have a vacuum cleaning pass and then later a mopping pass to prevent wet contaminates to make a mess inside the the vacuum collection bin. But this is not a feature in the X1 (or any other vacuum of the same generation that i know off) One way around the problem is to strategically set the cleaning routines. Everything we own need some sort or maintenance or attention of sort....

It should be there for the X1 Omni model anyway. It's a separate setting to the VacMode settings. It's called Mop-Only feature that you can toggle on/off. However, it only takes effect in Vac&Mop Mode as per the app description.

Currently, I have to toggle it in the Deebot app before triggering the mop routines in HA if I only like a mop only run on the floors. Floor locations and water amount I can currently configure in the HA routines, just not enable or disabling the mop-only function.

My bad, I've never noticed this either....

Screenshot_20240206_001818_ECOVACS HOME

js4jiang5 commented 4 months ago

@js4jiang5 @edenhaus

For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode).

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

@js4jiang5 @edenhaus

For the X1 series you need a different command/event for this functionality (SweepMode instead of WorkMode).

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Hi, @mrbungle64 It seems the DeebotUniverse is migrating to ECOVACS. Will you continue to develop the SweepMode function?

mrbungle64 commented 4 months ago

@js4jiang5

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Hi, @mrbungle64 It seems the DeebotUniverse is migrating to ECOVACS. Will you continue to develop the SweepMode function?

The SweepMode command and event was relased with version 5.1.0 of the client.py library, but it has still to be implemented in the Deebot integration (which is now part of the Ecovacs core integration). I'm not sure if I'll find the time to do this soon.

applegeeks commented 4 months ago

@js4jiang5

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Hi, @mrbungle64 It seems the DeebotUniverse is migrating to ECOVACS. Will you continue to develop the SweepMode function?

The SweepMode command and event was relased with version 5.1.0 of the client.py library, but it has still to be implemented in the Deebot integration (which is now part of the Ecovacs core integration). I'm not sure if I'll find the time to do this soon.

Can it be called as a command? If so, do you know the command and parameters to use?

mrbungle64 commented 4 months ago

@js4jiang5

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Hi, @mrbungle64 It seems the DeebotUniverse is migrating to ECOVACS. Will you continue to develop the SweepMode function?

The SweepMode command and event was relased with version 5.1.0 of the client.py library, but it has still to be implemented in the Deebot integration (which is now part of the Ecovacs core integration). I'm not sure if I'll find the time to do this soon.

Can it be called as a command? If so, do you know the command and parameters to use?

cmdName: setSweepMode payload (enable Mop-Only):

{
  "type": 1
}
applegeeks commented 4 months ago

@js4jiang5

I'll try to find the time in the next few days to implement this and create a PR (for the client.py library).

Hi, @mrbungle64 It seems the DeebotUniverse is migrating to ECOVACS. Will you continue to develop the SweepMode function?

The SweepMode command and event was relased with version 5.1.0 of the client.py library, but it has still to be implemented in the Deebot integration (which is now part of the Ecovacs core integration). I'm not sure if I'll find the time to do this soon.

Can it be called as a command? If so, do you know the command and parameters to use?

cmdName: setSweepMode payload (enable Mop-Only):

{
  "type": 1
}

perfect. Thanks! I couldnt figure out the parameter. Works now :)

applegeeks commented 4 months ago

Bit of a silly question. Anyone know how the yaml would look like to use getSweedMode command and use that to store it into an toggle entity? This is what I got at the moment but I don't think its working or if it is, not sure how to grab the value

service: vacuum.send_command
data:
  command: getSweepMode
target:
  entity_id: vacuum.lounge_vac