Wich one did you install? I just change my server so I have the same issue. I tried 6.2.602 but not old enough
I used 5.1.37
It’s linked in my comment above
Tried this method and also replacing the main.bundle file for the correct device (different folders for latest vevs version). Nothing worked. Does this still work for anyone?
i just use the modified app Mi Home :
https://www.kapiba.ru
and update the app manually with apk download every month
Windows:
Download and run token_extractor
Or
A solution for Xiaomi Smart Home Gateway 2 (DGNWG02LM, lumi.gateway.v3, chinese version), tested on firmware 1.4.1_17:
To enable developer mode or so called “LAN function” in Xiaomi Gateway 2 after the ability to do this was removed from Xiaomi Home App, use xiaomi-cloud-tokens-extractor and miiocli tools.
-
You need to extract a token of your gateway from Xiaomi Cloud using xiaomi-cloud-tokens-extractor - just pull it, run and enter your cloud credentials. As output you will get a list of your devices and their tokens.
-
Use previously extracted token as parameter for miiocli tool command to set manualy Developer Key in your Gateway (key value can be a random 16 bytes long alpha-numeric string), example:
miiocli gateway --ip 192.168.1.7 --token 652e1b285fef684209500a22d5be62f8 set_developer_key f40e1b285fes682r09100
As you got an output…
Running command set_developer_key
[‘ok’]
… your gateway is in developer or “LAN function” mode.
Hey,
The extraction of the tokens worked like a charm but i dont have c++ so i cant install miio. Is there some other way to get it to work?
Are you on a windows machine?
Hi everyone,
I’ve been dealing this the issues on the Gateway Aqara integration for a while, until I found the following video in youtube and everything was resolved IN MINUTES!!
It’s in spanish, however the briefing is: download the Mi Home application (ancient version) that is shared in the comments of the video (Google Drive) and install it in your phone (desinstall the current version previously).
https://drive.google.com/file/d/16cyD…
Once you have the ancient version you can acces to the LAN menu and finish very smoothly the integration. It took me just a few minutes.
Hope it helps you !!
I have 3 gateway devices:
ZNDMWG03LM (china version) v3
DGNWG02LM (Chinese version) v2
DGNWG05LM (Europe version) v2
I don’t think I will need v3 anymore, because I have WiFi, BT, and Zigbee in the NUC device.
I will need the v2, only for the lamp (to connect with the xiaomi motion sensor and use it as a night light) and for the speaker, to connect it with 2 pieces of xiaomi door sensors (when the door is opened, to ring, and if the door is left open longer than 2 minutes, also to ring)
I’m interested in which v2 version is easy to connect to Home assistant, EU or China? And if you can leave me the tutorial according to which you connected the gateway?
This seems like the most straightforward way to do this.
I’ve tried this and also the “ancient APK” method from the Spanish video below.
Nevertheless, in all cases even though the methods “succeed” (e.g.: set_developer_key = OK) I don’t see the Gatewey opening it’s port to LAN connections:
(venv) ➜ temp sudo nmap -sU 192.168.68.60 -p 9898
Starting Nmap 7.60 ( https://nmap.org ) at 2023-02-15 09:51 -03
Nmap scan report for 192.168.68.60
Host is up (0.059s latency).
PORT STATE SERVICE
9898/udp closed monkeycom
MAC Address: 04:CF:8C:xx:xx:xx (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 0.67 seconds
Before I open apart the device, am I missing something obvious such as a reboot or a part change for any of these “Enable developer mode / LAN function” to take effect?
Thanks for any guidance provided!
I have the token for my Gateway v3 but can’t get the key. I have tried lots of versions of the Mi Home app and tried the set-developer-key option using the python miio app but that gives me this:
“ERROR:miio.miioprotocol:Got error when receiving: {‘code’: -9999, ‘message’: ‘user ack timeout’}”
Anyone else get this error or know how to fix it?
thanks
DGNWG02LM (Chinese version) v2 china server
DGNWG05LM (Europe version) v2 EU server
Thanks, but I have the token, I need the key
Hi, I’ve token and set developer key on my Xiaomi Gateway 2 (lumi.gateway.v3) but I can’t open port 9898, I tried with some anciest version of Mi app but there not see the gateway, in those version. Any suggestion?
Any news how to enable LAN easily?
Hi bdb1, did you ever managed to solve this issue? I have exactly the same problem.
DGNWG02LM version, latest FW, LAN mode enabled via older version of the app, I got the key from the app, UPD port open (tested with nmap), lamp function works, I can change colors, but the service is getting me the error Unknown gateway sid xxxxxxxxxx for dictionary value @ data[‘gw_mac’]
I am sorry it’s been ages. I have through about this for a few days and cannot remember. Sorry!
Did you fix it?
Hi, yes I managed to fix it and the solution was really simple: there are 2 MAC addresses - a device MAC, and something called GW_MAC. The configuration is asking for a GW_MAC, but in reality, it wants the device MAC. I remember I tried both of them when I tried to configure it for the first time…none of them worked, no idea why. Then I removed the device, added again and since then, I was trying the GW_MAC only…after couple of hours, I tried the device MAC again…and it worked