[SOLVED] Openhab2 - Xiaomi Mi Gateway - does not respond

Tags: #<Tag:0x00007f7454cc56f8> #<Tag:0x00007f7454cc5518> #<Tag:0x00007f7454cc53d8>

if someone failed and unsoldered part of tx/rx contact pad, so u can solder wires to 6/7 leg of wifi controller (that big thing under metal shiny plate)

Hi, Did anyone noticed that with the latest firmware upgrade (v. 1.6.2) and Aqara app version 1.5.3 after clicking several times the Gateway serial number a popup windows will show up with “For Developer” as title and requesting to input a URL and a MD5 Code.

Anyone has an idea if this is the so expected developer mode? Does anybody know how to take advantage of it?
I leave a screen capture of what I say here below:

Hi there, I successfully open port my second new gateway with UART mode. My question is now i able to do the firmware update? The new firmware is not close it again?

My old gateway (about one year old) is not closed after firmware update. (it not need to open it with UART, only just open it with the APP)

normally, new firmware don’t close the port

Another thing I discovered in the Aqara app, is that is you touch several times the model version of your gateway a popup will show saying “Entered test mode”

No idea what is this for but maybe we are near the “Developer mode” feature we request

Hello you could give more information on how to enable the ssh connection

Thank you

Hi @rothm,
I have tried to upload the custom firmware using the new Developer upload tool that the new aqara app has.
Unfortunately it fails. Maybe my current firmware version is newer than the custom firmware you built. Or maybe the md5 is wrong.
Any idea?

Hello all,

If you run openhab on WINDOWS 10.

If you know your xiaomis gateway port is open but you can’t discover it still and get:
No token received from the gateway yet. Unable to encrypt the access key.
Make sure firewall is not blocking multicast.

And if it still does not work, do you have installed any VMware of virtual players (virtualbox) etc?
Go to:
Control Panel\All Control Panel Items\Network Connections.
Disable the network connections that above applications above install.
Also, rightclick your correct network and make sure that there is no other drivers that normal ones (uncheck them if they are present).
Example: Virtualbox NDIS Bridged Networking Driver
Or Npcap Packet Driver

I think they interfere with the multicasting on the computer.
Now you should be able to discover the xiaomi hub (v3) (and other items as well if you had problems before).

Hi @GonzaloN,

Glad to know you tried!

Where could I get this new Developer upload tool? Which kind of information do you have to provide?

The .bin file is just a tar file and according to what I saw in the embedded script, there is no version check performed (I think the check is done by the client when looking for a new version).
In the github repo, the md5 contained in the .bin.md5 is correct (the filename at the end must be omitted) with respect to the .bin.


You have to download the newAqara app.

And while in the app, go to “Accesories” menu, click on the Gateway, then on the upper right “three dots”.
Finally tap several times over the serial number. Then, the “For Developer” menu will appear.
There you have to provide a URL for the .bin and a MD5_Code that I believe you can also write a URL

I try ota on mieu01.


  • not working ((
    Gateway just reply “[ok]” and start blink yellow. ( Stopping after any action with gateway led )

I believe it won’t work with default miio_client implementations because it uses another messaging patterns. Implemented binary by @rothm uses straight plain-text communication while original miio_client requires tokens and encoding/decoding messages. I may be wrong, but this is how I remembered it.

@cadavre Yes, it don’t think it will work out of the box with my “miio_client without encryption” / “miio_client passthrough” which forward each request to the “gw” / gateway client.

The firmware / ota should be processed by the original / vendor miio_client.

Not running IOS and it might take some time for me to test it on Android…

Guys, i have one aqara hub that after flashing immediate firmware flash simply bricked itself and therefore i cannot use it. I did manage to root to it and have access to it, have already tried to manually fix the thing, but without success :confused: I was wondering, if any1 of you successfully using it can send me the .bin file of a working hub?

during inspection of the device via root access, i saw that there might be some sensitive data (like wifi credentials and stuff) so you can simply write dummy values there, but pls tell me which files did you change :slight_smile:

please, if someone can help me with this one, i would be very grateful. if not, at least point me in some direction on what i can possibly do with that device?

Hello everybody,

I am desperate. Have connected the gateway with putty and can see everything. Unfortunately, I can not enter anything. I am very inexperienced with Putty. I read that you have to copy the cmd commands. I do not know how it works. I would be very grateful for your help.

Hi all,

I am trying to follow the fix at the moment. However I don’t see anything at all when I try and connect with putty. Does anyone have any ideas or suggestions for me to try? I would love to get the hub working…

Hi there, did you manage to find any solution to this problem? I have it too and don`t know what to do.

Thank you!

Bib thanks rsx2007.
Totally worked for me.

now the xiaomi Hub works perfectly in HA.

thanks a lot.

Ok so if it’s not about opening the ports, what should I do now? I’m trying to connect the gateway to domoticz running on a Raspberry Pi. I managed to reset the root password and when I run the netstat command I get the same result as you.