Xiaomi Roborock zone cleanup rule

Hi Team,

Where does the ‘zones.map’ file sit (path)

@crockernr

The file should be in transform folder. Here is an example of a file:

entrance=-1.8,0,2,6,1
kitchen=-5,0.5,3.6,2.6,1
livingroom=0,0.5,4.2,5.2,1
diningroom=-1.6,5.9,2.9,2.7,1
sofa=1.4,4.8,3,1,1
carpet=1.4,2.1,2,3,1
groundfloor=entrance,kitchen
1 Like

Hey @smhgit This looks great. I’ve setup the files https://github.com/imaginator/system/commit/ec179aea1e4f1d820a4ccc6334ea78a4354e71f4 and am now trying to call this from the openhab-cli.

What’s the best way to be triggering this from the openhab-cli?

openhab> smarthome:send Vacuum_Control ["vacuum", "kitchen"]
or ???

following up to my own idiocy: smarthome:send Vacuum_Action_Zone kitchen works!.

Dont understand how this work - sorry my stupidness could anyone explane me what i must do for the numbers of for example kitchen ?

Cause FloleVac dont work regarding MAP with my 1S. I have a screenshot of the created map from xi home app but dont know how can i measure now the coordinates ?!

thanks for help

I already sent you the link a couple of days ago, it is explained very well on that page how to do it:

1 Like

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