S7 Mop control

Yes i think you can, i’m using the following script to mop a zone twice:

mop_bijkeuken:
  alias: 'Mop: Bijkeuken'
  sequence:
  - service: xiaomi_miio.vacuum_remote_control_stop
    target:
      entity_id: vacuum.roborock_vacuum_a15
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: script.set_mopping_route
    target:
      entity_id: vacuum.roborock_vacuum_a15
    data:
      route: deep
  - service: xiaomi_miio.vacuum_clean_zone
    target:
      entity_id: vacuum.roborock_vacuum_a15
    data:
      repeats: 2
      zone:
      - - 22976
        - 21080
        - 26604
        - 22285
  mode: single
  icon: mdi:robot-vacuum
1 Like

I’m using specific room cleaning script. I wonder if it’s possible to combine it with repeats.
This is what I’m using for automate room cleaning:

      - service: vacuum.send_command
        target:
          device_id: !secret roborock_device_id
        data_template:
          command: app_segment_clean
          params: '{% set room_id = states("input_number.roborock_room_enum_" + room)
            | int %} {{ room_id }} '

This thread looks very promising - I spent a lot of time trying to get this to work a few months ago, but it looks like you guys cracked the code. Can some ELI5 how to configure this or set this up? I’ve read through the last few comments and tested all the code but it’s not working for me. But I’m probably not doing something correctly.

Ideally I would like to create a script that has a hardcoded mop route of “deep” with that I can call from an automation.

Edit: Actually, I think I got I working now. I’ll post a how-to guide shortly. Guide here: https://smarthomepursuits.com/roborock-s7-mop-control-in-home-assistant/

Here’s what I have in Lovelace - x2 input_selects for every room in my house (1 for vacuuming & 1 for mopping). I then have a reset button to change the mop route to Standard, sets scrub intensity to none, and vacuum power to max.

And for what it’s worth - since I have individual scripts for mopping each room and vacuuming each room, I was able to configure it with Google Assistant, so I can now say “Hey Google, mop the office” or “Hey Google, vacuum the master bedroom” and off she goes.

image

2 Likes

Thanks for this guys. Bought the S7 because of the possibility in this thread.

My automations (maybe useful to anyone):

- alias: 'Stofzuiger beneden'
  initial_state: 'true'
  trigger:
    platform: time
    at: '3:00:00'
  condition:
    - condition: state
      entity_id: input_boolean.vakantie
      state: 'off'
    - condition: state
      entity_id: input_boolean.stofzuiger_beneden
      state: 'on'
  action:
    - choose: 
        - conditions:
            - condition: numeric_state
              entity_id: counter.stofzuiger
              above: 1
          sequence: 
            - service: script.roborock_set_manual_mode
              target: 
                entity_id: vacuum.roborock_vacuum_a15
              data:
                vacuum: max
                mopping: 'off'
            - service: vacuum.start
              data:
                entity_id: vacuum.roborock_vacuum_a15
      default:
        - service: script.roborock_set_manual_mode
          target: 
            entity_id: vacuum.roborock_vacuum_a15
          data:
            vacuum: balanced
            mopping: 'off'
        - service: vacuum.start
          data:
            entity_id: vacuum.roborock_vacuum_a15
        - service: counter.increment
          entity_id: counter.stofzuiger

- alias: 'Stofzuiger dweilen beneden'
  initial_state: 'true'
  trigger:
    platform: time
    at: '4:00:00'
  condition:
    - condition: state
      entity_id: input_boolean.vakantie
      state: 'off'
    - condition: state
      entity_id: input_boolean.stofzuiger_beneden
      state: 'on'
    - condition: numeric_state
      entity_id: counter.stofzuiger
      above: 1
  action:
    - service: script.roborock_set_manual_mode
      target: 
        entity_id: vacuum.roborock_vacuum_a15
      data:
        vacuum: silent
        mopping: high
    - service: script.roborock_set_mopping_route
      target: 
        entity_id: vacuum.roborock_vacuum_a15
      data:
        route: deep
    - service: vacuum.start
      data:
        entity_id: vacuum.roborock_vacuum_a15
    - service: counter.increment 
      entity_id: counter.stofzuiger

- alias: 'Stofzuiger dweilen uit beneden'
  initial_state: 'true'
  trigger:
    platform: time
    at: '5:00:00'
  condition:
    - condition: state
      entity_id: input_boolean.vakantie
      state: 'off'
    - condition: state
      entity_id: input_boolean.stofzuiger_beneden
      state: 'on'
    - condition: numeric_state
      entity_id: counter.stofzuiger
      above: 1
  action:
    - service: script.roborock_set_manual_mode
      target: 
        entity_id: vacuum.roborock_vacuum_a15
      data:
        vacuum: balanced
        mopping: 'off'
    - service: script.roborock_set_mopping_route
      target: 
        entity_id: vacuum.roborock_vacuum_a15
      data:
        route: 'standard'
    - service: counter.increment 
      entity_id: counter.stofzuiger 

- alias: Stofzuiger leegmaken
  initial_state: 'true'
  trigger:
    platform: state
    entity_id: sensor.pixel_5_charger_type
    from: 'wireless'
    to: 'none'
    for: 
      minutes: 1
  condition:
    - condition: numeric_state
      entity_id: counter.stofzuiger
      above: 2
    - condition: state
      entity_id: input_boolean.stofzuiger_leegmaken_melding
      state: 'on'
  action:
    - service: notify.mobile_app_pixel_5
      data:
        title: 'Bitch'
        message: "De stofzuiger mag weer leeggemaakt worden. Die bitch staat alweer op je te wachten!"
        data:
          actions:
            - action: bitch_naar_prullenbak
              title: Terug naar dock
          color: '#F92772'
          priority: high
          ttl: 0
          channel: Bitch
          group: Bitch
          ledColor: '#F92772'
          tag: "bitchlegen"
    - service: script.turn_on
      entity_id: script.bitch_prullenbak
    - service: counter.reset
      entity_id: counter.stofzuiger
          
