- 1 Pre-requisite
- 2 Installing the Plugin
- 3 Installing the robot in the IOS application
- 4 Search for the token
- 5 Integrating the vacuum Xiaomi Robot vacuum into Jeedom
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!
- 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 house-and-Home automation
Installing the Plugin
- Direction the Market Jeedom! And do a search with the term “Xiaomi“. Select the Xiaomi Home plugin and then click Buy
- You can then install the plugin as usual and then activate it!
- 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
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”
- Press “+” and then “ADD device“
- Select your device, here “Mi Robot Vacuum“
- Check that the blue led flashes on your vacuum cleaner and select “Blue light blinking” and then “Next“
- Enter your Wi-Fi network password and then “Next“
- 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.
- If everything is good, the vacuum cleaner connects to your Wi-Fi network.
- 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.
If your device is not up to date, it will offer you to update it.
- 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.
- Click “Update” again to start the update.
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
- On the left side look for then select “AppDomain-com. Xiaomi. Mihome” Then “Xxxxxxx_mihome. SQLite” and select “Export“.
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“
- 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
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:
- Select “Text“
- Paste your 96-character token recovered in the previous step
- Select “Hex“
- Select “AES“
- Choose “ECB“
- Paste this chain of 0:00000000000000000000000000000000
- Choose “Hex” again
- Click “Decrypt!“
- 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:
- IP address of your vacuum cleaner
- Selection of equipment type
- Copy/Paste the 32-character token retrieved in the previous step
- Click on “Get Info” (it is possible that it does not working the first time, try again several times)
That’s all ! your vacuum cleaner is integrated in Jeedom! You should see it on your dashboard with a widget that looks like CA:
I hope this information will have been useful to you. In any case feel free to leave a comment if you have any questions.