Xiaomi smart home

Perfect…waiting for my package to get delivered to try it out :slight_smile:

As well interested in this. Just ordered xiaomi smart home devices. Will be happy to try out stuff or implement stuff (if I find the time).

Bought all the sensors except for the plug and the door sensor, can’t wait to try it.

A working example: https://github.com/home-assistant/homebridge-homeassistant

A native home assistant plugin (with discovery) would be awesome !

It looks like Xiaomi hub broadcasts sensor data via udp. Someone already had working prototype of HASS plugin.

2 Likes

I have made a python module from my work for a connector :

I will make the MQTT hub as another python module depending on this one, and an home assistant module shortly after.

I looks like the homeassisitant-aqara repository is less advanced than my implementation. I haven’t seen his code on the home assistant part, only his “pyaqara” code.
I’ll try to contact him so we can merge our efforts.

Hello Jonathan.
What FW are you using? Did you enable local communication on gateway?

I have found this guide: https://drive.google.com/file/d/0B_0gvJvApcRcYmFid09oV3lLLVE/view
that explains how to enable the developer mode on the Xiaomi Gateway but i get a “Method not found” on my mihome app (android version) and a crash on the iOS version. Any help?

Hi, yes I enabled the local communication on the gateway. The firmware is the latest chinese one.

Nice find !
It is the good method.

What worked for me was on step 5 to click a couple of times on the refresh button on the right of the code, then validate on the bottom right button. I did it one or two times before it worked.

Which firmware version do you have on the gateway?
Mine is: 1.2.6_138.0141
And no matter what I do I can’t upgrade it.

So with current MQTT implementation how it works? Do the door sensors report only when switching open/close state?
Easy to set up? Thinking of getting a set so need opinion if it can be made working with HA currently as component for aqara is being written for HA

I found the my gateway is V3 (Name of the wifi on first configuration), this could explain why I can’t update to the version reported in this topic.
Searching around I found this interesting github: https://github.com/louisZL and this repository:
https://github.com/louisZL/lumi-gateway-local-api
That talk about the lumi gateway that from what I understand is the Xiaomi smart home gateway.
Finally there is this website:
https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Flouiszl.gitbooks.io%2Faiot-open-c2c%2Fcontent%2Fresource_definition.html
That list all the “lumi.gateway.v3” device function and also function about other devices.
Hope that this could be useful to someone.

This is really exciting!

Xiaomi smart home is the only affordable sensor suite that i have been able to find, and i am just waiting to be able to integrate it into HASS.

Once that is done - All rooms will have motion sensors, door and window switches, and all light switches will be replaced with the wireless buttons!

i can’t wait!

1 Like

Just got my xiaomi smart gateway updated to the new firmware after being stuck on 1.2. Strange though after updating to 1.3, 1.4 suddenly came up. I can now retrieve the local password. WIll try this integration with HA now :slight_smile:

This morning I’ve done the update to the firmware “1.4.1_142.0141” now I have developer mode enabled and working.

dammit! you got me excited and i have just bought a heap… Gearbest has a sale on at the moment. i bought USD100 worth of gear…

Just a quick update everithing is working fine using this code:


But I found that the motion sensor need 1 minute in order to catch a motion again anyone else have experienced this behaviour?
This is annoying if I want to use the motion sensors in order to trigger a “light follower” feature.
2 Likes

Just upgraded. Code from Jon1012 works great! The only thing is that temp sensor sends updates once per hour if there is no significant changes.