Mi(Xiaomi) Smart home bindings?

Hi @horschte, what is the right way to install this binding?

I downloaded it to /usr/share/openhab2/addons an changed user and group like:

chown openhab:openhab org.openhab.binding.mihome-2.4.0-SNAPSHOT.jar

Should I change execution-flag? chmod +x

Is there anything else I should do?

Log shows this

2018-09-19 18:54:48.332 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.mihome-2.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.mihome [269]
  Another singleton bundle selected: osgi.identity; type="osgi.bundle"; version:Version="2.3.0"; osgi.identity="org.openhab.binding.mihome"; singleton:="true"

        at org.eclipse.osgi.container.Module.start(Module.java:444) [?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [9:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [9:org.apache.felix.fileinstall:3.6.4]

I just copy the jar file in this folder and everything works. If not, a restart of openhab is needed. First uninstall the binding via paperui (or via text files if you used this)

actually, the 2.4 binding works for me too.
I was in OH 2.2, upgrading to 2.3 gave me the possibility to install the new binding (2.4), which seems to work perfectly and even supports the new Aqara Vibration sensors.

Does anyone already tried the new Aqara Hub (Gateway) which is HomeKit compatible?

You mean this one: https://www.gearbest.com/smart-home-controls/pp_009661787808.html?
Does it only report Vibration - or also orientation like axis? it says it can react to “inclination”? Is this a channel in OH2 and does it report inclination in realtime?
I’d like to monitor my blinds and stop them, if they’re not coming down correctly…

Yes, that one.
As far as i know (at the moment, i’ve just configured them) they support these channels:
lastAction, tiltAngle, orientationX, orientationY, orientationZ, bedActivity, batteryLevel, lowBattery.

BUT, the big problem to me it’s that after a reading they go in standby for 1minute, to save energy.
It means that they aren’t actually real “sensors”, but they act more like switches, because they report a state and wait for a minute, they don’t continue to report.
So, if I am not wrong, no they don’t report in realtime, sadly.
I wanted to use them for home security, to hear for vibrations of windows…but i think they’re best use is like knock knock switches or something similar, even if they still can be used for other purposes.

So i guess you need something else, they won’t report as many informations as you may need.

Hi can anyone tell me if the new gateway camera is working with the binding?
i whuld like to dive into the Aqara world but i dont have gateway
and i see no purpuse with big ones

I’ve seen more post on this device.
What is the added value of the new Aquara Hub compared to the “normal” hub. I guess people using openhab have all control arranged by openhab so even if a homekit would be owned those poeple would still have a homekit thing defined and avoid direct communication from homekit to sensors & devices as this does put openhab out of control right?

@binderth have a look in the log here.
You see how the device reports a tilt angle and axes on each movement.
If it is moved, it reports. I cannot confirm, that it only reports once per minute, this you can see in the timestamps of the example log.

@Svil Tahnk you! I guess the gateway needs an update first to be able to tell the model. If you are on the latest SW, we have to be patient and wait for it to be updated…

@Masssssy please make a log and open a github issue for that. How to log and github issues page

How do you fix the temp sensors and magnet sensors to the wall or to the door/windows?

Do you use the glue on the backside? But what is, when you have to change the battery?

It is double sided tape. When you need to change battery you simply twist the sensor. The battery door / back of the sensor will stay, since it taped. Replace the 2032 cell and then twist the sensor back.

I heard some rumors about Xiaomi gateway in EU version. Do you know anything? I’m not sure if I should wait as I hate adapters…

Be careful @Tribon I just bought the Hongkong version of the Xiaomi Mijia Gateway and so far could not figure out how to set it up in Developer Mode to be able to integrate it into OpenHAB. It seems you have to use the App with China Mainland locale to activate the Dev Mode - but I have to switch it to Hongkong to add the Gateway, which makes the menu point disappear. I am just trying to get the Chinese version of the Hardware or find a way to flash the Gateway with the chinese Firmware.. but no luck so far.

FYI, it is possible to use the gateway for TTS:

@mpol Try to downgrade Mi Home app to 5.0.19. It was working for me to get token for another MI IO Binding with use of MIToolKit. It might be like that that Xiaomi is upgrading Mi home up to stop messing with developer mode. I might be also wrong but worth trying.

@Tribon I was already told to downgrade to a version 4 of the Mi Home App - but it refused to login to my XiaoMi account. I can give v5.0.19 a try maybe this one still works. Thx!

EDIT: I tried it. Uninstalled the latest version, installed v5.0.19 and logged in with my account. The dashboard is working, but I was unable to access the devices - usually there is an initialization step when you access one of the added devices through the Mi Home App, but it never starts. Updating to the newest version solves this issue.

No luck getting this to work.

Anyone else having problem receiving data on port 9898?
Wireshark tells me, that the correct values are sent to the unicast adress(225.0.0.50) , but monkeycom on port 9898 blocks it.
I’m getting a TTL Error too.
ANY help is appreciated

someone can confirm the v3 Version works with openHAB? or only v2. I use v2 in my Cottage and it works fine and I’m about to use it in my home also for some cool sensors, I could use… So now I’m thinking v3 is more promising to have additional sensor than v2?

edit:
or is this a completely different Gateway? I’m not so into the chinese tech, but I thought Aqara is a sub-brand of Xiaomi? :confused:

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.

Hi.

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

https://xiaomi-mi.com/sockets-and-sensors/xiaomi-aqara-air-conditioning-companion-temperature-humidity-sensor/

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
网关ID:93869871
Zigbee通道:15
网关信息:
{“life”:56497,“cfg_time”:0,“token”:“4f52ea09465XXXXXXXXXXXXXXXX”,“mac”:“7C:49:EB:XXXXXXXXX”,“fw_ver”:“1.4.1_152”,“hw_ver”:“MW300”,“model”:“lumi.acpartner.v3”,“mcu_fw_ver”:“0149”,“wifi_fw_ver”:“SD878x-14.76.36.p84-702.1.0-WM”,“ap”:{“rssi”:-49,“ssid”:“pajonk”,“bssid”:“18:D6:XXXXXXXXX1”},“netif”:{“localIp”:“192.168.2.227”,“mask”:“255.255.255.0”,“gw”:“192.168.2.1”,“gw_mac”:“18:XXXXXXXX”},“mmfree”:144248,“ot”:“ott”,“otu_stat”:[573,383,647,20,622,92],“ott_stat”:[2,0,753,296]}

子设备信息:
[{“model”:“lumi.sensor_magnet.aq2”,“did”:“lumi.158d00XXXXXXX”,“name”:“Aqara
Door and Window
Sensor”},{“model”:“lumi.sensor_motion.aq2”,“did”:“lumi.158d000XXXXXXX”,“name”:“Aqara
Motion
Sensor”},{“model”:“lumi.weather.v1”,“did”:“lumi.158d000XXXXXXXX”,“name”:“Temperature
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.