Xiaomi Robot Vacuum Binding

You were absolutely right! There was a typo error on the Token ID. Now it works perfectly :slight_smile:

Thanks a lot!

Hi @marcel_verpaalen,

Just wondering if you have a come across this issue with token retrieval. I’ve just set up Robot Vacuum V1. I am able to control the vacuum from the app.

Robot Vacuum firmware is : 3.3.9_003094
Mi Home App Version : 5.1.1

When I use the tool kit it works successfully but the output window only shows ip address no token;

And if I look in the miio2 db file the token field is blank.


I think they changed something in new Mi Home App… token for vacuum no longer saved on phone…?
I think you can use this app to get the token… (I haven’t tried myself)
Setup the vacuum in the app then do a Export to SD Card and the token is in the RobotConfig.frc file

that would indeed be new. If no longer in the database, it will hamper the usabge of the binding for many new users.
Very unfortunate. Then the effort to receive the tokens needs to be accelerated…
(meaning, we need to reverse engineer the logon procedure to the Xiaomi cloud, as the app gets the updated tokens each time it logs on)

Hello everyone,

I had the same problem last night as I tried to add my new Robot to openhab. Fortunately I was able to extract the token using the Flole app (as mentioned by nisseDILLIGAF). You have to install the official Mi Home first and setup your vacuum in there. After that open the Flole app and import the robot definition from Mi Home. Export the configuration to Google drive (using the Flole app) and open the file “FloleXiaomiRemote.settings” with a text editor. The digits after ‘“e”:’ are your token which you can directly copy to the binding configuration.

Thank you Marcel for the great binding by the way!

Best regards



Same issue, just downloaded and installed version 5.0.19. I picked ups a philips Xiaomi desk lamp, On and Off works. How do I get started on sending commands, it supports dimming and different white light modes, I am just not sure how to structure the command. Thanks.

Hi @nisseDILLIGAF / @marcel_verpaalen,

Thanks for the info on the FloleVac app. Works fine.

I used the same method as @hachinga by uploading to Google Drive.

At first I thought that I messed up… (wanted to add Yeelights to this binding now)

Just install the old APK (https://www.apkmirror.com/apk/xiaomi-inc/mihome/mihome-5-0-19-release/mihome-5-0-19-android-apk-download/ ), extract the tokens and afterwards you can upgrade the app again.

Edit: @marcel_verpaalen Is it possible to add something that the bulbs turn off when the brightness is 0?

Can anyone confirm that the tokens are gone in the IOS App? I have another wifi plug coming shortly and hope to still get it into OH

On Friday i get my token for my Airpurifier from my iphone via unencrypted Itunes Backup without any problem.

Hi Guys and especially Marcel,

i only want to say thank you for the great work. I’m a greenhorn / noob in OH and i successed installig and using the binding and with the sample text i could create my first sitmap. Great people & community!

Best, Marco

Are there any news about the colors? I am using the binding with the vacuum, the air purifier and different yeelight. Everything works well, but I can’t change the color . All bulbs are blue now… :smile:

Interesting. I thought I was the only one having that problem… We may have a bug here :slight_smile:

Any clue, anyone?

Hello @Anthrax,

did you managed to get the JIAOYUE 650 added to the binding? I also order that lamp and it is arriving in like 1 week or so and I just wanted to check already on how to import it into openhab.

best regards,

Hi @salexes,

yes I did manage to add it. It’s just not working with some of the default channels the binding creates (mainly color related).

After having another look at the yeelight API document I found the culprit:

This sort of light has another set of functions which control the ambient ligth and color (bg = background in yeelight’s terms). And since @marcel_verpaalen’s original does’nt seem support these yet I used the fallback ExecuteCommand method from his binding to achieve my main goal…

This is my rules section (I control the lamp with an aqqara double switch):

rule "Xiaomi Aqara Battery Powered 2 Button Switch"
    Channel "mihome:86sw2:158d0001e06500:ch1" triggered SHORT_PRESSED

rule "Xiaomi Aqara Battery Powered 2 Button Switch"
    Channel "mihome:86sw2:158d0001e06500:ch2" triggered SHORT_PRESSED

rule "Xiaomi Aqara Battery Powered 2 Button Switch"
    Channel "mihome:86sw2:158d0001e06500:dual_ch" triggered SHORT_PRESSED

@marcel_verpaalen: Did you ever tried dynamic Channel creation upon discovery? My suggestion would be to implement all these functions from the screenshot above generically and then pick just the supported ones (see bold line below) when the thing gets created? Might this be possible? I’d be more than willing to lend a hand…

HTTP/1.1 200 OK
Cache-Control: max-age=3600
Location: yeelight://
Server: POSIX UPnP/1.0 YGLC/1
id: 0x000000000015243f
model: color
fw_ver: 18
support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb
power: on
bright: 100
color_mode: 2
ct: 4000
rgb: 16711680
hue: 100
sat: 35
name: my_bulb

best regards

1 Like

Is Xiaomi Vaccum Cleaner V2 is supported by Xiaomi Binding?



thank you for your answer @Anthrax !

I am quite a newbie, could you maybe tell me where I need to modify files in order to get this device supported ? Or could you maybe send me the modified files ?

Best regards,

@smhgit yes, it appears so for basic functionality. Specific v2 functions are not supported (e.g. mobbing and area cleaning). The commands for those new functions are not clear yet

@Anthrax yes, basically all channels are already generated dynamically, but based on a ‘database’ entry.
Take a look at this file, maybe you can propose the additions you would like

Yeah, I’m already on it…
I have been digging deep yesterday but hit a road block with color conversation… On the weekend I might be able to make more progress. Pull request is coming up as soon as possible (full time job, double daddy).

What I meant by dynamically, was basically to create the database file from the discovery response automatically :wink: