mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-08-03 06:28:02 +00:00
Minor changes to format
This commit is contained in:
parent
cc44067d07
commit
2385b618a2
@ -24,11 +24,10 @@ Follow the pairing process using your phone and Mi-Home app. From here you will
|
||||
Before you begin you need to install `libffi-dev` by running the command below. This is needed for `python-mirobi` to be installed correctly.
|
||||
|
||||
```bash
|
||||
apt-get install libffi-dev
|
||||
$ sudo apt-get install libffi-dev
|
||||
```
|
||||
|
||||
<p class='note warning'>
|
||||
If your Home Assistant installation is running in a [Virtualenv](/docs/installation/virtualenv/#upgrading-home-assistant), make sure you activate it by running the commands below.</p>
|
||||
If your Home Assistant installation is running in a [Virtualenv](/docs/installation/virtualenv/#upgrading-home-assistant), make sure you activate it by running the commands below.
|
||||
|
||||
```bash
|
||||
$ sudo su -s /bin/bash homeassistant
|
||||
@ -37,45 +36,47 @@ $ source /srv/homeassistant/bin/activate
|
||||
|
||||
To fetch the token follow these instructions depending on your mobile phone platform.
|
||||
|
||||
### Windows and Android
|
||||
### {% linkable_title Windows and Android %}
|
||||
|
||||
1. Configure the robot with the Mi-Home app.
|
||||
2. Enable developer mode and USB debugging on the Android phone and plug it into the computer.
|
||||
3. Get ADB tool for Windows: https://developer.android.com/studio/releases/platform-tools.html
|
||||
4. Create a backup of the application com.xiaomi.smarthome:
|
||||
```bash
|
||||
.\adb backup -noapk com.xiaomi.smarthome -f backup.ab
|
||||
$ adb backup -noapk com.xiaomi.smarthome -f backup.ab
|
||||
```
|
||||
5. If you have this message: "More than one device or emulator", use this command to list all devices:
|
||||
```bash
|
||||
.\adb devices
|
||||
$ adb devices
|
||||
```
|
||||
and execute this command:
|
||||
```bash
|
||||
.\adb -s DEVICEID backup -noapk com.xiaomi.smarthome -f backup.ab # (with DEVICEID the device id from the previous command)
|
||||
$ adb -s DEVICEID backup -noapk com.xiaomi.smarthome -f backup.ab # (with DEVICEID the device id from the previous command)
|
||||
```
|
||||
6. On the phone, you must confirm the backup. DO NOT enter any password and press button to make the backup.
|
||||
7. Get ADB Backup Extractor: https://sourceforge.net/projects/adbextractor/
|
||||
8. Extract All files from the backup:
|
||||
```bash
|
||||
java.exe -jar ../android-backup-extractor/abe.jar unpack backup.ab backup.tar ""
|
||||
$ java.exe -jar ../android-backup-extractor/abe.jar unpack backup.ab backup.tar ""
|
||||
```
|
||||
9. Unzip the ".tar" file.
|
||||
10. Open the SQLite DB miio2.db with a tool like SQLite Manager extension for FireFox.
|
||||
10. Open the SQLite DB `miio2.db` with a tool like SQLite Manager extension for FireFox.
|
||||
11. Get the token from "devicerecord" table.
|
||||
|
||||
|
||||
### Linux and Android (rooted!)
|
||||
### {% linkable_title Linux and Android (rooted!) %}
|
||||
|
||||
1. Configure the light with the Mi-Home app.
|
||||
2. Enable developer mode, USB debugging and root permission only for ADB on the Android phone and plug it into the computer.
|
||||
3. Get ADB f.e. `apt-get install android-tools-adb`
|
||||
4. `adb devices` should list your device
|
||||
5. `adb root` (does work for development builds only: ones with ro.debuggable=1)
|
||||
5. `adb root` (does work for development builds only: ones with `ro.debuggable=1`)
|
||||
6. `adb shell`
|
||||
7. `echo "select name,localIP,token from devicerecord;" | sqlite3 /data/data/com.xiaomi.smarthome/databases/miio2.db` returns a list of all registered devices including ip address and token.
|
||||
|
||||
|
||||
### macOS and iOS
|
||||
### {% linkable_title macOS and iOS %}
|
||||
|
||||
1. Setup iOS device with the Mi-Home app.
|
||||
2. Create an unencrypted backup of the device using iTunes.
|
||||
3. Install iBackup Viewer from here: http://www.imactools.com/iphonebackupviewer/
|
||||
@ -84,19 +85,21 @@ java.exe -jar ../android-backup-extractor/abe.jar unpack backup.ab backup.tar ""
|
||||
|
||||
## {% linkable_title Configuration %}
|
||||
|
||||
To add a vacuum to your installation, add the following to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
vacuum:
|
||||
- platform: xiaomi
|
||||
name: 'name of the robot'
|
||||
host: 192.168.1.2
|
||||
token: your-token-here
|
||||
- platform: xiaomi
|
||||
host: 192.168.1.2
|
||||
token: your-token-here
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
- **name** (*Optional*): The name of your robot
|
||||
- **host** (*Required*): The IP of your robot
|
||||
- **token** (*Required*): The token of your robot. Go to Getting started section to read more about how to get it
|
||||
|
||||
- **host** (*Required*): The IP of your robot.
|
||||
- **token** (*Required*): The token of your robot. Go to Getting started section to read more about how to get it.
|
||||
- **name** (*Optional*): The name of your robot.
|
||||
|
||||
### {% linkable_title Platform services %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user