Not able to get Xiaomi Gateway Key

So when I installed I entered the code on the box and it all worked. That is where we got to and now as you know, no sounds! I just tried it again now hoping that maybe the latest HA update would make a difference and no luck.

Maybe I buy some more V3’s?

Last thing is : reactivate the developper mode of my samsung note 10 and the old menu with LAN mode is back again!!!

Need to close the Mi Home App each time i changed gateway.

Try to desassociate from Mi home and Ha, and strart from scratch…sorry, no more ideas…

Someone can tell me how to get the xiaomi_aqara works?
My token key is not working.

Marcos

Hey Olivier

I will try that when I have some more time.

In the meantime thanks for all your help. It is appreciated.

1 Like

Ran into this problem today because I installed new D1 3-rocker switches.

Did not see them in HA so I decided to delete the integration and try again. Turns out the “About” page is gone from updated Mi Home App.

For anyone in the same boat, I found out 3 hours later, just download an old apk of the mi home app (mine was way back June). You can get the old interface there and enable developer mode again. (Click version x times and look for the about) Password for lan access is there.

However, after getting it back. HA sees all my old switches but can’t see the D1 switches.

1 Like

This tool/script retrieves tokens for all devices connected to Xiaomi cloud.

You will need to provide:

  • username (e-mail or Xiaomi Cloud account ID)
  • password
  • Xiaomi’s server region ( cn - China, de - Germany etc.). Leave empty to check all available

In return all of your devices connected to account will be listed, together with their name and IP address.

3 Likes

Thank you!!! :smiley:

Hello,

yes, same problem, i revert back to 5.8.42 version with aptoide, and stop my auto updates from google play…

the new version 6.0.203 and 6.0.210 give nothing more than delete the access to LAN MODE PROTOCOL and a new user COLD interface…Xiaomi sucks…

1 Like

Nice tool but for MIO gateways (DGNWG02LM) we need the KEY (developper mode or LAN Mode) and not the TOKEN…this tool only retreived the TOKEN, not the KEY need in HA to integrate the gateway…

I think the best solution is to buy some AQARA gateway before they are no more sells…or any other gateway HOME KIT COMPATIBLE because the key is provide on the sticker of the gateway and on the sticker on the box of the gateway, and that what HA is asking for to integrate…

Or you need to revert back Xiaomi Home APP to 5.8.42 and dont make upgrade…to have access of the LAN MODE for DGNWG02LM gateways.

1 Like

I made better solution without downgrading:

  1. Download this file: main.bundle
  2. Make sure you closed Xiaomi Home app
  3. Copy it to Android/data/com.xiaomi.smarthome/files/plugin/install/rn/1001816/1012554/android/main.bundle (overwrite original file).
  4. Open Xiaomi Home app, you will see new option in gateway settings
4 Likes

I have opened “files” folder and there is no “plugin” folder there.

Do you have a modified application installed? https://www.kapiba.ru/2017/11/mi-home.html

Hi everyone. For those still lost. It works! You need the Xiaomi Mijia Smart Multi-Mode Gateway ZNDMWG03LM.

Hass recognizes automatically as HomeKit Controller. Aqara D1 is now working - i have triple rockers. 6 switches and rewiring of my lines have not gone to waste!

No need for gateway key or lan access mode.

No need for gateway key or lan access mode.

Sorry but that’s not true. ZNDMWG03LM is supported as you said, Hass recognizes automatically as HomeKit Controller, but you need to still enter gateway key, which is from the device sticker (don’t use ‘-’ while entering into HA configuration)

1 Like

Oh, yes sorry. Although you don’t need developer mode anymore, much easier than before. Thanks for clarifying!

Hi everyone. I am having the same trouble getting the key for a Xiaomi Gateway. What is really frustrating is that I had it working fine. Then the SD card on my Pi died, and I found that my config backups were not running! So I once had the key (using the old method in the app), and now I don’t have it. I am trying to get it from the Mi Home app on iOS and in the new version, as everyone has found, the trick for getting the key no longer works.

I have tried running the oldest version of the Xiaomi Home app for android on an emulator. The oldest one if could find in Aptoide is 5.6.91. It connects fine, but it doesn’t have the old interface for getting the key either.

I have tried Antoni’s modified version of the app in the emulator as well. From this link
https://ru.kapiba.ru/mihome/files/old/MiHome_6.0.214_63314_vevs.apk

@Antoni_Czaplicki thanks for your work on this. I tried to drop in the main.bundle file you linked to but I could find the exact same file path. When I got to …files/plugin, I could see “rnsdk” not “rn”. In there, I found “10048”. In there, I found “android”. I copied the main.bundle file into here, but there was nothing to overwrite. The files in here are bundle.cert, bundle.sign, project.json and sdk.bundle.
Do I need to do something else here?

When I did run the app, I could see the token in the screen for “Additional Settings / Network Info”, but not the key unfortunately.

I feel like I am close so hopefully there is a fix from here.

I am just kicking myself that I didn’t make more backups of the hassio config in the first place :frowning:
All help much appreciated! Thanks.

Hi, I got along with the developer of the modified application and you can now easily install the plugin by creating a custom.json file in the vevs folder.

Then add it to newly created file:

{
  "nest_source_override": {
    "https://ru.kapiba.ru": [
      "lumi.gateway.v3"
    ]
  }
}
1 Like

Hi. Many thanks for responding so quickly.
I think I might be missing something here. Sorry, I don’t use Android usually so I am on a steep learning curve here! This might not be right…
I have created a file called custom.json and copied in the text from your post. I have put that file into /vevs
Is that right?! Do I need to do anything else? I suspect I have not done this right :confused:
I have re-opened the modfied app and I can’t see that anything has changed…
I would be really grateful if you could explain further.
Many thanks!

FWIW I noticed that in the latest version of Hassio (i only updated for the first time in months yesterday), there is the Xiaomi Miio Gateway integration, as well as the Xiaomi Aqara intergration.

The Xiaomi Aqara integration needs the key to connect.
The Xiaomi Miio integration needs the token to connect.

As above, its really easy to get the token.
So enabling the Xiaomi Miio worked right away. Hassio sees the gateway light and the illuminance sensor on it. It also appears to see the Temperature humidity sensors. Although the sensors are not with the gateway right now so I think it is reading the last recorded data.
The downside is that it looks like most of the other sensors are still work-in-progress with this integration. In the documentation above it says
“These subdevices are recognized by the python-miio code but are still being worked on (not yet implemented).”
Then lists pretty much all the sensor types!

So pending at least the motion and door sensors and the wireless switches being supported in the Miio integration, I still need to get this key so I can get the Aqara integration working…
Thanks again for any assistance.

My problem seems to be different, I have both a V1 Aqara Hub and a M1S version, both can be made working with HA as homekit and the XXX-XX-XXX code on the sticker, but I don’t get the xiaomi_aquara.play_ringtone services…
Does anyone know what I am getting wrong??