Mi(Xiaomi) Smart home bindings?

I see many different (sub)brand / versions mentioned and indeed it can be confusing. As I understand there exists:

  • Xiaomi mijia gateway v2: the round one most users use to integrate with OH
  • Xiaomi mijia gateway v3: this is the square version (originally intended for air condition control) and also used to work with OA

Looking at the discussion above, it has become troublesome to get the updated versions working with OA. I have one (v2) being delivered soon, so I can confirm later.

  • Aquara hub homekit: looks like Xiaomi mijia gateway v2 but has homekit support (this one has rumors of getting EU plug). Did not read anything about OA integration yet, but as mentioned before I don’t see the point to use this version as OA users will most likely not use the homekit interface.


Is it possible to use OpenHAB with new Xiomi Gateway (called “Xiaomi Aqara Air Conditioning Companion” or “Mi Gateway 3”) model lumi.acpartner.v3


I own this device and it works very well as a gateway with my Xiomi Aquara sensors (motion, temperature, door).

This is info from Mi Home android app:

Version code:204

Door and Window
and Humidity Sensor”}]

I was able to activate LAN functions and get the key

Despite this, i cannot make my gateway to work with OpenHAB. I’ve heard that lumi.acpartner.v3 is uspported by home-assistant and domoticz.

Thank you for any help.

Best regards.

guys please i need someone’s help

i guess i am doing something wrong here.
i have ZERO experience with openhab’s text rule engine so i am using the rule engine from paperUI which is usually ok for me.

i am trying to catch the LONG_PRESSED event but it does not appear in my list and it doesn’t work when i write it. also my xiaomi binding does not discover my vibration sensor from xiaomi even though i read that it should.

can anyone help me with that?
these are my options…

Finally had the time to create an issue. Not impossible I can solve it myself but I’m a bit low on time atm…

Aqara is the new Brand from XIAOMI especially for HomeKit Support Devices

and if the OH-Manual is correct - it should work , the Aqara Gatway is also called “v3”

Gateway v2 (with radio support) or v3

Seems like there is some confusion about gateway versions and the difference between aqara and xiaomi.
Now following the smart home lineup for quite a while this is my impression of it’s history:

Important to know is, that Xiaomi has made a platform for different manufacturers to integrate their smart devices in one big ecosystem. For example Yeelight - they build the lamps, but integrate them with the Xiaomi protocol making them compatible with the MiHome App. Same for the vacuum robot, which is build by a different company (Rockrobo or so…). I guess Mijia might be similar…

This is also the case for our smart home devices. The first generation was built by Lumi. I don’t know if they rebranded to Aqara or if it’s a different company now but the newer devices are all built by Aqara.

Actually this is not the case. My gateway identifies iteslf with the MI IO binding (see here) as lumi.gateway.v3 and it’s the round one!

This is the square one @bartsnijder is talking about. I know, very confusing!

So to clarify:

  • Round “Lumi” gateway: there are two versions (v2 & v3), which look the same and are round, probably the ones most people use here - I don’t know what the difference is between them
  • Round “Aqara” gateway: the new gateway (supporting HomeKit) - this is not tested with the binding, brand new, and the community would appreciate any pioneer buying that thing and giving it a go with the binding and OH :wink:
  • Devices, which are able to act as a gateway, for example the Air Conditioning Companion see here

Regarding support for the acpartner devices - If anybody has this device please do following:
Enable TRACE logging, make sure the acpartner is set up in your network and developer mode is on. Then trigger a discovery in OH PaperUI and log the result. The binding should send a message with { cmnd: whois } and every gateway answer. Then open an issue and post the log here.

I have just had a Aqara delivered and have downloaded the Mihome binding. PaperUI did not find the hub after i have set it up on my ipad (that was a task in its self). Im pretty well stuck now as my knowledge is limited when it come coding etc.

You can follow the same procedure to capture the communication between openhab and the gateway.
You can find a tutorial on how to log here in the binding documentation

Today I received my 2nd gateway which is now succesfuly added to the OH system. Due to the mentioned rumours about not being able to add gatweways with updated firmware I skipped updating them.
Although the system works fine now and is not WAN-connected updating to the latest firmware is not necessary yet, but has anybody verified the firmware issues?
Is it indeed not possible to go to the latest FW without any OH integration problems or was there another root cause?

I’m on latest fw 1.4.1_159 and no problems at all with the binding…


I am on 1.4.1_159 with two gateways. No problem here with openhab 2.3 and latest milestone

1 Like


Updated yesterday and indeed all still works fine

I have a motion detector. I did not use it for a while and deleted it in Openhab. Now I wanted to use it again but the ID does not know anymore. He does not appear in the INBOX anymore. I have already deleted it in the MiHome app and newly trained, unfortunately without success!

Does anyone have an idea how I can create the motion detector again?

Do you have a battery?
Did you try to reset the sensor ??

I have changed the battery. I can use the device into the MiHome App without problems. The only problem is that the sonsor no longer appears in openhab.

if you have the ID in the app, you can try adding it manually in .things

Thing mihome:sensor_motion_aq2:158d0001656c2b "Oficina_Moviment" @ "Oficina" [itemId="158d000xxxxxxx"]

Where can I see the ID in the app? I can not find a ID. i use the newest iOS App

I can not tell you in IOS, but in android, in the section of the gateway, all the sensors appear

Do you have a Screenshot for me please? So i can search this screen in my iOS app.

You must activate the developer mode and in Hub Info, you must exit all the sensors with your ID.
I look to get you a capture