Xiaomi Mijia Smart Multi-Mode Gateway (ZNDMWG03LM) support

Make sure to enable sockets extension
phpenmod sockets

2 Likes

Hey. I added Zigbee Home Automation support in the latest release!!! Read the readme carefully, there are all the details.

5 Likes

I dont know what to say, thats one of the biggest solution I seen since im working with HA. Very nice job, I just wanted to buy a Zigbee hub, but now I does not have to. Thank you mate :slight_smile:

How will be the Socket stuff installed if I have already installed the Xiaomi Integration and just updated now? There is no notification this time, should I delete the integration and start it again?

If you managed to boot into the “backup rootfs”
Just use dd to restore the backups to the flash, the same method you use to flash your alter rootfs

After that, disable rootfs check, and the device should return to the normal state.

After the ZHA integrations I tried to discover my Hue Bloom (72997/60/PH) without success, so now I’m trying to integrate it with a diyhue (Fake Hue Gateway) using the Xiaomi Hub as a remote antenna but without success even here.
So now I’m trying to connect it with zigbee2mqtt but I can’t access to the Zigbee antenna with the socket/tcp protocol. I tried to convert tcp/socket protocol to serial but I really don’t know how to do it and if it’s possible.

@colethegamer to configure ZHA, you need to remove the configured integration and configure it again with the ZHA option enabled.

1 Like

Update, the Ikea outlet don’t stay up for long in Xiaomi Home after the pairing with the Developper Tools despite beeing constantly plugged.

Is there any way to control yeelight mesh led spots?
I have a lot but with this method HA is unable to find them.

Hello serrj-sv,

maby you can help me.
I already tried to connect via serial but i only can read and not write.
I tried to enable telnet via php-miio.

If i use " php miio-cli.php --discover all" i can find the Mi hub v3 (ZNDMWG03LM).

But if i try to send the commant via php miio-cli.php --ip 192.168.178.10 --token XXX --sendcmd ‘{“id”:0,“method”:“enable_telnet_service”, “params”:[]}’

i only get the response: “Устройство 192.168.178.10 не доступно или не отвечает.” (Device 192.168.178.10 is not available or not responding.)

the port 9898 is still closed. May u can help me?

Hallo Andreas,

die yeelight mesh led Spots lassen sich mit dem Mi Hub v3 verbinden und über die Mi App steuern. Auch mit Schalter/sensor zu verbinden.
Allerdings konnte ich noch nicht auf das Gateway außerhalb der mihome app zugreifen.
Aktuell habe ich meine led Spots mit einem “Shelly” zum schalten. Da macht dieser smarte Spot allerdings nicht viel sinn.

Wenn ich den v3 verbunden bekomme teste ich mal ob die Geräte sich außerhalb mihome steuern lassen.

Hallo 0x000.

yes, that what I`ve done already.
The Yeelight Mesh Spots are connected to MI home via Mi Hub v3.
So they are controllable from Mi Home APP. Control them outside from Mi Home with HA would be very nice.

if you are on windows send

php miio-cli.php --ip IP --token TOKEN --sendcmd "{\"id\":1,\"method\":\"enable_telnet_service\",\"params\":[]}"

this will enable telnet on port 23. port 9898 is for dev/lan mode for old mijia v2 gateway and has nothing to do with mijia v3 gateway.

1 Like

Hello

Thanks for your reply.
If i send this command, the Skript tells me that the device is not reachable. Port 23 is closed to. The miio Port 54321 is also closed on my gateway.

I cant open the telnet port to open the writeable access.

Do u have an idea why this happen?

if your hub connected to cloud? double check ip/token.

1 Like

Hello,

Yes it’s connected to the cloud. I can do anything on this hub. (Local as also in 4G Network)

I tryed to reset the device but i still cant connect to them. (Only serial read)
If i try to send a command to the hub and i press enter, nothing happen.
Maby its not working anymore? I tried it 4 hours yesterday.

how did you get the token to encrypt miio command?

1 Like

Hi,

i create a backup via IOS an read the sqlite file from the mihome app.
The token where AES decrypt in HEX via an 32 zero as password.

My Token now look like:
61423445395761515a6819404a596679 (i changes some numbers)

new user only can send 6 MSG per day? wtf. ( i am 0x000)

i get it! :slight_smile:

I installed php on my raspberry an it worked. I dont know why my windows cant do ist. escape " did not work.

Not im at the next problem. :confused:

i am not able to execute “psm-set network.open_pf 3”
did u know why?

1 Like

the thing that you try to do does not work with this hub. it’s new hub mijia v3 and you try things for mijia v2. you must use this integration for HA