Once day maybe… I would love to have it as well.
It is actually quite complicated as far as I can see. The maps are not coming from the device itself, instead from the Xiaomi cloud. I sniff the network traffic, setting up MITM proxy to workaount the ssl encryption, but even than, there is quite some crypto stuff done. So the data can’t be easy read.
There is some documentation how to logon to the cloud & sdk, but it requires you to sign up and provide copies of my passport, which I’m not willing to do.Besides if I remember well, it was all in Chinese.
Anyway, I guess in the long run we will figure out how, as that would also solve the token retrieval, but don’t count on it anytime soon.
13:45:51.056 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid status response
13:46:21.096 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from OFFLINE (COMMUNICATION_ERROR): No valid status response to ONLINE
13:46:31.115 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid status response
13:47:01.142 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from OFFLINE (COMMUNICATION_ERROR): No valid status response to ONLINE
13:47:11.171 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid status response
13:48:21.189 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from OFFLINE (COMMUNICATION_ERROR): No valid status response to ONLINE
13:48:31.317 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid consumables response
13:49:01.328 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from OFFLINE (COMMUNICATION_ERROR): No valid consumables response to ONLINE
13:49:11.421 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'xiaomivacuum:vacuum:Hugo' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No valid status response
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.
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.
(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.
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
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 ?
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…
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.!
@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.
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?