Roborock S8 Vac & Mop mode

I am using the Roborock integration and with a push of a button (ikea rodret) the Roborock S8 starts cleaning the kitchen.
But the problem is that it uses the Vac & Mop action which has been selected last time in the app.
How can I set the vac and mop intensity in home assistant?
I uses some get commands from the Api documentation .
I could find out that there is a “fan_power” parameter which can take values from 101 to 104 which seem to represent the vacuum power. How can I set this value from Home Assistant?
The “mop_mode” is always 300 not sure what to do with this value.

I use this hacs integration for roborock. You can choose the mop intensity and don’t need api.
For vacuum intensity you can check roborock entity states and should give you all vacuum options.
I have this

fan_speed_list: off, quiet, balanced, turbo, max, custom, max_plus

This is the same as in app and you can call your fan speed something like

  - service: vacuum.set_fan_speed
    metadata: {}
    data:
      fan_speed: max
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
3 Likes

Thanks, this worked for the fan!
But what about the mop?
I could find it in the states but how do I set it?

Roborock entitiy has, at least in my case, exposed
Mop mode list standard, deep, deep_plus, fast, custom, and
Mop intensity list off, low, medium, high, custom, custom_water_flow
I’m using vacuum card that has exposed all vacuum and mop settings and can use roborock entity for automations ti set up mop intensity and water flow.

1 Like

Thanks this worked!
This is my final config:

I don’t know about your model but I have q revo model. In my usage I noticed that it works the best if you send it to vacuum first and than do the mopping.
Was struggling a bit because I wanted different settings depending on if it is workday or weekend and different settings for vacuum and mop.
The goal was / is to send it to vacuum first and after it finished vacuuming and emptying the bin to start mopping with different settings.
I use scripts in automations for it like this

alias: Roborock Q Revo workday vacuum
sequence:
  - service: vacuum.start
    metadata: {}
    data: {}
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: select
    entity_id: 96c594f7c97134ea85878f3e661bba77
    type: select_option
    option: "off"
  - service: vacuum.set_fan_speed
    metadata: {}
    data:
      fan_speed: max
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
mode: single
icon: mdi:robot-vacuum

and

alias: Roborock Q Revo  workday mop
sequence:
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: vacuum
    entity_id: 4d6f99f3ea37aa4ed067f0e7964a9e48
    type: clean
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: select
    entity_id: 96c594f7c97134ea85878f3e661bba77
    type: select_option
    option: high
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: select
    entity_id: 99496c23a3343a7097e5d2f4c981745a
    type: select_option
    option: deep
mode: single
icon: mdi:robot-vacuum

and automation for vacuuming

alias: Roborock Q Revo workday vacuum
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.night
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition:
  - condition: state
    entity_id: binary_sensor.workday_sensor
    state: "on"
  - condition: numeric_state
    entity_id: sensor.kitchen_presence_time
    above: 1
action:
  - service: script.roborock_q_revo_workday_vacuum
    data: {}
mode: single

and moping

alias: Roborock Q Revo workday mop
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.roborock_q_revo_cleaning_5m
    for:
      hours: 0
      minutes: 5
      seconds: 0
    below: 0.5
condition:
  - condition: time
    after: "00:10:00"
    before: "01:00:00"
    weekday:
      - tue
      - wed
      - thu
      - fri
      - sat
action:
  - service: script.roborock_q_revo_workday_mop
    data: {}
mode: single

After trying different things on how to determine if the robot is finished vacuuming and emptied the bin I found a solution using measureit integration and making template like this in

{{ is_state('vacuum.roborock_q_revo', 'cleaning') }}
1 Like

Hi @ddaniel
Do you still use same approach to figure out if it is done with vacuum before start mopping? Could you please elaborate a little more How do you done it? I am struggling with the same issue. Thanks

Oke, I will try. This is what I want to achieve. I want vacuum to start vacuuming and after it finished vacuuming to go and start mopping. I configure it to do vacuuming and moping during the night when, usually everyone is at bed, because always someone is wondering around the house.
I created two automations, one for vacuuming and another for mopping. They both call script for vacuuming and mopping.
This is vacuuming automation

