diff --git a/atom.xml b/atom.xml index dbac647c79..c925ccd51e 100644 --- a/atom.xml +++ b/atom.xml @@ -4,7 +4,7 @@
Follow the pairing process using your phone and Mi-Home app. From here you will be able to retrieve the token from a SQLite file inside your phone.
Before you begin you need to install libffi-dev
by running the command below. This is needed for python-mirobi
to be installed correctly.
apt-get install libffi-dev
+$ sudo apt-get install libffi-dev
-
-If your Home Assistant installation is running in a Virtualenv, make sure you activate it by running the commands below.
+If your Home Assistant installation is running in a Virtualenv, make sure you activate it by running the commands below.
$ sudo su -s /bin/bash homeassistant
$ source /srv/homeassistant/bin/activate
To fetch the token follow these instructions depending on your mobile phone platform.
-Windows and Android
+ Windows and Android
- Configure the robot with the Mi-Home app.
- Enable developer mode and USB debugging on the Android phone and plug it into the computer.
- Get ADB tool for Windows: https://developer.android.com/studio/releases/platform-tools.html
- Create a backup of the application com.xiaomi.smarthome:
-
.\adb backup -noapk com.xiaomi.smarthome -f backup.ab
+ $ adb backup -noapk com.xiaomi.smarthome -f backup.ab
- If you have this message: “More than one device or emulator”, use this command to list all devices:
-
.\adb devices
+ $ adb devices
and execute this command:
- .\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)
- On the phone, you must confirm the backup. DO NOT enter any password and press button to make the backup.
- Get ADB Backup Extractor: https://sourceforge.net/projects/adbextractor/
- Extract All files from the backup:
-
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 ""
- Unzip the “.tar” file.
- - Open the SQLite DB miio2.db with a tool like SQLite Manager extension for FireFox.
+ - Open the SQLite DB
miio2.db
with a tool like SQLite Manager extension for FireFox.
- Get the token from “devicerecord” table.
-macOS and iOS
+ Linux and Android (rooted!)
+
+ - Configure the light with the Mi-Home app.
+ - Enable developer mode, USB debugging and root permission only for ADB on the Android phone and plug it into the computer.
+ - Get ADB f.e.
apt-get install android-tools-adb
+ adb devices
should list your device
+ adb root
(does work for development builds only: ones with ro.debuggable=1
)
+ adb shell
+ 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
- Setup iOS device with the Mi-Home app.
- Create an unencrypted backup of the device using iTunes.
@@ -128,19 +137,19 @@ If your Home Assistant installation is running in a ZToken
and looks like 123a1234567b12345c1d123456789e12
.
Configuration
+To add a vacuum to your installation, add the following to your configuration.yaml
file:
# 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.
Platform services
In addition to all vacuum
component services (turn_on
, turn_off
, start_pause
, stop
, return_to_home
, locate
, set_fanspeed
and send_command
), the xiaomi
platform introduces specific services to access the remote control mode of the botvac.
@@ -256,6 +265,9 @@ If your Home Assistant installation is running in a : Local Polling
+
Introduced in release: 0.51
diff --git a/components/xiaomi/index.html b/components/xiaomi/index.html
index fe28a16918..1bfc3f7762 100644
--- a/components/xiaomi/index.html
+++ b/components/xiaomi/index.html
@@ -107,7 +107,7 @@
Follow the setup process using your phone and Mi Home app. From here you will be able to retrieve the key from within the app following this tutorial
To enable Xioami gateway in your installation, add the following to your configuration.yaml
file:
-One Gateway
+ One Gateway
# You can leave mac empty if you only have one gateway.
xiaomi:
gateways:
@@ -115,7 +115,7 @@
key: xxxxxxxxxxxxxxxx
-Multiple Gateways
+ Multiple Gateways
# 12 characters mac can be obtained from the gateway.
xiaomi:
gateways:
@@ -125,8 +125,8 @@
key: xxxxxxxxxxxxxxxx
-Search for gateways on specific interface
-# 12 characters mac can be obtained from the gateway.
+ Search for gateways on specific interface
+# 12 characters MAC can be obtained from the gateway.
xiaomi:
interface: '192.168.0.1'
gateways:
@@ -179,8 +179,8 @@
Troubleshooting
Connection problem
-2017-08-20 16:51:19 ERROR (SyncWorker_0) [homeassistant.components.xiaomi] No gateway discovered
-2017-08-20 16:51:20 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component failed to initialize.
+2017-08-20 16:51:19 ERROR (SyncWorker_0) [homeassistant.components.xiaomi] No gateway discovered
+2017-08-20 16:51:20 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi: Component failed to initialize.
That means that Home Assistant is not getting any response from your Xiaomi gateway. Might be a local network problem or your firewall.
diff --git a/developers/asyncio_working_with_async/index.html b/developers/asyncio_working_with_async/index.html
index 9d214ba151..186cc2fdd0 100644
--- a/developers/asyncio_working_with_async/index.html
+++ b/developers/asyncio_working_with_async/index.html
@@ -107,7 +107,7 @@
# Setup your platform inside of the event loop
-The only difference with the original parameters is that the add_entities function has been replaced by the async friendly callback async_add_entities
.
+The only difference with the original parameters is that the add_entities
function has been replaced by the async friendly callback async_add_entities
.
Implementing an async entity
You can make your entity async friendly by converting your update method to be async. This requires the dependency of your entities to also be async friendly!
class MyEntity(Entity):
diff --git a/sitemap.xml b/sitemap.xml
index 88f7b75504..1f309f40a4 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -3933,62 +3933,62 @@
https://home-assistant.io/demo/frontend.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/index.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-event.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-info.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-service.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-state.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-dev-template.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-history.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-iframe.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-logbook.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/demo/panels/ha-panel-map.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/googlef4f3693c209fe788.html
-2017-08-26T10:00:36+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/static/fonts/roboto/DESCRIPTION.en_us.html
-2017-08-26T10:00:37+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/static/fonts/robotomono/DESCRIPTION.en_us.html
-2017-08-26T10:00:37+00:00
+2017-08-26T10:44:15+00:00
https://home-assistant.io/static/mdi-demo.html
-2017-08-26T10:00:37+00:00
+2017-08-26T10:44:15+00:00