Just ordered my S7, and found this thread, and not 100% sure what it’s about. As to my understanding, Roborock S7 vacuums and mops both the same time, and automatically lifts up the mop when it detects a carpet (and when it goes back to charging base). So, is there a specific need to control mop via app/Home Assistant then?
While it can mop and vacuum at the same time, it is not actually recommended. You should do a vacuum-only pass before doing a vacuum+mop pass. Some people even recommend 2 vacuum only passes before mopping. This is for exactly the same reason as you would manually vacuum the floor before mopping, otherwise the mop would drag larger debris along the floor, that is not a good way to clean a floor. Especially if you have polished wooden floor, you should really make sure the floor is well vacuumed before mopping, in order to avoid scratches.
Thanks for explanation. I thought separate runs are not needed since the mop part comes behind the vacuuming parts, but what you explained makes sense. After all, the robot spins around etc and doing so, the mop can probably run over parts of floor that has not been vacuumed yet.
So based on this, then yes, ability to control mop via Home Assistant would be great.
I am also interested in this ability. Best way to clean the floor is to vacuum it once at least before mopping.
such a pity, just bought it and found out deep mopping can’t be controlled. Can it be called through an Alexa voice command? an alexa integration would do it then
Waiting for the official integration, I found some vacuum commands and coded the following workarounds:
script:
roborock_set_customize_mode:
alias: "Set Roborock to use customized cleaning settings for each room"
sequence:
- alias: "Set vacuum mode to customized"
service: vacuum.send_command
target:
entity_id: vacuum.roborock
data:
command: set_custom_mode
params: [106]
- alias: "Set mopping mode to customized"
service: vacuum.send_command
target:
entity_id: vacuum.roborock
data:
command: set_water_box_custom_mode
params: [204]
roborock_set_manual_mode:
alias: "Set Roborock manual vacuum and mopping settings"
fields:
vacuum:
description: "Vacuum mode - can be: silent | balanced | turbo | max"
example: "max"
mopping:
description: "Mopping mode - can be: off | low | medium | high"
example: "off"
sequence:
- alias: "Config variables"
variables:
config_vacuum:
silent: 101
balanced: 102
turbo: 103
max: 104
config_mopping:
'off': 200
low: 201
medium: 202
high: 203
vacuum_mode: "{{ config_vacuum[vacuum] }}"
mopping_mode: "{{ config_mopping[mopping] }}"
- choose:
- alias: "Invalid vacuum value"
conditions: "{{ vacuum not in config_vacuum|list }}"
sequence:
- service: system_log.write
data:
message: "Invalid vacuum value '{{ vacuum }}'. Valid values are {{ config_vacuum|list|join(', ') }}"
level: warning
logger: roborock
- alias: "Invalid mopping value"
conditions: "{{ mopping not in config_mopping|list }}"
sequence:
- service: system_log.write
data:
message: "Invalid mopping value '{{ lavaggio }}'. Valid values are {{ config_mopping|list|join(', ') }}"
level: warning
logger: roborock
default:
- alias: "Set vacuum mode"
service: vacuum.send_command
target:
entity_id: vacuum.roborock
data:
command: set_custom_mode
params: "[{{ vacuum_mode }}]"
- alias: "Set mopping mode"
service: vacuum.send_command
target:
entity_id: vacuum.roborock
data:
command: set_water_box_custom_mode
params: "[{{ mopping_mode }}]"
Call one of the scripts before starting the robot cleaning.
I hope this can help while the official integration implements mop control.
note: the vaccum and mopping mode set with the scripts are not reflected in the Xiaomi Home App note2: I didn’t find a way to control the mop route setting
where did you get the information from to put all that together? 201, 202 codes and so on?
thanks
Here: GitHub - marcelrv/XiaomiRobotVacuumProtocol: Attempt to describe the Xiaomi Robot Vacuum Protocol
Thanks @matlar, sometimes a workaround is as good as a solution, certainly the case in this instance. The solution works perfectly for me. I am sure it must be possible to set the mopping route I might look into it when I need this level of control, for now its just nice not to have my s7 dragging a dirty dry mop around the floor.
Working, thanks!
Maybe someone has figured out how to change Mop Route setting to Deep?
Just found the solution for passing variables to an script inside an automation:
alias: Test vacuum settings
description: ''
trigger: []
action:
- service: script.roborock_set_manual_mode
target:
entity_id: vacuum.roborock_vacuum_a15
data:
vacuum: silent
mopping: 'off'
@vgimbutas i would like to know that to.
I would like to join the question! I’ve been playing around a bit with custom settings. I set deep mopping for custom cleaning in the app. However, I’ve had unreliable success - occasionally I’ve been able to start deep mopping via Home Assistant using this:
service: vacuum.send_command
data:
command: set_water_box_custom_mode
params:
- 204
target:
device_id: ...
So i discovered how to set the mopping route, the following script can be used:
alias: Set Roborock mopping route
fields:
route:
description: 'Mopping route - can be: standard | deep'
example: 'standard'
sequence:
- alias: Config variables
variables:
config_mopping_route:
'standard': 300
deep: 301
mopping_route: '{{ config_mopping_route[route]}}'
- choose:
- alias: Invalid mopping route value
conditions:
- condition: template
value_template: '{{ route not in config_mopping_route|list }}'
sequence:
- service: system_log.write
data:
message: >-
Invalid mopping_route value '{{ route }}'. Valid values are {{
config_mopping_route|list|join(', ') }}
level: warning
logger: roborock
default:
- alias: Set mopping route
service: vacuum.send_command
target:
entity_id: vacuum.roborock_vacuum_a15
data:
command: set_mop_mode
params: '[{{ mopping_route }}]'
mode: single
It’s working, thanks!
I also see (and hear from the robot) the changes in the Mii app
Is there a way to create an entity that represents the mopping status of the robot? Currently the robot arttibutes show vacuum strength only.
I want that because I want to try to make an input boolean that tells if the mop pad is dirty or clean.
For that I need to know when the robot is back after mopping.
I can do that manually by adding it to the script, so when manually set to mopping it will also change an entity to let it know, but then I would not have this information if I sent the robot from the Mii App.
Any suggestions?
Is there a way to combine this with number of repeats?
This scripts work for me, but I can’t choose how many repeats for each room.
I can of course send the vacuum twice to the same room but it’s different, the roborock does a different route if it’s set to 2-3 repeats
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