[TUTO] – Jeedom : Integration of Xiaomi Robot Vacuum

By | 28 September 2017

Hello!

Today I explain the integration of Xiaomi Robot Vacuum! I finally got my vacuum cleaner Xiaomi Robot Vacuum In fact I will detail its integration within Jeedom! Although it is possible to drive it through the application, it’s still nice to integrate it into its home automation system so that it can interface with all the eco system of the house!

Pre-requisite

  • The Xiaomi Home plugin from Jeedom
  • The Xiaomi Robot Vacuum cleaner

If you have an Apple device (iPhone/iPad)

  • IBackup Viewer: http://www.imactools.com/iphonebackupviewer/
  • DB Browser for SQLite: http://sqlitebrowser.org/

These 2 tools are necessary to recover the token of the vacuum cleaner in order to integrate it into Jeedom and be able to control it

If you have an Android device

I invite you to follow the excellent tutorial of sys-advisor

Installing the Plugin

  • Direction the Market Jeedom! And do a search with the term “Xiaomi“. Select the Xiaomi Home plugin and then click Buy

Integrating the vacuum cleaner Xiaomi Robot Vacuum

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • You can then install the plugin as usual and then activate it!

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • If you are impatient you can start the installation of dependencies (1) and then start the Daemon (2). If you are patient, it will be done by itself

Integrating the vacuum cleaner Xiaomi Robot Vacuum

Installing the robot in the IOS application

After installing the plugin, the next step is integrating the vacuum cleaner into the mid-Home application. Once the application is downloaded and your MiHome account is created, there is plusqu’a connected to your vacuum cleaner.

  • Connect to your Wi-Fi network on your iPhone/IPad
  • Launch the MiHome application and before logging into your account, you must change the Xiaomi server and select “Mainland”

Log in

  • Press “+” and then “ADD device

Integrating the vacuum cleaner Xiaomi Robot VacuumIntegrating the vacuum cleaner Xiaomi Robot Vacuum

  • Select your device, here “Mi Robot Vacuum

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • Check that the blue led flashes on your vacuum cleaner and select “Blue light blinking” and then “Next

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • Enter your Wi-Fi network password and then “Next

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • Here it asks you to change the network and connect to the Wi-Fi network broadcast by your vacuum cleaner. Click on “Set Wi-Fi Now“, connect to the network of the vacuum cleaner “Rockrobo-Vacuum _ xxx” and then return to the MiHome application.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • If everything is good, the vacuum cleaner connects to your Wi-Fi network.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • Once the connection is established, it asks you 2, 3 questions that you can pass if you wish, by pressing “Skip
  • The initialization of the vacuum cleaner begins.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

Update

If your device is not up to date, it will offer you to update it.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • If you want to update it, click on “Update“. From then it tells you the current version, the destination version as well as the changes made.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • Click “Update” again to start the update.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

Search for the token

This is where the operations become a little more geeky but not insurmountable. The Xiaomi Robot Vacuum Cleaner is one of the only Xiaomi Wi-Fi devices not to automatically raise its token in Jeedom. To be able to recover the token it will comes trick and use the 2 small software téélchargés at the beginning of this tutorial.

Retrieving the database from the MiHome app

  • Connect your iPhone/iPad to the computer and then perform a backup
  • Install and run the iBackup Viewer utility, it will recover the latest backup of your iPhone/IPad
  • Select the logo representing a tree

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • On the left side look for then select “AppDomain-com. Xiaomi. Mihome” Then “Xxxxxxx_mihome. SQLite” and select “Export“.

Integrating the vacuum cleaner Xiaomi Robot Vacuum

Encrypted token recovery

Now that we have the database of the application, it will need to go in order to recover the token of 96 characters. For this we will use the 2nd utility, downloaded at the beginning of this tutorial.

  • Install and launch the DB Browser for SQLite utility
  • Click “Open Database

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  • Select “Browse Data
  • Then scroll to the right to see the column “ZTOKEN
  • Click in the box corresponding to your token to make it appear in full on the right side of the software

Integrating the vacuum cleaner Xiaomi Robot Vacuum

Decrypting the token

Now that we have our 96 characters token, we need to decrypt it. For this nothing simpler, go to this site: http://aes.online-domain-tools.com/

  • Fill in the boxes like the picture below:

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  1. Select “Text
  2. Paste your 96-character token recovered in the previous step
  3. Select “Hex
  4. Select “AES
  5. Choose “ECB
  6. Paste this chain of 0:00000000000000000000000000000000
  7. Choose “Hex” again
  8. Click “Decrypt!
  9. Your key of 32 characters is found here, it is this key that we will fit in Jeedom

Integrating the vacuum Xiaomi Robot vacuum into Jeedom

We got it all! Now place to the integration of the vacuum cleaner Xiaomi Robot vacuum in Jeedom!

  • Go to “Plugins” > “Automation protocol” > “Xiaomi Home” > and click on the big “+” to add a device.
  • Then configure your new equipment as the image below:

Integrating the vacuum cleaner Xiaomi Robot Vacuum

  1. IP address of your vacuum cleaner
  2. Selection of equipment type
  3. Copy/Paste the 32-character token retrieved in the previous step
  4. Click on “Get Info” (it is possible that it does not working the first time, try again several times)
  5. Save

That’s all ! your vacuum cleaner is integrated in Jeedom! You should see it on your dashboard with a widget that looks like CA:

Integrating the vacuum cleaner Xiaomi Robot Vacuum

I hope this information will have been useful to you. In any case feel free to leave a comment if you have any questions.



Sources

If you like this post, don't hesitate to share it !

Leave a Reply

Your email address will not be published. Required fields are marked *