Guide to retrieve Xiaomi Roborock (and other) tokens!

For some reason I get wrong passord when I try to use the extractor

I have got my token however I cannot add it to HA. It throws an error “Unknown error”

do you have static ip adress on the roborock?

Yes I do. Its just that I cannot connect it to HA I also got my token etc

do you have this one in your yaml config file?

vacuum:
  - platform: xiaomi_miio
    host: 192.168.1.63
    name: Støvsugeren i huset
    token: 7593257327502583020 

Got it finally working had to restart HA thanks

1 Like

unfortunately not. Mine has cameras and I can see live view from it in the Roborock app

Got it all setup in HA, but now the device is missing from the Roborock app. Can I not have it visible in both apps?

I believe if it isn’t rooted you can simply use both HA and the roborock app. If you did flash it with something like Valetudo or Valetudo RE, well then you can only use that (which is in fact the better option since you won’t make constant requests to Chinese servers)

Can’t retrieve the token anymore, got the ‘Login step 2 failed’ error, anyone have the problem ? thk

I wrote this guide a long time ago, since then I believe there are easier solutions. Which Roborock do you have? Also I like to mention that you should take a look if your vacuum is supported by Valetudo or Valetudo RE. This will liberate your robot from the cloud, makes your data private and you can then just get the token with ease from the UI (at least in the case of Valetudo RE).

Though if you are just looking to get your token, read up on this thread since I remember people posting newer and easier solutions.

Unfortunately I wouldn’t know how to get one anymore since I have flashed my robot a long time ago and I will never go back :rofl:

found a working way on another topic, with use of bluestack and an older version of mi home apps, work perctly, but my robot is not found anyway

( it is working very good from far, but today i changed of isp so dhcp, fix ip and all stuff need to be reconfigured, and since, i am not able to add it again :frowning: )

I just added my roborock to Xiaomi Home and after that I used the Xiaomi Miio - Home Assistant intergration to add the robot to HA. Remember that the Mi home account is not the one you log into the roborock app with.

yes, agreed, but my login is not accepted in HA Miio. Which one do you use, the same as in the mi home apps ? if yes, it’s what i am doing :frowning:

Yes thats the one I used. I triede with the roborock app account and password yesterday and could not understand why it would not work. Can you sign in here: Xiaomi Global丨Official Website丨Mi.com - Mi Global Home

oh ! just succeed with the manual configuration ! ( ip / token )

edit : ok well is integrated, but no more information or map, don’t understand what i am doing wrong :frowning:

edit2 : hum strange, start and statut of working is good, but not map or brush information… will try to let it clean 1 time to see if informaition is coming up

edit3 : ok information about brush and some other are desativated with manual configuration, i can understand that, but i can’t understant why mioo is not recognazing my account

edit4 : no problem to login the website ( already tested when first refused )

Always impossible to connect :frowning:

but it’s another problem, not token, so i will don’t bother you here.

Tried to include that in the configuration.yaml but the integration then told me to remove it.
Have no luck adding the Roborock s5…