Xiaomi Roborock zone cleanup rule

I did it in a more try and error way:

Just open the app and show the map in zones mode
As soon as you activate one zone over openhab, the lines are shown in the map.
If the zone is not at the position you want it, then stop vacuum, modify the map and start vacuum again.
Normally I need not more then 3-5 corrections until the zone fits…

Nice step, did not know this is possible. :+1:
I will verify my coordinates tomorrow.

If you are using the app FloleVac, you could get the original coordinates of a zone to clean. You dont have to “guess” and try and error, but got the direct coordinates, which are send to the vacuum.

1 Like

According to the reports of several users, the app does not work anymore for newer vacuum models.

Hi,

thanks for this nice tutorial, but i’ve a missing link :slight_smile:

I want to use the solution from @smhgit with multi zone configuration. I’ve used his map file (for testing), the items and the rule.

But i don’t get, how to start a zone cleaning with Basic UI. If i include the items in my sitemap as “Default” i get this result:

Bildschirmfoto von 2019-12-23 12-10-41

I tried to use the “control” item as switch with mappings, but also no success:

Bildschirmfoto von 2019-12-23 12-13-19

This is, what i get in the logfile:

2019-12-23 12:00:49.638 [INFO ] [internal.handler.MiIoAbstractHandler] - Mi Device model rockrobo.vacuum.v1 identified as: Mi Robot Vacuum (rockrobo.vacuum.v1). Matches thingtype miio:vacuum
2019-12-23 12:01:58.059 [ome.event.ItemCommandEvent] - Item 'Vacuum_Control' received command entrance
2019-12-23 12:01:58.064 [vent.ItemStateChangedEvent] - Vacuum_Control changed from NULL to entrance
2019-12-23 12:02:00.862 [ome.event.ItemCommandEvent] - Item 'Vacuum_Control' received command kitchen
2019-12-23 12:02:00.869 [vent.ItemStateChangedEvent] - Vacuum_Control changed from entrance to kitchen

But no action on the vacuum…

Any hints for me?

Thanks.
Huaba

EDIT: i’ve an warning in the log:

[WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'staubsauger.rules' has errors, therefore ignoring it: [21,1]: missing EOF at 'val'

I think, thats the error…

I’ve solved the error. I had additional rules in the file and the function must place before :man_facepalming:

But no success with the zone cleaning. Errors are:

2019-12-23 12:59:55.030 [ome.event.ItemCommandEvent] - Item 'Vacuum_Control' received command kitchen
2019-12-23 12:59:55.031 [INFO ] [clipse.smarthome.model.script.Vacuum] - Vacuum command: kitchen
2019-12-23 12:59:55.037 [vent.ItemStateChangedEvent] - Vacuum_Control changed from livingroom to kitchen
2019-12-23 12:59:55.078 [INFO ] [o.internal.handler.MiIoVacuumHandler] - Command kitchen not recognised

first: thank you for this very nice solution!!!

At the begining, i had some big problems to find the correct order of the coordinates.
But than, it works.
Based on the first rules i found out, that the parameters for my Roborock S6 are in the following way:
[[LEFT, BOTTOM, HEIGHT, WIDTH, REPEATS]]
and not
[[BOTTOM, LEFT, HEIGHT, WIDTH, REPEATS]]

Still i have a Problem!
During to adjust my room coordinates, my roborock does not follows my commands from Openhab. Now there is no communication to thee vacuum - but from the vacuum to Openhab.
But the roborock is online in the PaperUI.

By using the App, all functions are running without problems.
Only from/to Openhab there is nothing.

Does anyone know what my problem is?

Thanks
Morty

I solved my problem.
After a reboot of my openhab my zone-cleaning worked again. :slight_smile:

@Huaba Can you share whole example for things, items etc files? I’m having simliar problems and for me no zones are showing up … Any examples how you finally managed it are much appreciated.

Sorry, but I gave up. I never got the zone cleaning to work.

In the binding test programs there is also a viewer included. It is kind of stand alone program to view maps

This may help finding the coordinates.

It should be possible to execute this outside of the development environment by using the right command line. I used this for the development, in Eclipse it simply right-click => run as java application.

This one works without any problems:

Hi Marcel, can you share details of this app you‘re using? Where can I download it from? Do you know if this app works with the S50 and firmware v3.5.7.002008?

Thx
Thomas

It is actually included in openhab.
It reads the rrmap files that are saved when pulling the map.

Just needs the right command line to start.
Maybe someone with some more java knowledge can help figuring it out. The class to run is RoboMapViewer

I cannot find the rrmap file. The only file in my userdata\miio directory is the miioTokens-us.json file.

Can someone please assist??

See bottom of first post

I have that tool downloaded can run it, that wasn’t the issue.

The issue is that I don’t have the map file (Robot Radar map). I’ve read the Binding page and the only thing I could find was that it may be in the userdata\miio directory, but as I said above, I only see a json file.

You are sure you have tried this…

Finally found the steps in case someone else has the same issues:

  1. openhab-cli console

  2. Enter default password - habopen

  3. type in - log:set debug org.openhab.binding.miio

  4. logout of cli console by entering logout

  5. Check pi directory userdata\miio and you will now see the rrmap files

  • To turn off debug logging, you would enter log:set info org.openhab.binding.miio

Thank you!

4 Likes

Hi,
just another possible approach.

BR
PeterK