Not able to get Xiaomi Gateway Key

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.

I works with integration add HomeKit Accessory is perfect with XXX-XX-XXX :ok_hand:

my problem appear in the code like when I want to hard code that :

xiaomi_aqara:
discovery_retry: 5
gateways:
- mac: XX:XX:XX:XX:XX:XX # MAC AQARA
key: 103-35-287 aqara key

I have a error saying :

Invalid config for [xiaomi_aqara]: length of value must be at least 16 for dictionary value @ data[‘xiaomi_aqara’][‘gateways’][0][‘key’]. Got ‘103-35-287’. (See /config/c

compilator is not really compliant :frowning:

Thanks a lot a lot a lot a lot for Olivier!
I have the Mijia gateway 2019
And thanks to your explanation it was very easy to install in Home Assistant:
I have unplugged and plugged the gateway from the power supply.
Then HA has discovered the new device
The “token” is writen under the gateway and in the manual for me. It was 8 digits to put simply in the form xxx-xx-xxx
Very Easy!
Thaaaaaaannnnnkkksssss !!!

1 Like

read step by step my post…you do wrong…the key in

xiaomi_aqara:

is not format like xxx-xx-xxx…, this is just for Aqara gateway, one time is recognize by HA, done.

The other config in configuration.yaml

xiaomi_aqara:

is for Mio gateways (not Aqara one, compatible HomeKit with key provide on the box xxx-xx-xxx).

You seems to have some problems to read a post step by step… @benooye has read and understand so i dont think my post is malformed or difficult to understand…

happy for you!

Check this:

Salut, celui ci est bon pour moi ? Il est compatible avec HA ?
Merci beaucoup Olivier.

Hello @niconath,

yes! but the price is very expensive : https://fr.aliexpress.com/item/32912322984.html?spm=a2g0o.productlist.0.0.684f2395R8TV7g&algo_pvid=74181eba-5e49-40bd-9c42-7e4f142c9411&algo_expid=74181eba-5e49-40bd-9c42-7e4f142c9411-47&btsid=0b0a0ac215865419440265438e6117&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

perhaps this one is with a EU plug ? but i read “16629_3-UK-Gateway-New” in description…

Be carefull its not a UK plug (like chinese plug) because you need a adaptor.

The difference is the price, and if you buy the Aliexpress one, you only connect to Chinese server.

Ask the sellor if the amazon version is with a EU plug (not UK) and works on EU server.

The other point is the delay if you buy from Aliexpress…you have to wait a while…

:wink:

Thank you for your answer, it only works on Chinese server the Amazon version that I showed you and for the adapter it does not matter, I will buy one.
If not for your link, will it work with home assistant? What are the door and motion sensors that I can connect? Could you also put me a link so that I order the set and that I am sure that everything works with HA in France?
Thank you very much for your help

ok!

so best choice (for me) is to buy with the link i already provide with Aliexpress (above).

But yes, you can choose any Xiaomi Aqara HomeKit version you want on Aliexpress because the item come from China so its Chinese version!

Here is a kit with Gateway and sensors : https://fr.aliexpress.com/item/32945845633.html?spm=a2g0o.productlist.0.0.785838f4RSZPDM&algo_pvid=e7233acd-a08e-4c50-b271-5661a25feb87&algo_expid=e7233acd-a08e-4c50-b271-5661a25feb87-3&btsid=0b0a22a415865446325014868ef952&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

BUT!!! : you can NOT add motion and door sensor with a AQARA GATEWAY on HA!!!

You need to buy a Mio Gateway instead. And you have to find the key in the hiden menu of Xiaomi Mi Home APP (already speak about in my POST).

Mio gateway kit : https://fr.aliexpress.com/item/32749343672.html?spm=a2g0o.productlist.0.0.60985d6fhKK26d&algo_pvid=fe9e3d6b-1ad0-4f99-a487-49a0badc93ef&algo_expid=fe9e3d6b-1ad0-4f99-a487-49a0badc93ef-6&btsid=0b0a187915865450772988115eac25&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

I use the Aqara for led bulbs only and Mijia gateway for door, motion, etc …, sensors.

The Aqara works with sensors in Mi Home App BUT NOT IN HA.
The Mijia works with sensors in Mi Home App AND in HA.

Hope it help :wink:

OK then I want a gateway that connects to HA and so I have to take which one? And the aquara sensors are compatible with the mija?