Xiaomi Cloud Vacuum Map Extractor


I have created an integration that provides a way to present a live view of a map for Xiaomi, Roborock and Viomi vacuums without need for rooting.


Really nice, have been looking for something similar for a long time :slight_smile:

Is it also possible to extract the map coordinates to make zoned cleaning possible?. I cant get this to work with my 1st Gen Xiaomi robot vacuum

It will be, give me some time :slight_smile:


Looks promising to me. I’ll follow this post :wink:

I have entered the Basic configuration in configurations.yaml and restarted Homeassistant.
But it comes with an error message and does not start completely. The error message is as follows:

“2020-09-30 16:22:06 ERROR (MainThread) [homeassistant.config] Invalid config for [camera.xiaomi_cloud_map_extractor]: length of value must be at most 32 for dictionary value @ data[‘token’]. Got ‘x4x4xexexxfxxxxxxx1x8x7xxx2xaxxcxxx9xxxx’. (See /config/configuration.yaml, line 164). Please check the docs at https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor”.

The length of my token is 41 characters …

Are you sure this is a valid token to your vacuum?

Wow nice , gonna try later! With my x50

Are you going to post on HACS?

I will add it to HACS when I finish a documentation. Right now you can add it as a custom repository

In the “https://github.com/benct/lovelace-xiaomi-vacuum-card” it works?!
This is the entry in the configuration.yaml:

Status des Xiaomi S6 Vacuum Robot



  • platform: xiaomi_miio
    token: !secret xiaomi_token
    name: Xiaomi S6 Vacuum Cleaner

So in this card you should use the same token (!secret xiaomi_token), does it really have 41 characters?
In xiaomi_miio platform validation also requires 32 characters.

Sorry about that. But there my token has the 41 characters and it works?!

You can try to locally change this line to:

        vol.Required(CONF_TOKEN): cv.string,

and check if everything works.

Excuse me … Somewhere a transmission error must have crept in. There are actually only 32 characters.
I replaced the token now, but now I get the following error:

"Logger: homeassistant.components.websocket_api.http.connection.3925327632
Source: components/websocket_api/http.py:87
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 19:19:56 (1 occurrences)
Last logged: 19:19:56

Unable to serialize to JSON. Bad data found at $.event.data.old_state(state: camera.xiaomi_cloud_map_extractor).attributes.blocks=b’\x14’(<class ‘bytes’>, $.event.data.new_state(state: camera.xiaomi_cloud_map_extractor).attributes.blocks=b’\x14’(<class ‘bytes’>"

I have updated camera.py file, please check out the latest version

The change you made seems to work. I no longer have an error message. An entity camera.xiaomi_cloud_map_extractor has now been created. Great!

How do I display the whole thing now?

What do you mean by the whole thing? Map image should be shown in a camera, if you want it to draw paths, zones, etc. you have to configure draw section (check out full config).

I meant how I now come to a representation of the map. I have to be able to represent it somehow in a card.

You can do it in picture entity card or picture glance card.

1 Like