Xiaomi Robot Vacuum Binding

Tags: #<Tag:0x00007f0156a95700> #<Tag:0x00007f0156a955c0> #<Tag:0x00007f0156a95458>

(JustAProgrammer) #711

It’s german, but just follow the steps

(Jay) #712

Does anybody know what format the coordinates for a zoned cleanup need to be in? What is A,B,C&D?


I tried the Flolevac app but I’m unable to import from my xiaomi account so didn’t manage to get it to work. I verified my email as suggested in an earlier reply

I figured out my coordinates through trial and error but I can’t seem to get the zoned cleanup format right.

(Philipp) #713

i cant see the IOT Marketplace in MISC on OH 2.2 !?
so i can’t install the Vacuum Binding :frowning:

any ideas !? - Thanks!


while waiting - the iBackup Viewer for the TOKEN looks a bit different in the newer version
here is a screenshot on

how to get the token (you dont need an unencrypted backup - works with both)


i watched the youtube video 2 posts before - this helped me out - thanks @Nico111


  • PaperUI -> install the ECLIPSE MARKETPLACE (in MISC)
  • PaperUI -> Configuration -> Marketplace -> Maturity Level: Alpha
  • PaperUI -> Addons -> Binding -> XIAOMI Mi IO Binding
  • PaperUI -> Inbox -> Add Vacuum as Thing
  • PaperUI -> Things -> click on the Vacuum -> click on the PEN on top
  • Insert your Token and save

The Vacuum should now be ONLINE (wait a few seconds)

Now, if you used the Sample items in the first post - you need to change the channel details from “generic” to “vacuum”

my items looks like this now

// Xiamo Roborock - GRUPPEN

Group  gXiaomiVac               "Xiaomi Robot Vacuum"       <fan>
Group  gXiaomiVacStat           "Status Details"            <status>            (gXiaomiVac)
Group  gXiaomiVacUsage          "Consumables Usage"         <line-increase>     (gXiaomiVac)
Group  gXiaomiVacDND            "Do Not Disturb Settings"   <moon>              (gXiaomiVac)
Group  gXiaomiVacHistory        "Cleaning History"          <calendar>          (gXiaomiVac)
Group  gXiaomiVacNetwork        "Network Details"           <network>           (gXiaomiVac)

// Xiamo Roborock - CONTROL

String XiaVac_action_Control     "Vacuum Control"     (gXiaomiVac)       {channel="miio:vacuum:XXXXXXX:actions#control" }
Number XiaVac_action_Fan         "Vacuum Fan"         (gXiaomiVac)       {channel="miio:vacuum:XXXXXXX:actions#fan" }
String XiaVac_action_Command     "Vacuum Command"                        {channel="miio:vacuum:XXXXXXX:actions#commands" }

// Xiamo Roborock - STATUS

Number XiaVac_status_Battery     "Battery Level [%1.0f%%]"       <battery>   (gXiaomiVac,gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#battery" }
Number XiaVac_status_Area        "Cleaned Area [%1.0fm²]"        <zoom>      (gXiaomiVac,gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#clean_area" }
Number XiaVac_status_Time        "Cleaning Time [%1.0f']"        <clock>     (gXiaomiVac,gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#clean_time" }
String XiaVac_status_Error       "Error [%s]"                    <error>     (gXiaomiVac,gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#error_code" }
Number XiaVac_status_FanPower    "Fan Power [%1.0f %%]"          <signal>    (gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#fan_power" } 
Number XiaVac_status_CleanStats  "In Cleaning Status [%1.0f]"    <switch>    (gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#in_cleaning" }
Switch XiaVac_status_DND         "DND Activated"                             (gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#dnd_enabled" }
String XiaVac_status_State       "Status [%s]"                   <status>    (gXiaomiVacStat) {channel="miio:vacuum:XXXXXXX:status#state"} 

// Xiamo Roborock - VERBRAUCH

Number XiaVac_Verbrauch_MainT       "Main Brush [%1.0f]"        (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#main_brush_time"}
Number XiaVac_Verbrauch_MainP       "Main Brush [%1.0f%%]"      (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#main_brush_percent"}
Number XiaVac_Verbrauch_SideT       "Side Brush [%1.0f]"        (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#side_brush_time"}
Number XiaVac_Verbrauch_SideP       "Side Brush [%1.0f%%]"      (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#side_brush_percent"}
Number XiaVac_Verbrauch_FilterT     "Filter Time[%1.0f]"        (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#filter_time" }
Number XiaVac_Verbrauch_FilterP     "Filter Time[%1.0f%%]"      (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#filter_percent" }
Number XiaVac_Verbrauch_SensorT     "Sensor [%1.0f]"            (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#sensor_dirt_time"}
Number XiaVac_Verbrauch_SensorP     "Sensor [%1.0f%%]"          (gXiaomiVacUsage) {channel="miio:vacuum:XXXXXXX:consumables#sensor_dirt_percent"}

// Xiamo Roborock - DND - Do not Disturb

Switch XiaVac_DND_Function       "DND Function"          <moon>          (gXiaomiVacDND) {channel="miio:vacuum:XXXXXXX:dnd#dnd_function"}
String XiaVac_DND_Start          "DND Start Time [%s]"   <clock>         (gXiaomiVacDND) {channel="miio:vacuum:XXXXXXX:dnd#dnd_start"}
String XiaVac_DND_End            "DND End Time [%s]"     <clock-on>      (gXiaomiVacDND) {channel="miio:vacuum:XXXXXXX:dnd#dnd_end"}

// Xiamo Roborock - HISTORY

Number XiaVac_history_Area    "Total Cleaned Area [%1.0fm²]"     <zoom>      (gXiaomiVacHistory) {channel="miio:vacuum:XXXXXXX:history#total_clean_area"}
Number XiaVac_history_Time    "Total Clean Time [%1.0f']"        <clock>     (gXiaomiVacHistory) {channel="miio:vacuum:XXXXXXX:history#total_clean_time"}
Number XiaVac_history_Count   "Total # Cleanings [%1.0f]"        <office>    (gXiaomiVacHistory) {channel="miio:vacuum:XXXXXXX:history#total_clean_count"}

// Xiamo Roborock - NETWORK

String  XiaVac_NetSSID    "Network SSID [%s]"     <network>   (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#ssid" }
String  XiaVac_NetBSSID   "Network BSSID [%s]"    <network>   (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#bssid" }
Number  XiaVac_NetRSSI    "Network RSSI [%1.0f]"  <network>   (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#rssi" }
Number  XiaVac_NetLife    "Uptime [%1.0f]"        <clock>     (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#life" }

all works well - thanks to @marcel_verpaalen :black_heart:

(Andrew Pawelski) #714

It looks like you have a string item, not a switch item for your control vacuum item

(Jay) #715

Ok managed to get Flolevac to work. Looks like the format for a zoned cleanup is the coordinates for the bottom left corner followed by the coords for the top right corner

(Ondrej Horak) #716

Hi, I did integrate the Roborock = v2 vacuum cleaner acc. to the above described process and works well. Thanks!
What I do miss is the mop function. @marcel_verpaalen would that be possible to integrate?

(marcel) #717

Hi @xandrew I’m not fully clear which command is required for starting mob mode.

I think it is set_carpet_mode:[{"enable":0}]
can you try to issue that command (use the command channel) and see what is the result

I also saw a
but don’t know what is is exactly setting

(Ingo Liebig) #718

Thx for this wonderful binding. I am currently using it with my roborock, humidifier and some LED Ceiling lights. Do I understand correctly that everything runs using the xiaomi servers and not in local network? I am having a very unreliable connection to all my lights :frowning:

(marcel) #719

It is a direct connection… The cloud is not used in this binding (hence no need for your Xiaomi userid/password)

(Ingo Liebig) #720

Oh wow! Okay, thats awesome. And, it’s the same for all products in this binding? I am really confused why some of my xiaomi ceiling lights have such a long delay or won’t react at all :S

(marcel) #721

yes, it is for all of them. Note that the devices themselves do communicate with the cloud.
You may try to switch on debugging (see first topic) to see if they are slowly responding, or give errors while communicating.

(MM) #722

Hi. This Binding is really working great. Thx for the good work and your Support. I got my new Yeelight ceiling 480 Yesterday but couldnt get it to work. I even tryed with your trick adding it as basic device using “ceiling1,…2,…3,…4” but got errors in openhab Log. Has someone this ceiling light running ?

(marcel) #723

I would try the following ones

what sort of errors do you see in your log? I would expect the basics to work with any of these as the commands are the same for all current yeelights (e.g. on/off, brightness etc)

(Ondrej Horak) #724

Hi @marcel_verpaalen, I can test the string, but looks more like a option of carpetmode than the mop (separate setup items in Mi app).
Could you give me a hint how to send this command to via the openhab? Shall I set a switch item within sitemap linked to actionCommand?

(Ondrej Horak) #725

One set of strings do not work with my V2 Roborock. They all are related to the last cleaning (all .items & .sitemap more or less copy&paste of the code from the forum here). Is it only due to v2 robot?
See how it looks:

(MM) #726

Thank you. Must have been blind - looking in the miot.xml to get the token and there is written “yeelink.light.ceiling3”.
Thought, that I’ve already tried it and got errors … - now its working. Thx for pointing me in the right direction.

(marcel) #727

You need to link a string item to the command channel. Note that that channel is marked advanced so in paperui only visible if you use the show more

You can then send the command and the reply will be in the same channel.

(marcel) #728

Looks like it. Can you send me the debug log so I can see the full conversation and responses.

(marcel) #729

Let me know the one that works best, and your original model and I add it to the database

(Filip ) #730

how do I extract the token on android, all the successful guides above were made for ios users.thanks