Not able to get Xiaomi Gateway Key

It seems that in version 5.6.60 of the app, the “about” option is no longer.
I could not get the key either…


Nop,

i have the 5.6.65 update and still “about” section is available, after you tap the “three dot point” up right corner.

Its ONLY available for MIO Gateway not AQARA one. For AQARA you need the “homekit compatible” version and you can directly integrate it in HA with the “HomeKit” ----> integration----> + ---->Homekit Accessory

my 2 MIO gateway are DGNWG02LM and in the info gateway in Mi Home APP is describe as :

-model : lumi.gateway.v3
-fw_ver : 1.4.1_175
-hw_ver : MW300

So, sorry but you dont have a V3 version but more likely a newest version…

You better buy a chinese version, i mean yours is writing in Russian? right? dont know anything about this version, sorry.

I recently buy the V4 : called “Mi Smart Home Hub” in the MI Home App, and i integrate like an AQARA one : integration —> + -----> HomeKit Accessory and HA ask a key like this xxx-xx-xxx, the key is on a stick on the Smart Home Gateway, just enter the key and thats it, simple, works, like for AQARA gateways (V1).

My gateway is ZNDMWG03LM. Is supported?
Thank you @Olivier974 for your time…

Yes, its just not a “Mio Version”, so its like Aqara ones…you should have a stick with the key : on the box, and at the back of the gateway :

aqara-hub-key1

so first you should have :

discovery:

in your configuration.yaml

second, go “integration” -----> " + " -----------> HomeKit Accessory (something like this, sorry mine is in french and it is “Accessoire Homekit”)
After, you will be prompt for the key, and you need to enter the key with the “-” minus like this : xxx-xx-xxx.

If you cant find the 8 caractere key on the box or the label “HomeKit Compatible” that means its not Homekit compatible, and it cant work with HA : have a look there : https://www.home-assistant.io/integrations/xiaomi_aqara/

i only succeed with Aqara : ZHWG11LM : with this method.
This is the Aqara version :

The screen in Mi Home App is the one you POST :

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

For Mio gateways or mijia gateway (2017) : !!!NOT EU VERSION!!! only chinese

