Mi(Xiaomi) Smart home bindings?

I think it is a limitation of the aqara switch, not a fault of this binding.

But some time ago i have seen a rule to use double,tripple,quad click here on the forum. It was done with a simple rule.

Unfortunately my English is very bad, please show by example how to use it? And just do not understand how it works ‘mihome:sensor_cube:xxxxxx:action’ triggered ALERT
Thank you!

Here is the example for double click, maybe this works with aqara?

1 Like

New device Xiaomi MiHome Smart Fire Alarm Detector
https://ru.aliexpress.com/item/Xiaomi-Mijia-Honeywell-Smart-Fire-Alarm-Detector-Progressive-Sound-Photoelectric-Smoke-Sensor-Remote-Linkage-Mihome-APP/32802605688.html?spm=2114.03010108.3.362.rMBWtG&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10065_10151_10068_10136_10137_10060_10138_10155_10062_10156_10154_10056_10055_10054_5130020_10059_10099_10103_10102_10096_10148_10169_10147_10052_10053_10142_10107_10050_10051_10084_10083_10119_10080_10082_10081_10110_10111_10112_10113_10114_10181_10037_10182_10032_10078_10079_10077_10073_10070_10123_10120_10127_10124_10125-10120,searchweb201603_9,ppcSwitch_5&btsid=708d161b-4b92-4a0c-9115-a72bbc83386c&algo_expid=cf97b10c-57e2-4ded-8e2a-474927f783a2-45&algo_pvid=cf97b10c-57e2-4ded-8e2a-474927f783a2

1 Like

I’m sorry I have no cube, but I also cannot imagine how the ALERT has to be triggered. If you find out, please let us know!

For the timer:
Just declare some Number Item and bind it to the Timer channel, change it to your needs and you see next time the motion sensor goes off, that its deactivating, when you want it to - cool isn’t it?

here is what I have:
in items file
Number BueroMotionTimer <clock> (Restore) { channel="mihome:sensor_motion:XXXXXXXXX:motionOffTimer"}

The Restore group is used, guess what, to restore values with persistence after restart :slight_smile:

then in sitemap
Setpoint item=BueroMotionTimer label="Timer [%d]" minValue=30 step=30

Set it to 30, the motion sensor switch is deactivated after 30sec.
this is extremely useful for triggering light, you can just trigger it with the motion switch of the sensor.

Also really good news
The binding from IOT marketplace is finally working and ready for you guys to be tested.

Any bugs? we will get you the exterminator!
Any wishes? better now than never!

cheers

EDIT: you want to know, how to install the binding from the IOT marketplace? Follow the comprehensive Tutorial

I’m apparently still on the 2.0.0.1 version of openHAB2. Does this mean I cannot get the IoT marketplace integration yet?
Thanks.

I´m on OH2.1 snapshot and i installed the latest mihome-binding manually (move to addons folder). When this binding will be included in the snapshot build of OH2, what do i have to do to get the official version which will get updates automatically?

Simply remove jar-file from addons-folder and install the binding in paper ui?

When will this be available in snapshot release? The next few days? How can i see, if it´s already there?

I see mention of the Zigbee plugs/sockets - I err, might’ve accidentally bought the WiFi ones ages back … is there any hope?

Hi there,

I am pretty new in OH2. I used the preconfigured image for the Raspberry Pi (I’m using the RPi3) to install OH2. After that, I installed the Xiaomi Smart Home bindings. The Gateway was founded, also all the connected devices like the motion sensor or the temperature sensor. Unfortunately I can’t activate/deactivate the devices or the temperature sensor just show NaN. What I am doing wrong? I check the developer code twice. It is correct. Maybe I am using the Xiaomi gateway v1 is the problem? I bought it a year ago. Can anyone confirm, that only v2 and above works? Can anyone help? Sorry for my bad english. Thanks!

Cheers!

@sonyxperiageek
when you cannot see the marketplace in paperUI under addons->misc, then youre right - you would have to install the 2.1 snapshot

@halloween
Get the marketplace version. The binding is still under development and in beta, undergoing some review processes and frequent updates. The marketplace version should be updated automatically, when there is a new development verison.

@matty
At the moment only devices connected via the zigbee gateway are supported

@toxicbrain
If you already have a connection and see devices, things are working not as bad.
please check the communication between the binding and the gateway. activate debug logs for the binding, there are many guides for that. for example in the github pull request already mentioned in this thread. then post a log and people can help you understand, if its the gateway version or something else… cheers!

Is the 2.1 Snapshot an official release or is an early beta release one? Thanks.

it’s in development and beta/early - new snapshot releases are generated with each change in development.
For me its working fine though…

Okay. How does one upgrade to a new snapshot on OH2? Will it lose all my settings, rules etc.? Is there a link or should I google? Thanks.

please check the docs - for linux I’m sure there is a guide in there…

okay thanks!

The Xiaomi Switch don´t work with the latest Version from the IOT Market and the latest OpenHab Version? Can anyone confirm that? Thing is added and online in PaperUI

rule "da stimmt doch was nicht"
when
    Channel "mihome:sensor_switch:158d0001265de3:button" triggered
then
    var actionName = receivedEvent.getEvent()
    switch(actionName) {
        case "CLICK": {
            sendBroadcastNotification("Klick") 
        }
        case "DOUBLE_CLICK": {
            sendBroadcastNotification("doppelt") 
        }
        case "LONG_CLICK_PRESS": {
            sendBroadcastNotification("lange1") 
        }
        case "LONG_CLICK_RELEASE": {
            sendBroadcastNotification("lange2") 
        }
    }
end

The logfile looks good for me!?

17:59:28.505 [DEBUG] [me.handler.XiaomiSensorSwitchHandler] - Item got update: {"cmd":"report","model":"switch","sid":"158d0001265de3","short_id":62671,"data":"{\"status\":\"click\"}"}
17:59:28.509 [INFO ] [marthome.event.ChannelTriggeredEvent] - mihome:sensor_switch:158d0001265de3:button triggered CLICK

Hi,

I tried to install the last version from your link : https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.mihome/2.1.0-SNAPSHOT/

But this time the binding doesn’t start. I tried to reinstall it, restart openhab with no luck. Is there an issue with this version (04/27) ?

Thanks.

looks good for me too.
which version of OH?
can you confirm it’s working on a former version?

@Origin8
binding is working and starting, not only for me. see the post above yours.
Please consult the logs and/or the karaf console (bundle:list) for more information.

The OH Version is 2.1.0~20170501124745-1 (Build #906).

Yes, I can confirm that the rule works before the update.

edit:
now, it works, with this simple Rule:

rule "da stimmt doch was nicht"
when
    Channel "mihome:sensor_switch:158d0001265de3:button" triggered CLICK
then
     sendBroadcastNotification("Klick")
end

But the next Problem :scream:
i´ve tried to add a second Gateway. In PaperUI the Thing for the Gateway works, but the Thing for the Bridge :triumph:
I also tried to add the Bridge manually, but it´s not possible to enter the IP and the Serial Number, only the polling Interval and the Developer Key can be edited.