From a9c5c2bc434f33e0417084087c682bf77bbac764 Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Thu, 23 Jan 2020 20:49:10 +0100 Subject: [PATCH 1/2] Easier way to retrieve Access Token by uptodate app IMPORTANTANT: I actually do not have a "Xiaomi Mi Robot Vacuum", I have a "Xiaomi Aqara Gateway", therefore this method schould be checked by someone owning a robot vacuum!!! I actualy am setting up the xiaomi_gateway_alarm through this custom component: https://github.com/hekm77/homeassistant-config/tree/master/custom_components/xiaomi_gateway_alarm For that component I need the same 32 character "token" as this component uses and the docs of xiaomi_gateway_alarm refered to these instructions. I found these current instructions to difficult/to much work, so I tryed to do it simpler and for me it worked. I just tryed the develepor mode of the gateway and even in the latest app 5.6.46 (january 2020) the token is just there in plain text. I use: gateway model: lumi.gateway.v3 gateway firmware_version: 1.4.1_175 gateway hardware_version: MW300 Android app (Samsung Galaxy S8) version: 5.6.46 steps to get there are in this PR. Can someone ferify this works for the robot vacuum??? --- source/_integrations/vacuum.xiaomi_miio.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/_integrations/vacuum.xiaomi_miio.markdown b/source/_integrations/vacuum.xiaomi_miio.markdown index cb87f950b2d3..328b52268623 100644 --- a/source/_integrations/vacuum.xiaomi_miio.markdown +++ b/source/_integrations/vacuum.xiaomi_miio.markdown @@ -215,6 +215,18 @@ The following table shows the units of measurement for each attribute: ## Retrieving the Access Token +### Xiaomi Home app (Xiaomi Aqara Gateway, android?) +1) Install the Xiaomi Home app +2) Sign In/make an account +3) Make sure you set your region to: Mainland China (Seems to be the longest line with Chines characters) under settings -> Region - (not sure if this is aqtually required, language can defenetly be set on English). +4) Select your Gateway in Xiaomi Home app +5) Then the 3 dots at the top right of the screen +6) Then click on about +7) Tap the version number (Plug-in version 2.77.1 as of January 2020) at the bottom of the screen repeatedly +8) You should now see 2 extra options listed in English, this means you enabled developer mode. [if not try all steps again!] +9) Under "Hub info" there is quite some text in json format, this includes the "token" that you need. + +### Alternative methods
If using an Android device to retrieve the Access Token only `v5.4.49` of Mi Home is confirmed working (December 2019). Use `v5.4.49` of Mi Home locate a text file under the `Smarthome/logs` folder where the 32 character token is stored. There will likely be several text files in this directory, search all of them for the word 'token' and you should find it there. Be advised that the latest version of Mi Home does not store the token in clear text. From fc33d6758142052f8b4d064c4e56487b2e3ae859 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sat, 25 Jan 2020 14:05:10 +0100 Subject: [PATCH 2/2] :pencil2: Tweaks --- .../_integrations/vacuum.xiaomi_miio.markdown | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/source/_integrations/vacuum.xiaomi_miio.markdown b/source/_integrations/vacuum.xiaomi_miio.markdown index 328b52268623..0a0c47b0f56e 100644 --- a/source/_integrations/vacuum.xiaomi_miio.markdown +++ b/source/_integrations/vacuum.xiaomi_miio.markdown @@ -216,17 +216,19 @@ The following table shows the units of measurement for each attribute: ## Retrieving the Access Token ### Xiaomi Home app (Xiaomi Aqara Gateway, android?) -1) Install the Xiaomi Home app -2) Sign In/make an account -3) Make sure you set your region to: Mainland China (Seems to be the longest line with Chines characters) under settings -> Region - (not sure if this is aqtually required, language can defenetly be set on English). -4) Select your Gateway in Xiaomi Home app -5) Then the 3 dots at the top right of the screen -6) Then click on about -7) Tap the version number (Plug-in version 2.77.1 as of January 2020) at the bottom of the screen repeatedly -8) You should now see 2 extra options listed in English, this means you enabled developer mode. [if not try all steps again!] -9) Under "Hub info" there is quite some text in json format, this includes the "token" that you need. + +1. Install the Xiaomi Home app. +2. Sign In/make an account. +3. Make sure you set your region to: Mainland China (Seems to be the longest line with Chines characters) under settings -> Region (language can later be set on English). +4. Select your Gateway in Xiaomi Home app. +5. Then the 3 dots at the top right of the screen. +6. Then click on about. +7. Tap the version number (Plug-in version 2.77.1 as of January 2020) at the bottom of the screen repeatedly. +8. You should now see 2 extra options listed in English, this means you enabled developer mode. [if not, try all steps again!]. +9. Under "Hub info" there is quite some text in JSON format, this includes the "token" that you need. ### Alternative methods +
If using an Android device to retrieve the Access Token only `v5.4.49` of Mi Home is confirmed working (December 2019). Use `v5.4.49` of Mi Home locate a text file under the `Smarthome/logs` folder where the 32 character token is stored. There will likely be several text files in this directory, search all of them for the word 'token' and you should find it there. Be advised that the latest version of Mi Home does not store the token in clear text.