Mio version, you have to un-hide the secret menu (google is you friend or : https://community.home-assistant.io/t/mi-home-xiaomi-gateway-key/29962) and you will be able to activate the “LAN communication protocol” and generate a Key and add this to your configuration.yaml :

xiaomi_aqara:
  gateways:
    - mac: xxxxxxxxxxxx
      key: xxxxxxxxxxxxxxxx
    - mac: xxxxxxxxxxxx
      key: xxxxxxxxxxxxxxxx

what is confusing is the “xiaomi_aqara:” first line…because its not aqara…its Mijia gateway…i thing the developper make a mistake on the name…it should have been “xiaomi_mijia:”…but anyway, it works perfect!

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

For the Mijia gateway 2019 : !!!NOT EU VERSION!!! only chinese

same like the previous version, the key is on the box and you need to “integrate” with HA in integration menu, +, homekit Accessory…

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

THE MOST IMPORTANT THING FOR ALL XIAOMI GATEWAY IS TO FIRST CONFIGURE THEM TROUGHT THE MI HOME APP.

The Mi Home App, even if you dont want to use it, is made to associate your gateway with your Wifi settings of your router, so first, install Mi Home App, and configure your gateway.

ONE OTHER IMPORTANT THING IS : i only buy chinese version on bangood or Aliexpress, and in the Mi Home App i only take the Chinese location. Its write in the selection list : SINGAPORE (recommanded) but it doesnt work! only chinese location. But anyway, when your gateway is add in HA, you no longer take care about the app…sometimes i just take a look and update the latest firmware or update the app.

The funny thing is the gateway both work in the App and in HA, with no trouble.

HOPE IT WILL HELP :wink:

I have 2 Aqara Hub, 2 Mijia Hub and 1 Smart Home Hub, and 26 sensors (temp, motion, doors, smoke, leak…) and it works like a charm together.

Now i prefer the zigbee2mqtt ADDON because no need of the gateways…

1 Like

You’re very kind. Your answer is very complete and has helped me a lot.

1 Like

You’re welcome!

i just take time for the community :wink:

Hi all,
@Olivier974 are you able to help “un frenchy” please :slight_smile:

my settings :
I ordered on amazon a Mi Smart sensor Set model : ZHTZ02LM
The gateway is Mi Control Hub model : DGNWG05LM (Euro device)
Version of Mi Home App : 5.6.65

I tried several tricks but I’m still close to Zero.

It’s impossible in the App to set China location. The App seems to use location or device model. I also try to fake my location but nothing works.

I Have My gateway IP and MAC

Any idea for find the key ?

Hello @FloSyno,

sorry i speak english because it can helps others…(google translation is your friend :slight_smile:).

Sorry again but LOL : if you have a European version, you can only select location from…Europe…

So, its normal you cant connect to China server.

And yes the Mi Home App use the location, but at my experience, even if i am living in Réunion Island (French Territory), i only use Chinese Xiaomi gateways (i have 5) and i only use China Mainland in APP, and it works, even if i am not living in China.

So I think you have to select an european country in the app for your gateway works.

After you are connected and you have your gateway configured in the Mi Home APP,
just look at my last post, and all is explained.

A+

Thanks @Olivier974 for your quick answer. I well connect with Mi home APP, my problem is that I don’t have the “About” or “à propos” button in european version :frowning:

the key is mandatory to use the following code :

xiaomi_aqara:
discovery_retry: 5
gateways:
- key: xxxxxxxxxxxxxxxx

Any other way to obtain this key ?

You havent read my last post, isnt it?

Open you Mi Home APP, clic on your gateway picture listed in Mi Home APP, give here the screenshot of you app (first page that open after clic on the gateway) :

If you have the first one, Aqara Hub, WITHOUT the mention “HomeKit compatible”, this gateway doesnt work with HomeAssistant.

a quick search and i think the EU version doesnt work with HA : [https://community.home-assistant.io/t/xiaomi-aqara-confusion/80365/72?u=olivier974](Not able to get Xiaomi Gateway Key - #124 by Olivier974) :

" krash

Jan 9

Same here, got the EU version DGNWG05LM yesterday.
It even has an EU distinguisher on its SSID when in AP mode.

  • The mi app was unable to discover it.
  • I tried sharing it to a second, chineese mi account, didnt work.
  • I even tried manual AP pairing, it wouldnt connect to the SSID with EU words in it.
  • Tried creating a wifi-ssid named exactly how the app wanted it, bypass the step that checks for ssid and then switching to the AP of the gateway and try to flash with no luck.
  • My HA detects a gateway but gives me a notification error like this:
The following components and platforms could not be set up:

* [xiaomi-aqara](https://home-assistant.io/integrations/xiaomi_aqara/)

Please check your config.

Is there any team working on a way to easily implement the EU version anytime soon?
Has anyone tried the soldering workaround to the EU version? although after reading this , i still dont understand how to get the code after sending the commands to open the port.
Or should i see if it’s possible to return it?

  • Alternatively, i found a shop near me that sells a chinese set with the **DGNWG02LM ** can anyone confirm if that will work with HA (and the rest of the parts from the DGNWG05LM set?

I dont have the time luxury right now to get into the zigbee2mqtt game"

You better buy a chinese version, read my post, the last version “Mijia Gateway 2019” work with HA in 5 minutes , because its “homeKit compatible”.

Enjoy

Hi,
I also bought the DGNWG05LM eu version as I already having 2 x Roborock s5 vacuum cleaners bought in Denmark, and they are “locked” to eu server.

I have tried everything, and after a lot of research and troubleshooting, I managed to get the Token Key… but as we cannot access the developer settings, the ports are closed, and we will not be able to get it to work.
I hope they will so something and add the options for non Chinise users…

I also read an article that they have managed to get it to work, opening the device and use some wires - but that I don’t want to do…

I gave up trying to work with the EU version, I gifted it to a friend who just wanted xiaomi functionality.
On the other hand, i got my hands on two Chinese gateways and they both worked fine. Didn’t update their firmware though.

Hello @krash,

yes, you can update the firware without any problem :wink:

Good news,
Could you tell me specifically which firmware you are on and it works?

1 Like

sure!

1.6.8_003 for the ZHWG11LM

1.4.1_175 for the DGNWG02LM

@Olivier974 I just received the aqara gateways (and resent MI one)

The 8 digits are wrote on the box, the datasheet and on the gateway Awesome.

Home Assistant setup is really easy now :wink:

One more question when I want to write in my yaml code the key on 8 digits I have a warning message of my code control. Home assistant want only 16 digits code :frowning:

I tried to scan and read the QR code but 13digits code appear with “X-HM://” before

Any idea on how to convert 8 digits on 16 ?

hello @Flo,

just enter the key with the “-” (minus) like : xxx-xx-xxx

it works with this style only, 10 digits.