alias: Roborock Q Revo workday vacuum
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.night
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 0
condition:
  - condition: state
    entity_id: binary_sensor.workday_sensor
    state: "on"
  - condition: numeric_state
    entity_id: sensor.kitchen_presence_time
    above: 1
action:
  - service: script.roborock_q_revo_workday_vacuum
    data: {}
mode: single

This is triggered by a helper night. I configure it to turn on night in 23:50
This is script for vacuuming

alias: Roborock Q Revo workday vacuum
sequence:
  - service: vacuum.start
    metadata: {}
    data: {}
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: select
    entity_id: 96c594f7c97134ea85878f3e661bba77
    type: select_option
    option: "off"
  - service: vacuum.set_fan_speed
    metadata: {}
    data:
      fan_speed: max
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
  - service: roborock.vacuum_clean_zone
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
    data:
      repeats: 1
      zone:
        - 17
        - 16
        - 18
        - 20
        - 21
mode: single
icon: mdi:robot-vacuum

When roborock is vacuuming mop is turned off.
When it finish vacuuming I want it to start mopping.
This is automation for mopping

alias: Roborock Q Revo workday mop
description: ""
trigger:
  - platform: numeric_state
    entity_id:
      - sensor.roborock_q_revo_cleaning_5m
    for:
      hours: 0
      minutes: 5
      seconds: 0
    below: 0.5
condition:
  - condition: time
    after: "00:10:00"
    before: "01:00:00"
    weekday:
      - tue
      - wed
      - thu
      - fri
      - sat
action:
  - service: script.roborock_q_revo_workday_mop
    data: {}
mode: single

This is triggered by this sensor that I created using measureit integration. Simply because I don’t have to restart home assistant every time I want some sensor to load. Basically what this does is measuring time passed when vacuum status change from cleaning to docked, if I remember correctly, to measure elapsed time when it stopped cleaning. I set it to 5 minutes. What I wanted to do with this sensor is to trigger mopping after vacuuming is finished, but to run only at specific time. And also leave it enough time to empty the bin.
For mopping I’m also using script like this

alias: Roborock Q Revo  workday mop
sequence:
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: vacuum
    entity_id: 4d6f99f3ea37aa4ed067f0e7964a9e48
    type: clean
  - service: vacuum.set_fan_speed
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
    data:
      fan_speed: "off"
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: select
    entity_id: 96c594f7c97134ea85878f3e661bba77
    type: select_option
    option: medium
  - device_id: 18c39ab34f0df0106d47227a8b9afca7
    domain: select
    entity_id: 99496c23a3343a7097e5d2f4c981745a
    type: select_option
    option: deep
  - service: roborock.vacuum_clean_segment
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
    data:
      segments:
        - 17
      repeats: 2
  - delay:
      hours: 0
      minutes: 25
      seconds: 0
      milliseconds: 0
  - service: roborock.vacuum_clean_segment
    target:
      device_id: 18c39ab34f0df0106d47227a8b9afca7
    data:
      repeats: 1
      segments:
        - 16
        - 18
        - 20
        - 21
mode: single
icon: mdi:robot-vacuum

And i created different mopping and vacuuming script for weekend and workdays. This script is mopping kitchen twice and everything else once, but there is no need for that. I have a need for that as everyone is spilling in the kitchen.

Thanks a lot for the explanation

No problem. Hope you will get your to work as you wanted. There are some helpers and other conditions, but I hope you get the mains.

Thanks. The only thing I didn’t fully get my head around yet (and the main issue) is the time measurement (using measureit) when teh vacuum changes state from cleaning to docked

You will have to experiment a bit because I don’t remember all the details.
This is value template that works for me

{{ is_state('vacuum.roborock_q_revo', 'cleaning') }}

This is value template for sensor will check if vacuum is cleaning and I set sensor to do it every 5 min.

And this is vaule template that will check if vacuum is docked. Also use 5 min duration.

{{ is_state('vacuum.roborock_q_revo', 'docked') }}

