Add Map to Xiaomi vacuum cleaner

Hi,

Does someone has a way to turn off the robot ? I can do it by pressing the power button 3s (after having turned off the smart socket) but it is not very user friendly… do you know of any command to do so ?

Thanks

Any idea why my map reset the vacuum path in the middle of the run?
This only happens on HA image. On xiaomi app the image show the full cleaning path.
I haven’t installed dummy cloud yet. I just rooted and follow asphalter instructions

Rooting the vacuum gave me some memories when I was jailbreaking the first at&t iPhone… good times…

Amazing work everyone… thx a lot!

1 Like

Just a short preview how it looks like in my wall in dashboard

1 Like

Is there any other ways to add nogo zones than the official Xiaomi ap?

Well… make the other way around and just define zones the vacuum is supposed to clean

Hey @luc3as . Were you able to get the E20 working in Home Assistant?

I tried to add mine and it says “unavailable” in HA. Not sure if that’s an error or the E20 is not supported. I can’t actually see anything saying that it is supported

Thanks!

Hello, yeah I am using it without any problems. I received token as usual with Mi devices, and then added it to HASS. Can you ping vacuum local IP address from your HASS instance ?

Hey @luc3as thanks for replying!!!

Yep. I got the token with the Packet Sender app option because at my experience level, I just couldn’t get the miio app to discover the tokens on my Hassbian Pi Zero W install.

I’m worried I might have the wrong token, or have entered it wrong as a vac shows up in HA but it says that it’s unavailable. Did you experience this?

Would you mind taking a look at my config? I tried it with quotes around the token and without, no luck. Do I put spaces between the sets of two characters in the token?

Thanks again for replying, I really appreciate it mate.

Edit: bonus round… could you paste your config? Thank you

vacuum:

  - platform: xiaomi_miio

    host: 10.0.0.20

    token:'01E1AIREMOVEDSOMEDEDD'

I have my Roborock working and have my token without quotes. I have a feeling your token is too short.

This is how it looks in my working configuration:

Thanks @Piggyback
Love the Stimpy pic. Is that an e20 or s50 vacuum? Not sure if it matters.

My actual key is 32 characters, got it from the Packet Sender method of joining the factory reset wifi of the device and extracting the last 32 characters. Great to see that it’s no spaces, thank you.

I’ve seen some xiaomi keys only 16 characters? Not sure if it’s variable.

How did you get your keys? I couldn’t find a way to install the Miio command line utility in Hassbian. Again, I’m hamstrung by inexperience, but npm doesn’t appear to work on Hassbian and I’m not sure if putting that entry for the vac into config actually installs the miio command line utility too.

I’ve come a long way over the last few months from struggling to get the os to install over my crappy internet to finally just tweaking config. Feels great and really appreciate the help.

You should take a look at Valetudo

1 Like

Hi @TraktorS2,
It took me some tricks to get the token. As I run on a RPI on Hassio, I don´t have much options to play around there. So what I did is I downloaded the full package of Xiaomi Miio on my desktop and followed the instructions to get the key through Visual Studio with Phyton and all components through a powershell terminal.

Thanks for your post😊
so, it looks “rooted” means pack ssh key with original image and upload to vacuum?

Having the same problem. The code should include some persistence between cleaning cycles. Which mihome app achieves. Other then that it is a good solution to see the last location of the robot.

Started noticing the same.
@asphalter, do you know if something has changed within the vacuum?
On a S50, can’t remember having this on the v1, but I can do some test runs.

This is still the best way to get the map onto HA by far, so hopefully it can be worked around.

Anyone knows if there is any way to do any of this on s6 (gen.3?). Valetudo doesn’t supports it yet…

We’re you ever able to root or get maps for the ‘E’ vacuums?

No, It’s very probably not possible as the CPU in these vacuums is ESP8266 like chip, while with first and second generation there is big ARM CPU like in raspberry pi. I don’t know if this small chip compute something anything with map, or if it just sends raw data to the cloud where it is processed. I was looking for some way of “hacking” the mi home app, or gain access to some cloud api, but without any luck.

Hi all there’s a guy who has a fork off Valetudo RE which claims he reversed engineerd the web api:


If we could use this to retrieve the map anyone can(even without root) could add the map(maybe it’s the same way Flolevac did it)

2 Likes

@asphalter I really like your approach. Especially the SSH control master connection with rsync is very cool. :+1:

Just curious: why are you running the script on the vacuum and not on the HASS host? I know the latter would require a persistent SSH connection even if the vacuum is not running, but then we could keep the vacuum unmodified (except from the SSH key).