Xiaomi Mijia Smart Multi-Mode Gateway (ZNDMWG03LM) support

You need to install HACS (Community Store). There are many instructions on the Internet about this.

Thanks again Alexxit, didn’t know HACS was mandatory (and didn’t know about HACS…)
I’m new and it’s a fresh install.
It works well, good job ! Good day

You can manually copy xiaomi_gateway3 folder from latest release to custom_components folder in your config folder without HACS. But in this case you will need to manually receive component updates.

Full path in my case:

/home/alexey/hassio/homeassistant/custom_components/xiaomi_gateway3/

@David.lepinay from my own experience, I’d suggest to spend some time to invest to install HACS. It’s a feature I can’t live without it any more. And if this is the first thing that requires it, you’ll find tons of other that require it too.

@AlexxIT does nice work, but will this lead someday to acceptance in the regular integrations of HA or will this custom component development only be available as custom dev?

Oh and by any change… the yeelight mesh down/spot lights (BLE) something to look out for?

I’m new to aqara gateway and realize that I have V2 and base on Home-assistant info need to do some soldering. Did anyone try doing this? or is there are a better method to open its close port? Thanks

Amazing work Alexx ! I’ve paired an Ikea Tradfri Outlet to my Gateway as lumi.plug.mmeu01 and the on/off function is working even if the power consumption is not ok, at least I can use this outlet that was sitting in a drawer.

No luck for the Tradfri On/Off dimmer because there is no close equivalent in the xiaomi ecosystem.

1 Like

I have 4 of these hubs
3 of them installed 100% via integrations on hacs but the 4th one says incorrect homekit password after entering it.
I have double checked the password many times and entered it many times - but no luck.
dont really want to use custom component when 3 of them are using the hacs integration.

any ideas?

Got new hub with new firmware 1.4.6_0043,can not use ‘admin’ to login telnet.

Hi, I’m from Russia, so I’m sorry if my speech isn’t very clear. I have a question about what I quoted, I also tried to do what you wrote and got an eternal reboot, but I managed to bypass this and go into the bootloader, but I do not understand how to flash rootfs there. I hope you can tell me, thanks.

@serrj-sv & @AlexxIT
Firstoff all thank you for all your work! Great that someone figured it out :slight_smile:

I am trying to follow the guides in the thread but I am confused if the steps mentioned in post #61 are still required to get the integration working?

The github page https://github.com/AlexxIT/XiaomiGateway3 does not mention those steps and also because of the warning “For unknown reasons this instruction will lead to bootloop in most cases!!” I would rather not attempt this.

However post #61 explains how to make the MQTT broker listen to 127.0.0.1 so how else would this be enabled?
The github page mentions that “the component” enables the MQTT server, if “the component” follows the instructions of post #61 wouldn’t this also be risking a bootloop?

@Terr4 The component enables MQTT in a different way. Safe for firmware. Rebooting the hub will return it to the stock state.

1 Like

Thank you for the explanation!
Good to know :slight_smile:

In the meanwhile I also found the relevant section in the sourcecode on github:

killall mosquitto
mosquitto -d
killall zigbee_gw
exit

I just did it manually a minute ago and it worked, thank you :slight_smile:

@tsunglung Please tell the exact model of the hub. Maybe a photo of the bottom. And photo of box. Date of manufacture.

Can’t get it working with Alexx integration.
image
I’ve scanned the device and seems only port 47879 is open.

Gateway FW: 1.4.5_0012

@AlexxIT any idea what could be the reason behind?
P.S. Greetings from Habr.

The model of hub is ZNDMWG02LM.

1 Like

it’s global version. can you share which country you bought it in and production date from the sticker? it looks like in global version they closed telnet with empty password. there still might be some ways to get in, but it would probably require to open device.

@tsunglung Thanks!

Attention: my component works with the ZNDMWG03LM model and firmwares v1.4.6_0012 and v1.4.6_0030. When new firmwares appear - do not update until I tell you that it is safe!

I have ZNDMWG03LM hub which worked perfect with your component. ZNDMWG02LM was bought on Taiwan’s market.
I guess the password was changed to some words like md5(sn +uuid). I had no time to test and the gateway had passed to some one else.

2 Likes

Hi,
I try to input the command for test

php miio-cli.php --discover all

But I receive following error message

Поиск всех
Fatal error: Uncaught Error: Call to undefined function socket_create() in C:\php-miio-master\miio.class.php:78
Stack trace:
#0 C:\php-miio-master\miio.class.php(61): miIO->sockCreate()
#1 C:\php-miio-master\miio-cli.php(134): miIO->__construct()
#2 C:\php-miio-master\miio-cli.php(76): cbDiscoverAll()
#3 {main}
  thrown in C:\php-miio-master\miio.class.php on line 78

What is my error? Thanks.