Not able to get Xiaomi Gateway Key

OK very well, thank you very much for your help, if when I receive them, I can’t make them work, I could ask you for help? Thank you really.
Nicolas

1 Like

Yes if i could help no problem :wink:

OK thanks a lot

Hello Olivier, I don’t know which version I will finally receive the car in the description there are two versions,
Does ZNDMWG03LM work with Home assistant? Thanks to you

very bad…

no its a joke, it will work (if you look at my main POST its already explained)

BUT no ringtone and no RGB led on the ZNDMWG03LM…

Which one do you buy? its not the same price between the ZNDMWG03LM and the DGNWG02LM

OK thank you, to tell the truth I don’t know I ordered and I saw then in the description that there were two different models but I don’t know which one will be sent. When you order with the Eu socket, there is the image of the ZNDMWG03LM, I have to pay $23,90

#Aliexpress € 21,22 26%de réduction | Xiaomi Gateway way2/passerelle Multimode maison intelligente ZigBee WIFI Bluetooth Hub de maille fonctionne avec l’application Mijia Apple Homekit maison intelligente

you need to choose the model to order…so you have choose the good one or the other…

OK I would see when I receive it, you will tell me if it is the right one, anyway the two models are good anyway with HA since they come from China?

I have a version of DGNWG05LM and have given up, can not get the key, only the token.

any help would be great, i live in israel

Hello, guys! I’m having the same problem.
I got a Xiaomi kit from Amazon (EU version). The gateway is a DGNWG05LM. Here’s a photo of the gateway and the box it came in:

As others have said, there is no “About” option in the gateway settings:

My all version is 5.6.65 and the firmware version of the gateway is 3.4.6_132.

Is there any hope for us? Not even by connecting to the serial port in the board?

Okay, for anyone interested, I made some progress, but not much.
I went ahead and connected to my gateway through the UART port following the instructions in this post: https://community.openhab.org/t/solved-openhab2-xiaomi-mi-gateway-does-not-respond/52963/188

Then I managed to get the infamous token that is inside the file /lumi/conf/device.conf.

In order to open the por 9898 that Home Assistant needs to talk to the gateway, you have to follow these steps: https://community.openhab.org/t/solved-openhab2-xiaomi-mi-gateway-does-not-respond/52963/114

The problem is that the latest versions of the gateway don’t have the psm-set command you need in order to open the port. I get: psm-set: command not found
I don’t know if simply getting the binaries for psm-set and psm-get could be enough.

That is where I’m stuck now.
In case someone has already walked this path, I’d really appreciate some help.
I’ll post here if I have any news.

1 Like

Hello Olivier, I just received confirmation from the seller that he is sending me version 3 of the gateway, can you confirm that everything works with HA please?
thanks again

So since version 3 does not have a built-in speaker, is it possible to create automation in HA so that when the alarm activates, it plays a siren sound on my Amazon echo? Thank you

I finally found a way.
There is no way (at least that I know of) to open port 9898 with the new units as the one I posted in the picture.

Luckily, the open source community is awesome and a user called cadavre came up with a solution.
Follow this guide and you’ll have it working in no time:

For that you should have SSH access to your gateway as root, which is also explained in the README file.

I can confirm that it works really good. I’m using it already.
Good luck!

2 Likes

Also, you can find a lot of useful information here:

Hey @matto,

thanks for the infos! i already read the @cadavre POST and i have try to SSH but finaly dont need because i have only chinese versions.

But yes it would help every guys who have a EU version! thanks

Hello everyone,

I got my brand new xiaomi LED smart bulb rgbw in the mail.
at this moment i am trying to connect them to HASS but i cant figure it out.
when i try to configure them trough the homekit option i need to provide a 8 digit code, i cant find that anywhere.
when i try to add them trough the configuration.yaml i need a 16 digit code but i cant find that either.

is there anyone who can help me? i’ve tried the method of changing your region to china etc but couldnt find the key/code

Hi @Olivier974 or @krash,

I’m really lost with all this version :exploding_head:

I only would like to use and xiaomi alarm like in this video where aqara gateway is setup in HA with yaml code what is allowing many option specificly with service ringtone.

After my first amazon order resent with DGNWG05LM and I order Aqara “home kit version”. The device is only integrable in HA with the 8 digits as home kit device. This way is not working for ringtone option (only alarm panel and light of the gateway)
I also plan to resent aqara home kit. :unamused:

Wich version do you recommande for using this yaml integration exampled here ?

I note the mio gateway aliexpress link posted by Olivier

Many thanks.

xiaomi_aqara:
discovery_retry: 5
gateways:
- key: xxxxxxxxxxxxxxxx

That’s all the info i can provide :slight_smile:

Hello,

i dont understand : what is your goal?

use the ringtone is a service not an entity and its the same for the mio gateway…

I think you dont even read the doc like last time… : https://www.home-assistant.io/integrations/xiaomi_aqara/

First, to check if your gateway is working, you can call the service : go to “develloper tools” (left margin of HA) and “service”. you fill the service by the name of the gateway like :

xiaomi_aqara.play_ringtone

and in “data” you paste :

gw_mac: xxxxxxxxxxxx (mac adress of your gateway)
ringtone_id: 8
ringtone_vol: 8

and you clic “call the service” and you will heard a dog barking.

Look at the documentation (link i just provide above) and you have all option and all ringtone and you even have an automation exemple to use.

But if you have any sensor i dont understand what do you expect to do???

At least you need a physical switch to trigger the automation and play a ringtone…

Or you can create an “input_boolean” switch in HA to manually trigger your ringtone :
https://www.home-assistant.io/integrations/input_boolean/

BUT, the first thing before asking is to read at least the documentation of the integration you try to use…all informations you need are there…

Last thing : if you buy a mio gateway, you dont have “alarm panel” in HA, so you just have the light of the gateway as an entity, no more. That means you have the good item, no need to change…just use it as it is expect to…