Xiaomi Robot Vacuum Binding

i get the percentage of the battery remaining, if i ask (for example) the box type, ill get a number that represents the box (0, 1 or 2)

I actually had the very same issue.

I initially tried to use PaperUI to configure instead of the things file I had (I setup when PaperUI configuration was not working yet :)); it did not work, but I got a better CONFIGURATION_ERROR message.

And actually, it seems the problem was on the consumables, as the very latest version of the binding removed the support for consumables#*_time and left only the consumables#*_percent. Since I was using the former approach, it stopped working.

Now I removed those invalid items, and it works again for me.

Hope it will work for you as well!

Interesting finding… note that these channels have not been changed since the very first version of the binding. However, that probably indicates some other issue which maybe to more strict checking in the latest version came to light.

NB, in most cases, the issue CONFIGURATION_ERROR is due to the fact the model info is mandatory in the text config, which was not mandatory in the early 2.4 versions.

Hi,

I got a Roborock S5 Max.
I am trying to get the token somehow, but up to now: no chance.

Is there anybody with the ROBOROCK App on iPhone who managed to extract the token?
With the information from the binding I do not succeed. They are all talking about MI HOME App…I am not using this one, and I am afraid to use it, because the token will most probably change between the use of these 2 apps (???).
Any help appreciated…

Best regards
Stefan

With app_zoned_clean you can specify how often the cleaning should be done, once, twice or three times.
With ‘segment clean’ you can also specify this in the app. Is there a way to specify the number for app_segment_clean as well?

Hi Stefan,

you have to use an android device with a special version of the MI Home App in order to be able to read out the token. Take a look at this website.

Best regards

How did you tried to extract the token?
I think it doesn’t differ that much from the Mi-Home app.
Tell me the steps you have tried. The token extract is not that easy on an iPhone for the first try, but it is doable.

I think it will not change. It will only change token when you disconnect the Robot from your Wi-Fi or (obviously) you reset the robot.

I did the device binding and send it to you, but still can’t get the configuration in openhab, the only way for me to make it work from openhab is sending the comands, is there anyway how I can test the binding that I made and implement it in openhab or I need to wait for you to upload it to the binding?

Even if the model info was not mandatory, I had it anyways from the beginning :slight_smile:

Anyhow, I could replicate the behavior:

  • Comment out the consumables#*_time, it works
  • Remove the comment, it gives CONFIGURATION_ERROR

Note also that the consumables#*_time channels are not even visible in PaperUI – that was actually the hint that suggested me to comment them out from configuration.

Thanks for your reply, I will sent screenshots later on, but for sure you need to reset the S5 to connect it to the other app, because you need to use its “own” WIFI to setup, otherwise you will not be able to see the device in the MI APP.

Then I am lost at this point. No Android Device. :frowning:

Just use the Home App Its nearly the same behavior with some additional stuff like a remote. The map is stored at Xiaomi/Roborock servers and will survive the cange of the app.

Hallo,
I have a discovery problem with my vaacum. It is discovered two time.
one is discovered like vaacum and the other is generic. do you know why?

> 2020-01-16 19:33:11.996 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'miio:generic:05C5F2F5' to inbox.
> 
> ==> /var/log/openhab2/events.log <==
> 
> 2020-01-16 19:33:11.997 [home.event.InboxAddedEvent] - Discovery Result with UID 'miio:generic:05C5F2F5' has been added.
> 
> 2020-01-16 19:33:12.290 [home.event.InboxAddedEvent] - Discovery Result with UID 'miio:vacuum:05C5F2F5' has been added.
> 
> ==> /var/log/openhab2/openhab.log <==
> 
> 2020-01-16 19:33:12.289 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'miio:vacuum:05C5F2F5' to inbox.

This is because Xiaomi impemented 2 different methods for discovering devices. Depending on the device it supports one of the 2 methods or both. If it supports both you see it twice.
You can ignore one of the 2, functionality is not different.
Initial description label will be different as both methods provide different initial information.

1 Like

Thanks Marcel. I thought I messed with the bindings :laughing:

Hi all,

I have added my Mi Robot - all items work, apart from network ones.
Defined similar to the following:

String  XiaVac_NetSSID    "Network SSID [%s]"     <network>   (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#ssid" }
String  XiaVac_NetBSSID   "Network BSSID [%s]"    <network>   (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#bssid" }
Number  XiaVac_NetRSSI    "Network RSSI [%1.0f]"  <network>   (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#rssi" }
Number  XiaVac_NetLife    "Uptime [%1.0f]"        <clock>     (gXiaomiVac,gXiaomiVacNetwork) {channel="miio:vacuum:XXXXXXX:network#life" }

Values are just empty. Same binding with, for instance, Yeelight shows network stuff.
What can be a reason?

Thanks.

1 Like

Thanks for this binding!

Had some difficulties with retrieving the token but finally managed to use my Roborock S5 Max in openHAB!
First mistake I made was using the Roborock app in stead of the Xiaomi Home app.
After that it worked fine!

Now I can use the sitemap to select specific rooms and start cleaning them.
If anyone is interested I can post some code for that, must mostly I found out with the posts from others in this topic.

Hi,

I would like to get access to the map data from the xiaomi cloud. As described in the protocol map_v1, I have received the pointer to map data (example: robomap%2F123456789%2F0).

With which base-url can I get the map information?

https://???/robomap%2F123456789%2F0

Best regards,
Phil

@philissimo as it states on the page Unfortunately no examples yet to retrieve it independently of the Mi Home app
There is no URL to pull unless you root your device and install additional software on it.

The only other alternative is to pull it from the xiaomi clound which requires the reverse engineering of the protocol or signing NDA (which prevents it as opensource solution)

1 Like

@marcel But it seems there is a way since the 3rd party app for the xiaomi vacuums “Flolevac” displays the map. It does however require you to sign in to the xiaomi cloud with your credentials.