| `entity_id` | yes | Only act on a specific robot; default targets all |
| `velocity` | no | Speed: between -0.29 and 0.29 |
| `rotation` | no | Rotation: between -179 degrees and 179 degrees |
| `duration` | no | The number of milliseconds that the robot should move for |
## {% linkable_title Attributes %}
@ -134,23 +134,23 @@ The following table shows the units of measurement for each attribute:
## {% linkable_title Retrieving the Access Token %}
<pclass='note'>
As per [python-miio issue 185](https://github.com/rytilahti/python-miio/issues/185) the Android Mi Home app no longer stores the token within the database (it's retrieved from Xiaomi servers from version 5.0.31+). Currently the only known fix is to uninstall, then install a downgraded version of the apk. Apkmirror is a trusted source for older versions of the app. [Mi-Home version 5.0.30](https://www.apkmirror.com/apk/xiaomi-inc/mihome/mihome-5-0-30-release/) is confirmed as working for the following Android methods. Using older version than 5.0.30 is not recommended as it might lack support for some newer devices like the Roborock S50.
As per [`python-miio` issue 185](https://github.com/rytilahti/python-miio/issues/185) the Android Mi Home app no longer stores the token within the database (it's retrieved from Xiaomi servers from version 5.0.31+). Currently, the only known fix is to uninstall, then install a downgraded version of the apk. Apkmirror is a trusted source for older versions of the app. [Mi-Home version 5.0.30](https://www.apkmirror.com/apk/xiaomi-inc/mihome/mihome-5-0-30-release/) is confirmed as working for the following Android methods. Using an older version than 5.0.30 is not recommended as it might lack support for some newer devices like the Roborock S50.
<br/><br/>
The iPhone app still stores the token in the sqlite db as of v4.10.2 (Dec 22, 2018).
The iPhone app still stores the token in the SQLite db as of v4.10.2 (Dec 22, 2018).
<br/><br/>
This token (32 hexadecimal characters) is required for the Xiaomi Mi Robot Vacuum, Mi Robot 2 (Roborock) Vacuum, Xiaomi Philips Lights and Xiaomi IR Remote. The Xiaomi Gateway uses another security method and requires a `key` (16 alphanumeric chars), which can be obtained
easily via a hidden menu item at the Mi-Home app or using the `miio` command line tool.
</p>
#### {% linkable_title Miio command line tool %}
### {% linkable_title Miio command line tool %}
You can install the command line tool with:
You can install the command line tool using the following command:
```bash
npm install -g miio
```
Discovering devices on current network
Discovering devices on the current network:
```bash
miio discover
@ -170,12 +170,12 @@ Support: At least basic
The information output is:
- __Device ID__ - the unique identifier of the device, does not change if the device is reset.
- __Model ID__ - the model id if it could be determined, this indicates what type of device it is
- __Address__ - the IP that the device has on the network
- __Token__ - the token of the device or ??? if it could not be automatically determined
- `Device ID` - The unique identifier of the device, does not change if the device is reset.
- `Model ID`- The model id if it could be determined, this indicates what type of device it is.
- `Address` - The IP that the device has on the network.
- `Token` - The token of the device or `???` if it could not be automatically determined.
#### {% linkable_title Windows and Android %}
### {% linkable_title Windows and Android %}
To fetch the token follow these instructions depending on your mobile phone platform.
@ -183,14 +183,14 @@ To fetch the token follow these instructions depending on your mobile phone plat
2. Download and extract the [MiToolKit.zip](https://github.com/ultrara1n/MiToolkit/releases).
3. Enable developer mode and USB debugging on the Android phone and plug it into the computer.
4. Change the MiToolKit language to English if you need to.
5. Click "Extract Token"
5. Click "Extract Token".
6. On the phone, you must confirm the backup. DO NOT enter any password and press the button to make the backup.
7. Once you have confirmed the backup the token extraction will begin, it should appear in the MiToolKit shortly.
8. If you don't get a token, close MiToolKit completely, delete the folder MiToolkit\apps\com.xiaomi.smarthome and relaunch MiToolKit to force recreate a new backup (sometimes the files would not be overwritten before deleting the old ones)
8. If you don't get a token, close MiToolKit completely, delete the folder MiToolkit\apps\com.xiaomi.smarthome and relaunch MiToolKit to force recreate a new backup (sometimes the files would not be overwritten before deleting the old ones).
#### {% linkable_title Linux and Android (not rooted) %}
### {% linkable_title Linux and Android (not rooted) %}
Follow the pairing process using your phone and Mi-Home app. You will be able to retrieve the token from a SQLite file inside your phone.
Follow the pairing process using your phone and Mi-Home app. You will be able to retrieve the token from an SQLite file inside your phone.
Before you begin you need to install `libffi-dev` and `libssl-dev` by running the command below. This is needed for `python-miio` to be installed correctly.
@ -198,7 +198,7 @@ Before you begin you need to install `libffi-dev` and `libssl-dev` by running th
sudo apt-get install libffi-dev libssl-dev
```
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.
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 -u homeassistant -H -s
@ -209,17 +209,23 @@ To fetch the token follow these instructions depending on your mobile phone plat
1. Configure the robot with the Mi-Home app.
2. Enable developer mode, USB debugging and plug the Android phone into the computer.
3. Get ADB e.g., `apt-get install android-tools-adb` or `apt-get install adb`
4. `adb devices` should list your device. Consult ADB manual if necessary.
5. Issue a backup command via adb: `adb backup -noapk com.xiaomi.smarthome -f backup.ab` (set a password if prompted on your phone). Some devices may required single quotes in the command `adb backup '-noapk com.xiaomi.smarthome -f backup.ab'`
6. Download the 'ADB Backup Extractor' from [here](https://sourceforge.net/projects/adbextractor/files/latest/download)
7. Extract the data from the backup: `java -jar Android\ Backup\ Utilities/Android\ Backup\ Extractor/android-backup-extractor-20171005-bin/abe.jar unpack backup.ab unpacked.tar` (enter the password, if prompted)
8. Untar the unpacked data: `tar -xvf unpacked.tar`
9. `sqlite3 apps/com.xiaomi.smarthome/db/miio2.db 'select token from devicerecord where name like "%Vacuum%";'` returns the token for your Xiaomi vacuum bot.
3. Get ADB by running `apt-get install android-tools-adb` or `apt-get install adb`.
4. `adb devices` should list your device. Consult the ADB manual if necessary.
5. Issue a backup command via adb: `adb backup -noapk com.xiaomi.smarthome -f backup.ab` (set a password if prompted on your phone). Some devices may require single quotes in the command `adb backup '-noapk com.xiaomi.smarthome -f backup.ab'`.
6. Download the ['ADB Backup Extractor'](https://sourceforge.net/projects/adbextractor/files/latest/download).
7. Extract the data from the backup: (enter the password, if prompted)
8. Untar the unpacked data: `tar -xvf unpacked.tar`.
9. The following command returns the token for your Xiaomi vacuum bot:
```bash
sqlite3 apps/com.xiaomi.smarthome/db/miio2.db 'select token from devicerecord where name like "%Vacuum%";'
```
#### {% linkable_title Linux and Android (rooted!) %}
### {% linkable_title Linux and Android (rooted!) %}
Follow the pairing process using your phone and Mi-Home app. You will be able to retrieve the token from a SQLite file inside your phone.
Follow the pairing process using your phone and Mi-Home app. You will be able to retrieve the token from an SQLite file inside your phone.
Before you begin you need to install `libffi-dev` and `libssl-dev` by running the command below. This is needed for `python-miio` to be installed correctly.
@ -227,7 +233,7 @@ Before you begin you need to install `libffi-dev` and `libssl-dev` by running th
sudo apt-get install libffi-dev libssl-dev
```
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.
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 -u homeassistant -H -s
@ -238,57 +244,71 @@ To fetch the token follow these instructions depending on your mobile phone plat
1. Configure the robot 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`)
6. `adb shell` (for those using Magisk based root the previous command won't work. After entering a shell, type `su` to enter the root 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.
3. Get ADB (e.g, using `apt-get install android-tools-adb`).
4. The command `adb devices` should list your device.
5. The command `adb root` (does work for development builds only: ones with `ro.debuggable=1`).
6. The command `adb shell` (for those using Magisk based root the this command won't work. After entering a shell, type `su` to enter the root shell and try again).
7. The following command returns a list of all registered devices including IP address and token:
```bash
echo "select name,localIP,token from devicerecord;" | sqlite3 /data/data/com.xiaomi.smarthome/databases/miio2.db
```
#### {% linkable_title iOS %}
### {% linkable_title iOS %}
1. Configure the robot with the Mi-Home app.
2. Using iTunes, create an unencrypted backup of your iPhone.
3. Install [iBackup Viewer](https://www.imactools.com/iphonebackupviewer/), open it, and open your backup.
4. Open the "Raw Data" module.
5. Navigate to `com.xiaomi.mihome`.
6. Search for a file that looks like this: `123456789_mihome.sqlite`– note that`_mihome.sqlite` is *not* the correct file.
6. Search for a file that looks like this: `123456789_mihome.sqlite`(Note:`_mihome.sqlite` is *not* the correct file).
7. Save this file to your filesystem.
8. Install [DB Browser for SQLite](https://sqlitebrowser.org/).
9. Open DB Browser and load the `.sqlite` file you saved from your backup.
10. Click on the `Execute SQL` tab.
11. Input and run this query: `SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%vacuum%"`
11. Input and run this query:
```sql
SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%vacuum%"
```
12. Copy the returned 32-digit hexadecimal string to your clipboard.
13. Open `Terminal` and execute this command: `echo '0: <YOUR HEXADECIMAL STRING>' | xxd -r -p | openssl enc -d -aes-128-ecb -nopad -nosalt -K 00000000000000000000000000000000`
3. Set up the Mi-Home app in BlueStacks and login to synchronize devices.
4. Use [BlueStacks Tweaker](https://forum.xda-developers.com/general/general/bluestacks-tweaker-2-tool-modifing-t3622681) to access the filesystem and retrieve the token.
#### {% linkable_title Selecting token manually (Windows and Android)%}
### {% linkable_title Selecting token manually (Windows and Android) %}
The following instruction explained an alternative method, in case the MiToolKit didn't work.
The following instruction explained an alternativ way, if MiToolKit didn't work.
Software Required:
- Android ADB is contained in [Android SDK](https://developer.android.com/studio/releases/platform-tools)
- [Mi-Home version 5.0.30](https://www.apkmirror.com/apk/xiaomi-inc/mihome/mihome-5-0-30-release/)
The `econet` water heater platform is consuming the information provided by a [EcoNet enabled Rheem water heater](http://www.rheem.com/EcoNet/Home). This platform allows you to set the temperature, the operation mode, and enable vaction mode.
The `econet` water heater platform is consuming the information provided by a [EcoNet enabled Rheem water heater](http://www.rheem.com/EcoNet/Home). This platform allows you to set the temperature, the operation mode, and enable vacation mode.
## {% linkable_title Configuration %}
@ -46,9 +45,9 @@ You can use the service `econet.add_vacation` to create a new vacation for your
| Service data attribute | Optional | Description |
To use Waterfurnace in your installation, add the following to your `configuration.yaml` file:
@ -55,8 +54,8 @@ password:
type: string
{% endconfiguration %}
#### {% linkable_title Limitations %}
## {% linkable_title Limitations %}
The WebSocket interface used by this module requires active polling, otherwise the server side shuts down the connection. By default, this polling is happening every 10 seconds. All sensors are updated during every polling cycle.
The WebSocket interface used by this module requires active polling to prevent the server side shuts down the connection. By default, this polling is happening every 10 seconds. All sensors are updated during every polling cycle.
While this is communicating with a thermostat, geothermal systems operate most efficiently when setbacks are not used, and the home is kept at a constant temperature. It remains useful to collect the data from the system to understand its performance, but a full climate interface won't be implemented.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.