From f0e0d190eef8d62f6f11fc02d57dd3fd9f40174f Mon Sep 17 00:00:00 2001 From: Kanishka Samarasinghe Date: Tue, 21 Jul 2020 00:29:50 +1000 Subject: [PATCH] Add support for other miio device tokens (#14036) Add details on how to retrieve token from sqlite db for other miio devices such as powerstrip and plug. This page is currently linked to from :https://www.home-assistant.io/integrations/switch.xiaomi_miio and does not contain specifc information for powerstrip or plugs. --- source/_integrations/vacuum.xiaomi_miio.markdown | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/_integrations/vacuum.xiaomi_miio.markdown b/source/_integrations/vacuum.xiaomi_miio.markdown index 9dbaffdc2a4..cd6f06ca7f8 100644 --- a/source/_integrations/vacuum.xiaomi_miio.markdown +++ b/source/_integrations/vacuum.xiaomi_miio.markdown @@ -329,10 +329,18 @@ This token (32 hexadecimal characters) is required for the Xiaomi Mi Robot Vacuu 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: +11. Input and run this query (use appropriate SELECT query for your device i.e. Vacuum, Powerstrip or Plug): ```sql + -- Execute to retrieve token for Vacuum SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%vacuum%" + + -- Execute to retrieve token for Smart Powerstrip + SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%powerstrip%" + + -- Execute to retrieve token for Smart Plug + SELECT ZTOKEN FROM ZDEVICE WHERE ZMODEL LIKE "%plug%" + ``` 12. Copy the returned 96-digit hexadecimal string to your clipboard.