Wanted to join in on the discussion and share what I did to automate both vacuuming and mopping. I got the S8 Pro Ultra. Had it for about a month. I already owned a smart vac so much of my automation was ready in place. The goal here was to get the S8 to vacuum only and then mop separately. To do this I’m using the Roborock app and the official HA Roborock integration.

Step 1 was to get the S8 to vac only. To achieve this all I had to do was create an action to change the Mop intensity from intense to off.

Step 2, mopping. This was a bit trickier. First, I had to figure out how to do a room select in HA. Per the HA documentation you can do this by using the vacuum send command | app_segment_clean. This will require getting the ID for each room. After some search I found that room ID’s start at 16 and counts up from there (17,18 19, etc). So which ID corresponds to each room. Easy, just go to Developer Tools | Services and use the below yaml

service: vacuum.send_command
data:
  command: app_segment_clean
  params:
    - segments:
        - 16 #room ID
target:
  entity_id: vacuum.s7_roborock #change to the ID of your vacuum

When you call the service, you should hear the vacuum announce that it’s in room select and it should go to the room for that ID.

The next hurdle was putting the S8 into mop mode. This took a bit of searching to figure out. I found that you can use the vacuum send command, but this time use set_custom_mode. The default parameter is 300. This will set the vacuum to vac & mop. Parameter 105 will set to mop. To test go back to Developer Tools | Services and use the below yaml

service: vacuum.send_command
target:
  entity_id: vacuum.rocky #change to your vacuum
data:
  command: set_custom_mode
  params: 105 #105 for mop only 300 for mop & vac

You should hear the bell chime when you call the service. You can verify the change was made by going into the app.

At this point it was just a matter of putting the pieces together and building the automation.

Below is a copy of my mop automation.

alias: "Vacuum: mop"
description: ""
trigger:
  - platform: time
    at: "00:00:00"
condition: []
action:
  - service: select.select_option
    metadata: {}
    data:
      option: intense
    target:
      entity_id: select.rocky_mop_intensity
    alias: Set mop to intense
  - service: vacuum.send_command
    target:
      entity_id: vacuum.rocky
    data:
      params: 105
      command: set_custom_mode
    alias: Set mode to mop
  - service: vacuum.send_command
    data:
      command: app_segment_clean
      params:
        - segments:
            - 16
    target:
      entity_id: vacuum.rocky
    alias: Room select to kitchen
mode: single

Hope this all makes sense and it helpful.

@billyjoebob999 do you use another approach to determine when it’s finished vaccuming and ready to mop?

No, it wasn’t a goal of mine to have it vacuum and them mop when to vacuuming was done. I have it set to vacuum once a day when no one is home and then mop every night at midnight. This works well enough for me.

Thinking about it I might go about this way, When the robot is done vacuuming the status will change to “returning to dock”. At that point I would probably have it trigger a helper switch. I would want it to empty the waste bin before mopping and maybe to charge the battery. Might setup the automation like this:

trigger:
charge robot xx%

condition:
helper switch is on

action:
start mop select room

turn off helper switch

In theory I would think this work but I don’t know

105 works indeed, but as soon as I send the command 301 for deep mopping or 203 for high scrub intensity the vacuum gets enabled again. it looks like the commands for those values changed somehow, as it was working before…

Everything is working just fine for me. My automation is set to turn off vacuum, set mop to intense, and then room select. I did find that adding a 1 second delay in between each send command yielded better results otherwise come commands were not received. My yaml below.

      - alias: Set mop to intense
        service: vacuum.send_command
        target:
          entity_id: vacuum.rocky
        data:
          command: set_water_box_custom_mode
          params: 203
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
          milliseconds: 0
      - service: vacuum.send_command
        metadata: {}
        data:
          command: set_custom_mode
          params: 105
        target:
          entity_id: vacuum.rocky
        alias: Set to mop only
      - delay:
          hours: 0
          minutes: 0
          seconds: 1
          milliseconds: 0
      - service: vacuum.send_command
        metadata: {}
        data:
          command: app_segment_clean
          params:
            - segments:
                - 16
                - 22
1 Like

i did not realize i need to use different commands… thanks, is working now