Roborock resets configuration on app_segment_clean

Hi there,

I want to setup a script that starts my Roborock S7 vacuum to clean some room, but without using the mop. Therefore I use the Xiaomi Miio integration.

Before I start the room cleaning with app_segment_clean, I configure the vacuum using set_water_box_custom_mode (setting to 200 which means no water → no mop used) and set_custom_mode (setting to 104 which means max fan speed).

But as soon as I send the app_segment_clean command, the water_box_custom_mode will be reset to 203 and the Roborock lowers the mop to the floor. If I run the set_water_box_custom_mode command again, while Roborock is cleaning, the Roborock will lift up the mop as desired.

To ensure that the Xiaomi Miio integration is not part of the problem I ran the commands from my computer and observed the same:

$  miiocli roborockvacuum --ip IP --token TOKEN raw_command set_water_box_custom_mode '[200]'
Running command raw_command
['ok']
$  miiocli roborockvacuum --ip IP --token TOKEN raw_command get_water_box_custom_mode        
Running command raw_command
[200]
$  miiocli roborockvacuum --ip IP --token TOKEN raw_command set_custom_mode '[104]'         
Running command raw_command
['ok']
$  miiocli roborockvacuum --ip IP --token TOKEN raw_command get_custom_mode        
Running command raw_command
[104]
$  miiocli roborockvacuum --ip IP --token TOKEN raw_command app_segment_clean '[16]' 
Running command raw_command
['ok']


$  miiocli roborockvacuum --ip IP --token TOKEN raw_command get_custom_mode          
Running command raw_command
[104]
$  miiocli roborockvacuum --ip IP --token TOKEN raw_command get_water_box_custom_mode
Running command raw_command
[203]

As you can see get_water_box_custom_mode returns 200 before running app_segment_clean, but 203 afterwards.

Is this the correct behavior when using app_segment_clean? Then how do I set up a vac-only?

It looks like pausing the cleanup causes this behavior.
For example, if I send app_pause followed by configuring the vacuum (set_water_box_custom_mode, set_custom_mode) and then start a new clean with app_segment_clean, the water_box_custom_mode gets reset.

But if I send an app_stop after the app_pause (or replace the app_pause with app_stop), then everything works as expected.

So it looks like a workaround would be to start my script with an app_stop, followed by configuring the vac and then start cleaning using app_zoned_clean or app_segment_clean. I will do some more tests :wink:

Why not have a boolean of mop true/false? Like input_boolean.mop

In the automation that starts the vacuum I assume you have on some button press or whatever, add after starting the cycle:

a pause for X secs (you determine the proper setting)
then a condition if input_boolean.mop = false
set the proper values which you said lifts the mop.

Of course you may need more checking than that, like you can’t set mopping if the mop is not installed or the water tank is empty.