Xiaomi Air Purifier is one of the best on the market in the price/value category. Like many other Xiaomi devices, it can be controlled using a great home automation system called Domoticz.
The only problem that I had is that for the 2S version, there is no way to obtain the device token needed for controlling the device using the miIO library.
Here are the steps needed to obtain this token using a Linux machine and a non-rooted Android phone.
./adb backup -noapk com.xiaomi.smarthome -f backup.ab
java -jar abe.jar unpack backup.ab backup.tar
tar -xvf backup.tar
sudo apt-get install sqlitebrowser
SELECT localIP, token FROM devicerecord
As a result, you will get a list of the tokens with the IPs of the devices in your networks to which they belong (I’ve blurred the tokens just in case in the picture):
Now you can take the appropriate token and use it within your Domoticz setup.
The post Extracting the device token from Xiaomi Air Purifier 2S EU for Domoticz usage appeared first on Running with Ruby.
June 25th, 2025 – Canonical, the company behind Ubuntu, and Pure Storage, the IT pioneer…
Co-authored with Julie Muzina A year ago, during our Madrid Engineering Sprint, we challenged ourselves…
Welcome to the Ubuntu Weekly Newsletter, Issue 897 for the week of June 15 –…
This is the first optimized Ubuntu Core image available on MediaTek’s Genio 350, 510, 700,…
Data centers are expensive: automation is the solution Today, managing a data center requires striking…
Our first Ubuntu IoT Day in Southeast Asia – and our first ever event in…