Download map of vacuum from Xiaomi cloud to determine zone coordinates

I just drop it here in case someone finds it useful:

If you use the Xiaomi Miio integration for your robot vacuum and you want to clean a zone you first need to determine the zone coordinates. The docs of the integration show how to get the coordinates using some android app or when using Valetudo firmware.

Since I do not use any of these, I needed to find a different way. And I found the solution at the iobroker-side. I took the code and put together a small command line tool which you can use to download the map of the vacuum from the cloud. You can then open it in the Xiaomi Vacuum Map Viewer to get the coordinates for your zones.

As I thought this could be useful for other HomeAssistant users I published my code incl. instructions on how to use it here: GitHub - da-mkay/mihome-vacuum-map-dl: Download rrmap of your vacuum from xiaomi cloud

PS: I know there is also lovelace-xiaomi-vacuum-map-card but for know I want to stick to the original Xiaomi Miio integration.

2 Likes

Hello
Thank you. Got the new Xiaomi X20+ and am trying your way. But fail already with the installation. Prerequisite is “NodeJS”. Where can I find this exactly? With “git” is your git meant, right?
Sorry, I’m no longer a beginner, but I always have trouble with these gits when something has to be installed…
Thanks for the help.

You can find an installer for NodeJS here: Node.js — Download Node.js®
Git is a tool that you need to install as well. You need it to be able to run “git clone …” as described in the project’s README to clone the git repository of the project, i.e. downloading the project’s code.

Thank you. So install everything on Windows, not in Home Assistant?
The git tool is this one? https://gitforwindows.org/

Yes, you do not install this in Home Assistant. My project is a tool that you run locally to download the map from your vacuum.
Regarding git: Personally, I would download it from the official site: Git - Downloading Package

I’m slowly getting closer. Thanks for the support. Unfortunately, I get the following error message(s). Do you have any ideas?

Hello,
I am getting the same error message.
Fehlermeldung Karte

Sorry for the late reply, I was on vacation.

I do get the same error, if my machine and the vacuum cannot communicate. For example because the vacuum is in a guest wifi, or there is no network route to the network the vacuum is in, or a firewall blocks communication.

Try if you can ping the vacuum from your machine. At least my Roborock S7 answers to ping messages. If you get an answer, communication should work. If not, you need to fix those network issues before my tool can download the map from the vacuum :slight_smile: