Xiaomi Robot Vacuum Binding

Hi @Multisaft7

First install the market place binding. See Distributing bindings through the IoT Marketplace for details.
Once that is activated you can go to the addons, and select the Xiaomi Vacuum binding (see screenie).
Once installed, read the first topic on how to get the tolken, as that is the tricky piece.

Hope this helps you getting started.

1 Like

But for this market installation i need a snapshot version of openhab? right?

I think release 2.1 already has the market place binding. Released versions before 2.1 won’t have it indeed.

1 Like

Same here…

Status: OFFLINE - COMMUNICATION_ERROR No valid Network response

The most common reason is wrong token.
As in that case the vacuum is not responding at all.
If you are sure the token is correct, can you pm the (whole) log on trace level, than I can try to understand what’s happening.

Hi Updated the version today

31 July More logging wrt connectivity

  • Set online if at least 1 message works
  • Add the network parameters (e.g. signal strenght)
  • Add the firmware version
  • (Experimental) Allow for other MiIo devices to be added (manually) and send commands to.

NB, for other MiIo devices (e.g. powerstrip) the only possibility is to manually send commands via the command channel.

As usual, to update, remove the binding and add it again.
Also as channels have changed, delete the thing and add it back again to have the correct channel definition.

I don’t know if this helps anybody with finding the tokens of xiaomi products but it did provideme with a token for my wifi plug : https://github.com/aholstenson/miio/blob/master/docs/management.md

It did not find my token for the vacuum robot, and I’ll test the wifi plug

I had no success with the wifi plug: (https://www.aliexpress.com/item/Original-Xiaomi-Mi-Smart-Socket-Basic-Edition-WiFi-Cute-Mini-High-Temperature-Protection-Input-90-250V/32810958871.html?spm=a2g0s.9042311.0.0.z2CacC)

there is the log:

2017-08-01 19:23:23.655 [ThingAddedEvent           ] - Thing 'xiaomivacuum:unknown:71a3e518' has been added.
2017-08-01 19:23:23.669 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:71a3e518' changed from UNINITIALIZED to INITIALIZING
2017-08-01 19:23:23.748 [ThingUpdatedEvent         ] - Thing 'xiaomivacuum:unknown:71a3e518' has been updated.
2017-08-01 19:23:23.754 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:71a3e518' changed from INITIALIZING to ONLINE
2017-08-01 19:23:32.587 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:71a3e518' changed from ONLINE to REMOVING
2017-08-01 19:23:43.778 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:71a3e518' changed from REMOVING to REMOVED
2017-08-01 19:23:43.862 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:71a3e518' changed from REMOVED to UNINITIALIZED
2017-08-01 19:23:43.872 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:71a3e518' changed from REMOVED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-08-01 19:23:43.880 [ThingRemovedEvent         ] - Thing 'xiaomivacuum:unknown:71a3e518' has been removed.
2017-08-01 19:24:20.212 [ThingAddedEvent           ] - Thing 'xiaomivacuum:unknown:820b127c' has been added.
2017-08-01 19:24:20.226 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from UNINITIALIZED to INITIALIZING
2017-08-01 19:24:20.333 [ThingUpdatedEvent         ] - Thing 'xiaomivacuum:unknown:820b127c' has been updated.
2017-08-01 19:24:20.339 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from INITIALIZING to ONLINE
2017-08-01 19:24:40.350 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid Network response
2017-08-01 19:25:10.365 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from OFFLINE (COMMUNICATION_ERROR): No valid Network response to ONLINE
2017-08-01 19:25:20.382 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid Network response
2017-08-01 19:25:40.856 [ItemChannelLinkAddedEvent ] - Link 'xiaomivacuum_unknown_820b127c_network_ssid-xiaomivacuum:unknown:820b127c:network#ssid' has been added.
2017-08-01 19:25:50.398 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from OFFLINE (COMMUNICATION_ERROR): No valid Network response to ONLINE
2017-08-01 19:26:00.405 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid Network response
2017-08-01 19:26:16.913 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from OFFLINE (COMMUNICATION_ERROR): No valid Network response to REMOVING
2017-08-01 19:26:16.919 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from REMOVING to REMOVED
2017-08-01 19:26:16.974 [temChannelLinkRemovedEvent] - Link 'xiaomivacuum_unknown_820b127c_network_ssid => xiaomivacuum:unknown:820b127c:network#ssid' has been removed.
2017-08-01 19:26:17.306 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from REMOVED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2017-08-01 19:26:17.308 [hingStatusInfoChangedEvent] - 'xiaomivacuum:unknown:820b127c' changed from REMOVED to UNINITIALIZED
2017-08-01 19:26:17.312 [ThingRemovedEvent         ] - Thing 'xiaomivacuum:unknown:820b127c' has been removed.

I can 't verfify if the token was correct, though.
Thank you so much for developing this :slight_smile:

Unfortunately, I’m getting communication error with the right device id and right token.
It keeps going online and offline every 2 seconds.
And as total newbie, I don’t understand how do you use the command channel to power on off ?

A quick iOS Guide to get the “Right” Token:

  1. Setup iOS device with the Mi-Home app.
  2. Create an backup of your iOS Device using iTunes.
  3. Install iBackup Viewer from here: http://www.imactools.com/iphonebackupviewer/
  4. Extract this file /raw data/com.xiami.mihome/mihome.sqlite to your computer (In my case it was not the mihome.sqlite…but the 1589697581_mihome.sqlite works for me…
  5. Open the file extracted using DB Browser for Sqlite (http://sqlitebrowser.org/). You will then see the list of all the device in your account with their token.!image

I hope this will work for the Apple Users :wink:

10 Likes

I am making some changes that may help.
I’ll also give some examples of what I think are valid commands to control the light.

Still nothing will work without valid tolken, so that’s prerequisite to get anything working.

Sound good! :slight_smile:
Is there a way to determine if I use the correct token?

@Moellegaard If you open the database (see screenshot in above post) from a working Android or Apple Mi Home app, than you can be fairly confident you have the right key.

It needs to respond to any command other than the ‘ping’ (only the ping goes without tolken).
So if the device is getting discovered or you can see that the ping succeeded, but it does not reply to any command you can be fairly sure the tolken is not correct.

1 Like

Thanks for the binding Marcel.

I’ve just had one of these arrive, and I’m confused by the mi home app so thought I’d ask here.

I’ve connected to the vacuum on WiFi and it shows in the app with the charge %, but there’s no other controls I can find. Can anyone help or suggest anything?

This is how it looks for me in the Mi app.
The buttons in the bottom operate the vacuum.

For openhab you need to extract the tolken from the app as described in the first post

and that’s not how it looks for me. :frowning:

Am I even using the right app? It’s this one I’m using

All i have is something similar to this (taken from google; mine shows my vacuum):-

… and there doesn’t seem to be any way to get any further functions.

Okay, so the screen I showed is after I click the vacuum icon on the screen you showed .

If it does not being you to the screen I showed, maybe something went wrong with downloading the plugin. I would uninstall and reinstall the app.

Hi, I am currently owner of an old roomba 550 vacuum cleaner, it does not vacuum the best and it does not like my black carpet(it thinks its falling of a stair or something). So I am considering upgrading to the xiamo but I have a few questions:
does anyone sell it in europe, or do I need to pay the 25% import tax?
How well does it vacuum?
What is the overall height of it?
What is the height of the docking station?
What is the depth of it when docked, icluding charge station?
Is it easy to get replacement parts for it?

The binding looks awesome:slight_smile:

Thanks Marcel. Nothing happens when i click on the vacuum icon, and i’ve installed on two different devices and it’s been like that. I guess i can only try again.

does anyone sell it in europe, or do I need to pay the 25% import tax?
I just ordered from China for GBP260 and didn’t pay any import duty (but maybe I got lucky?).

How well does it vacuum?
The vacuuming is good, but i can’t say how it compares with others.

What is the overall height of it?
approx 9cm

What is the height of the docking station?
approx 13cm

What is the depth of it when docked, icluding charge station?
approx 40cm

Is it easy to get replacement parts for it?
no idea.