- alias: 'Bitch naar dock'
  initial_state: 'on'
  trigger:
    - platform: event
      event_type: mobile_app_notification_action
      event_data:
        action: bitch_naar_prullenbak
  action:
    - service: vacuum.return_to_base
      entity_id: vacuum.roborock_vacuum_a15

- alias: 'Melding wissen bij terug naar dock'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: vacuum.roborock_vacuum_a15
      to: 'returning'
  condition:
    - condition: time
      after: 04:00:00
  action:
    - service: notify.mobile_app_pixel_5
      data:
        message: "clear_notification"
        data:
          tag: "bitchlegen"

So every night at 3 am the S7 will vacuum (3th day at max). Every third night at 4 am the S7 will mop in deep mopping mode. The next morning when my phone is off the wireless charger for 1 minute, the vacuum will go to the trash bin, so I can clean the dust bin and replace the mop (and add water). When I push the action link in the Android notification the vacuum goes back to the dock. Or when I choose to push the button on the vacuum, the notification gets cleared.

The automations won’t get triggered when we are on vacation (wife and I away for 24 hours). I didn’t want to use delays btw, as the automation will fail when for some reason HA will restart (power outage or whatever).

And only mopping every third night is because I don’t want to change the mop every day.

4 Likes

Anyone succeeded doing specific rooms / route mop (deep/standard) on Roborock S7 MaxV?
It all worked well for me on S7. I upgraded to S7 MaxV and only succeeded to to part of the commands.

does anyone already found the new details for the deep+ setting on mopping with the s7?

Would love to implement them on my s7 automations.

Hi,

Yes, i Just discovered the new mopping route has ID 304, so Just add it to your scripts

Enjoy

I just created similar post in the WTH subforum: WTH vaacum entities have to mopping controls?

Can you plase vote it? Its a good opportunity to get this feature implemented

1 Like

I can’t get the S7 to perform mops only via scripts anymore.

Have tried everything but somehow it seems that the command, set_mop_mode no longer exists, has changed causing it not to pick it up.

I can change the suction config, mop config but the Route(mop only) won’t work. do more people suffer from this?

In my robot Roborock S7 the number that i use are:
300 standard
301 Deep
302 custom
303 deep+

I don’t tried 304.

I recap for all the values found to have a short table with all values.
Vacuum_mode:

      service: vacuum.send_command
      target:
        entity_id: vacuum.roborock_vacuum_a15
      data:
        command: set_custom_mode
        params: "[{{ vacuum_mode }}]"

vacuum_mode values:

  • silent: 101
  • balanced: 102
  • turbo: 103
  • max: 104
  • ‘off’: 105 (to set for only mop)
  • custom: 106

Mopping_mod:
service: vacuum.send_command
target:
entity_id: vacuum.roborock_vacuum_a15
data:
command: set_water_box_custom_mode
params: “[{{ mopping_mode }}]”

mopping mode values:

  • ‘off’: 200
  • low: 201
  • medium: 202
  • high: 203
  • custom: 204

Mopping route (intensity):
service: vacuum.send_command
target:
entity_id: vacuum.roborock_vacuum_a15
data:
command: set_mop_mode
params: “[{{ mopping_route }}]”

Mopping route values:

  • ‘standard’: 300
  • deep: 301
  • custom: 302
  • deep+: 303
12 Likes

Just wanted to say huge thanks to everyone in this thread that brought this info to the table. Maybe one day this can actually make it’s way into the Core release…

Got an S7 Maxv Ultra too, experienced the same…the roborock integration via HACS does a lot but for controlling the mop I still have to use the Xiaomi Mihome app. So +1

I’m considering a new request for controlling the onboard CAM which is currently only available via the Roborock app. Imagine that you want to check out a specific spot in the house which isn’t covered by camera’s, then you’re able to point the spot and have the roborock have a picture or livestream to make sure everything is OK. But thats another request.

1 Like

These functions are all integrated into the December 2022 release of the python library. Add additional sensors and settings to Roborock vacuums by starkillerOG · Pull Request #1543 · rytilahti/python-miio · GitHub

We just need someone to integrate them into Home Assistant.

Your website seems to be down to me, any mirror?

Hi, i found workaround. In Node Red is node, or two, dedicated to Roborock. There You can steer moping function. Because i know how to change moping/vacuum settings in node red but have no success to force Roborock clean desired zone, I’ve decided to connect HA automation with Node Red. When button is pushed Node Red sets desired mopping force (amount of water) and vacuum force, then starts HA native automation with desired zone.

Just discovered this thread, I’m using a Q7 Max and node red to individually clean rooms using custom alexa commands, zigbee buttons or whatever. Thanks to the help of the members here I now can control the mop water flow for when I want to clean the kitchen or bathroom.

hmm interresting, can you share the export of these flows?

The Roborock integration supports this feature:

I’ve got a Roborock Q Revo and the above vacuum.send_command doesn’t work for this type. The Q Revo is integrated through the Roborock integration (no HACS) and I can send the app_segment_clean like in the documentation and ‘Rocky’ starts to brush the mop for action. But that’s not what I want. I want to only vacuum the floor and mop whenever I want that. Can’t figure out how to fix this…