Roborock binding for robot vacuum cleaners [5.0.0; 5.0.99]

HI everyone.

I’ve been using Home Assistant to control mi Qrevo with MQTT and have a set of rules already working. I’m trying to migrate to this addon but I can not find information about commands and functionality. I have read the thread and find out how to send some commands (IE items.getItem(‘Roborock_Oli_Execute_Command’).sendCommand(‘app_segment_clean,[{“segments”: [18,19], “repeat”: 2}]’) , but I cannot find what are the available commands in the MIIO documentation or in the Github. For example, I have not been able to set the water level for mopping. I tried to read the status, but I have some integers on some pages, and descriptions on others and I’m still not sure where to find out the possible values for the commands or actions.

Is there a document where I can find detailed information about what every status is and the available commands that this addon uses (and the syntaxes)?

Thanks in advance

EDIT: Nevermind… As soon as I posted this, It came to mi mind to check the .md files on this github and I figured it out. IE, for waterflow in the mop as easy as items.getItem(‘Roborock_Oli_Execute_Command’).sendCommand(‘set_water_box_custom_mode,[202]’);

1 Like

Tried it today and cleaned_area still seems to be displayed incorrectly. clean_percent is visible in openhab interface as available channel in things configuration, but it doesn’t seem to be updated with my Saros 10 (it is always NULL).

I’ll need to look at cleaned_area again, but found a major typo around the clean_percent stuff, fixing now.

cleaned_area might be OK in https://smedley.id.au/tmp/org.openhab.binding.roborock-5.1.0-SNAPSHOT.jar

clean_percent should also update when the vacuum polls, but there must be a way to progress updates like with the battery status - I’ll need to capture some logs and see if I can work it out.

VaccumingRobot_01_CleaningLastCleanArea' changed from 4100000 m² to 7515000 m²

Seems it changed to show how many sqm robot moved through, rather than area of zone that was cleaned. Problem is that value need to be divided by 1000000.

Sorry….. https://smedley.id.au/tmp/org.openhab.binding.roborock-5.1.0-SNAPSHOT.jar should have the divide by 10000. Is that value now what you expect?

Yes, it now aligns more or less with what app is doing - they seem to round up (I’m just using minutes from time right now)

I need to take a look later at Cleaning Finished Reason in decompiled apk, since now it just shows 54 (I guess it is… success? )

image

the clean percentage should work in https://smedley.id.au/tmp/org.openhab.binding.roborock-5.1.0-SNAPSHOT.jar

1 Like

Can I contribute somehow? I was looking at

and I was thinking if roborock.properties could be updated with this

channel-type.roborock.last-clean-finish-reason.state.option.21 = Cleaning interrupted by user
channel-type.roborock.last-clean-finish-reason.state.option.24 = Cleanup interrupted
channel-type.roborock.last-clean-finish-reason.state.option.29 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.32 = Could not continue cleaning
channel-type.roborock.last-clean-finish-reason.state.option.33 = Breakpoint
channel-type.roborock.last-clean-finish-reason.state.option.34 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.35 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.36 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.37 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.43 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.45 = Positioning Failed
channel-type.roborock.last-clean-finish-reason.state.option.48 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.49 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.50 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.51 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.52 = Finished cleaning
channel-type.roborock.last-clean-finish-reason.state.option.54 = Finished Cleaning
channel-type.roborock.last-clean-finish-reason.state.option.55 = Finished Cleaning
channel-type.roborock.last-clean-finish-reason.state.option.56 = Finished Cleaning
channel-type.roborock.last-clean-finish-reason.state.option.57 = Finished Cleaning
channel-type.roborock.last-clean-finish-reason.state.option.60 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.61 = Area unreachable
channel-type.roborock.last-clean-finish-reason.state.option.62 = Area unreachable
channel-type.roborock.last-clean-finish-reason.state.option.64 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.65 = Positioning Failed
channel-type.roborock.last-clean-finish-reason.state.option.67 = Washing error
channel-type.roborock.last-clean-finish-reason.state.option.68 = Failed to return to the dock
channel-type.roborock.last-clean-finish-reason.state.option.101 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.102 = Breakpoint
channel-type.roborock.last-clean-finish-reason.state.option.103 = Manual Interrupt
channel-type.roborock.last-clean-finish-reason.state.option.104 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.105 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.106 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.107 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.109 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.110 = Cleanup Interrupted
channel-type.roborock.last-clean-finish-reason.state.option.114 = Cruise completed
channel-type.roborock.last-clean-finish-reason.state.option.115 = Cruise failed
channel-type.roborock.last-clean-finish-reason.state.option.116 = Pet found
channel-type.roborock.last-clean-finish-reason.state.option.117 = Pet found failed

roborock.properties is a generated file - these updates need to be made to https://github.com/psmedley/openhab-addons/blob/roborock-fix/bundles/org.openhab.binding.roborock/src/main/resources/OH-INF/thing/thing-types.xml#L728

in a similar manner to https://github.com/psmedley/openhab-addons/blob/roborock-fix/bundles/org.openhab.binding.roborock/src/main/resources/OH-INF/thing/thing-types.xml#L614

I’ll try implement this soon.

Code committed in Add text for last cleaned finish reason · psmedley/openhab-addons@6b3d714 · GitHub

Updated build at: https://smedley.id.au/tmp/org.openhab.binding.roborock-5.1.0-SNAPSHOT.jar

1 Like

@reyhard does this latest build resolve the bulk of your concerns? If so, I’ll raise a PR to get the fixes included, so that I can start investing newer vacs that use the B01 protocol.

Yes, I just tested it and it seems to work nicely. Thanks a lot for a lot the improvements you have made

1 Like

PR has been accepted and will be in the next milestone build :slight_smile:

1 Like

Hey,

i didn’t look at your code, but I have feeling that you are not cleaning all resources when disposing handler(s).

I’ve added a bridge to my Roborock account, next I’ve added my Roborock Querv. I’ve had only nulls on my channels so I wanted to restart the bridge to download new values. I’ve disabled/enabled the bridge and now I’m constantly getting this error:

2025-11-30 19:28:16.577 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:19.607 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:22.653 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:25.685 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:28.744 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:31.810 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:34.844 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:37.876 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:40.900 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:43.934 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:46.966 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:50.010 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:53.044 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:56.076 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:28:59.110 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:02.135 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:05.170 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:08.329 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:11.371 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:14.405 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:17.438 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:20.466 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.
2025-11-30 19:29:23.503 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler RoborockAccountHandler tried updating the thing status although the handler was already disposed.

Is there any thread pool linked to a handler? Or maybe some MQTT thread constantly pooling data?

@Edit:
Shouldn’t you here cancel the future?

@Override
public void run() {
     synchronized (this) {
        var local = future;  
        future = null;
        if(local!=null) {
            local.cancel();
        }
    }
    logger.trace("{}: Running one-shot", prefixedName);
    runnable.run();
}

TBH I have no idea, I ‘borrowed’ the Scheduler code from another binding….

OK, but will you take a look on it?

Yeah I’ll try take a look…

It will be related to [ecovacs] Handler EcovacsVacuumHandler tried updating the thing status although the handler was already disposed. · Issue #19101 · openhab/openhab-addons · GitHub as the scheduler code is from ecovacs…

(Transparency note: I’m the author of the ecovacs binding, which that logic was borrowed from)

No, as future at that place is the task that’s about to be run. In other words: when canceling the future there, no task would ever be run.

When disposing the handler, it’s the handler’s task to cancel the tasks, which seems to happen properly via this path: 1, 2

1 Like

I upgraded now to Openhabian 5.1.0

Installed the latest .jar

if i try to login, i get the following error:

Thing ‘roborock:account:459dcce2cb’ changed from OFFLINE (COMMUNICATION_ERROR): Unsuccessful login: to UNKNOWN

Thing ‘roborock:account:459dcce2cb’ changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Unsuccessful login:

Changed my Password with same results :thinking:

You may need to remove /var/lib/openhab/jsondb/roborock%3Aaccount%3A459dcce2cb.json and also the corresponding backup files in /var/lib/openhab/jsondb/backup

I deleted all files for roborock in both folders. Restarted the Raspberry and get still the same error.