Cleaning specific room and zones with multi level map (Xiaomi roborock)

In the latest version of the binding you have the channel: Vacuum Room [room#] (actions#segment (String)) But how to use it/what to send?

Only find this in the docs: Number actions#segment Room Clean (enter room #)

The Room mapping items show: [[16,“802001027802”],[17,“802001027800”],[18,“802001027803”],[19,“802001027801”]]

EDIT
Already found out: just send 16 to the “Vacuum Room” item

1 Like

Can you explain this to me as if i was very dumb.
How do you send the number to the channel? what are you using?

I use a switch and a rule to send the command. The Switch is activated with Google Home:

triggers:
  - id: "1"
    configuration:
      itemName: Stofzuig_Woonkamer_Keuken
      state: ON
      previousState: OFF
    type: core.ItemStateChangeTrigger
conditions: []
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: Stoffie_VacuumRoomroom
      command: "19"
    type: core.ItemCommandAction

Cheers, not quite what I was looking for but you ended up giving me other ideas there with google home.
Thank you!!

Has anyone managed to get this working with a Roborock S50 (without room support) or Floor support?

I was able to map out my apartment andI created a map file like this:

Bedroom1=23950,25336,26264,23121,1	
Bedroom2=27261,32594,23350,36928,1		
Bedroom3=30972,32594,27294,36783,1	
Study=33306,32483,30983,36828,1	
MainHallway=38217,30706,23483,32594,1	
SmallHallway=25050,24950,24021,32579,1
CatToiletArea=24150,24707,25221,26479,1
MainBathroom=25193,28850,28207,26364,1
GuestBathroom=26493,28850,28264,30936,1
Kitchen=32007,30936,34679,27321,1
Dining=33321,32564,38293,27221,1
All=Bedroom1,Bedroom2,Bedroom3
EmptyBin=32707,29464
=NULL

Am I correct to think that I need to change the rules to always run zoned cleanups rather than room cleanups?

What’s not too clear to me is how the names map to the zones in my map files?

Group:Switch:OR(ON,OFF)    gSaugSwitches                            "Group with one switch for each room"                (gVacuum)          ["CleaningRobot"]
Switch                     EG_ZO_Bedroom1                                                                                (gSaugSwitches)
Switch                     EG_ZO_Bedroom2                                                                                (gSaugSwitches)
Switch                     EG_ZO_Bedroom3                                                                                (gSaugSwitches)
Switch                     EG_ZO_Study                                                                                   (gSaugSwitches)

Am I on the right track here? My current tests have the vacuum always starting to clean the entire apartment.

I’m also a little unclear on the significance of the group names:

Switch	HH_EG_ZO_esstisch  (gSaugSwitches)
Switch	HH_EG_ZO_arbeitsflaeche  (gSaugSwitches)

Can I assume that a vacuum that doesn’t support rooms or floors is always on EG (ground floor)? What’s HH stand for?

Output is currently:

2021-12-19 19:27:46.784 [INFO ] [org.openhab.core.model.script.Rocky ] - Vacuum should go to work ( HH_EG_ZO_CatToiletArea) Set the floor to UNDEF and start cleaning.
2021-12-19 19:27:46.785 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Rocky_VacuumOnOff' received command ON
2021-12-19 19:27:46.785 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Rocky_VacuumOnOff' predicted to become ON
2021-12-19 19:27:49.803 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Rocky_RobotLocating' changed from ON to OFF
2021-12-19 19:27:49.803 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Rocky_State' changed from Returning Dock to Cleaning
2021-12-19 19:27:51.786 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Rocky_Room16' changed from "unknown_method" to []
2021-12-19 19:27:52.699 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Rocky_Room16' changed from [] to "unknown_method"

I made an experimental version with the hope that it finds the actual room names instead of the ID

https://www.verpaalen.com/openhab2/org.openhab.binding.miio-4.1.0-SNAPSHOT.jar

This version has experimental fixed last clean details, and the (advanced) room mapping channel now has a 3rd element with the mapped name.

Would appreciate if someone can test if these new functions work (only on models that also support room naming in the mihome app…)
esp log of clean record is missing, and now educated guess of how that looks like

1 Like

Is this a different version from the one of this morning where you fixed the lights brightness going back up?? I do have a roborock s6 maxV which has named rooms to test with in mihome.
This is what I’m seeing right now on the room
Mapping channel:

And the output of the cleaning record is as follows:


{"start":"2023-09-15T16:55:19+01:00[Europe/Lisbon]","end":"2023-09-15T17:23:42+01:00[Europe/Lisbon]","duration":28,"area":21.6925,"error":0,"finished":1,"finish_reason":52}

@Pedro_Liberal Yes, different. Your yeelight stuff is in this file too, but I did not bother to change the naming indeed as you were the only one downloading the earlier one.

1 Like

Ah cool, I’ll update today then and give you feedback :slight_smile:

so this is from a roborock s6 maxV right? It does not have a dust collection bin right ?
I see it is somewhat different than I expected. so made one more change to incorporate the different date/time format. (just now, if you downloaded it before, do it once more)

The dust collection bin in the charge pad? Correct it does not have it.
Understood. Once this cleaning cycle ends (to check the room mapping output) I’ll update it.

Thank you for the improvements!!

You’re a wizard @marcel_verpaalen :smiley:
Had to delete the thing though, but linking the old items was enough.

Room mapping:


[[19,"356001033356","Living room"],[16,"356001033363","Hallway"],[17,"356001033358","Kitchen"],[18,"356001033361","Bathroom"]]

Not totally sure that those 356001… numbers are. Any idea? Are they useful for anything in particular?

Cleaning record:

{"start":"2023-09-16T15:09","duration":7,"area":7.025,"error":0,"finished":1,"finish_reason":56}

By the way. Do you know how to send the command to issue multiple cleaning cycles? The mi home app allows for selective room cleaning and in that menu you can tell it to clean once, twice or thrice. Is there a command to do that somehow through openHAB?

1 Like

Happy that indeed my guess that the 356001… numbers were matching the rooms I saw in the cloud message. This will allow for a future room cleaning channel with proper dropdown of rooms.

note the numbers do not mean anything to my knowledge.

The commands to send multiple room cleans you see here:

In OH you can send these commands through the commands channel. I think on the forum there are few folks that made already some widgets.

I expect something like:
Rock_ExecuteCommand.sendCommand("app_segment_clean[{"segments": [16, 17, 18],"repeat": 2}]")

1 Like

That would by super useful indeed. Wonder if it’s possible to add to it the number of repeats somehow… might need a rule for it though to get both the room and repeats in one go.

app_segment_clean[{“segments”: [16, 17],“repeat”: 2} worked :slight_smile:
You made my weekend :slight_smile:

@marcel_verpaalen by the way, I noticed this just now:

Summary

Previously I only saw the standard s6 maxv speed names. Now I see more of them, and when I select any of the top 6 options, it reverts back to “balanced”. I tried deleting the item and creating back again but I still see those options. I don’t have any metadata changing the values.

@marcel_verpaalen I am trying to run the experimental version. It does not work. Are there any dependencies which are mandatory required?

No not really… Well I think it only works with roborock vacuums not viomi or dreame.

In the mean time it is also included in the regular openhab so you can pull it also from the current snapshot builds

If it does not work, meeting share a debug log to understand what is not working