Mi(Xiaomi) Smart home bindings?

You’re absolutely right. Thank you :slightly_smiling_face:

Can someone tell me which ‘Xiaomi Smart Plug’ is supported. I saw several types online and also in the Mi Home app. I just want to order the correct one.

I have the Zigbee version, that works…

Does a European version exist? Otherwise one would need two adapters.

As far as I know, there is only the chinese version, so you will need an adapter, the device you put in the plug does’nt, because its universal, it can hold european plugs, I have some Broadlink MP1 blocks, the work fine in europe!

Hi All,
looks like my problem already mentioned here but I didn’t got how to fix it :frowning:
I migrated my OH2 from snapshot to stable version and reinstalled mihome binding (binding-mihome-2.1.0).
Everything works fine except smart plug, I’m getting next error:


17:56:43.809 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while calling handler: java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:220)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager.receiveCommand(ThingManager.java:374)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.items.events.AbstractItemEventSubscriber.receive(AbstractItemEventSubscriber.java:47)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:192)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)[99:org.eclipse.smarthome.core:0.9.0.b5]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
Caused by: java.lang.NullPointerException
        at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.toJsonValue(XiaomiBridgeHandler.java:319)[200:org.openhab.binding.mihome:2.1.0]
        at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.sendCommandToBridge(XiaomiBridgeHandler.java:257)[200:org.openhab.binding.mihome:2.1.0]
        at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.sendCommandToBridge(XiaomiBridgeHandler.java:239)[200:org.openhab.binding.mihome:2.1.0]
        at org.openhab.binding.mihome.handler.XiaomiBridgeHandler.writeToDevice(XiaomiBridgeHandler.java:266)[200:org.openhab.binding.mihome:2.1.0]
        at org.openhab.binding.mihome.handler.XiaomiActorPlugHandler.execute(XiaomiActorPlugHandler.java:42)[200:org.openhab.binding.mihome:2.1.0]
        at org.openhab.binding.mihome.handler.XiaomiDeviceBaseHandler.handleCommand(XiaomiDeviceBaseHandler.java:97)[200:org.openhab.binding.mihome:2.1.0]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:377)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:1)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:218)[99:org.eclipse.smarthome.core:0.9.0.b5]
        ... 12 more
17:56:43.810 [INFO ] [marthome.event.ItemStateChangedEvent] - Plug_Switch_LR changed from ON to OFF
17:56:43.816 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Plug_Switch_LR' received command OFF

Hi There,

I have a bit of a luxery problem, I tagged the Xiaomi Temp sensor to my Amazon Echo aka Alexa with the tag
[ “CurrentTemperature” ] and this works brilliant: When i Ask:

Alexa What is the Bedroom Temperature? , she answers “The Bedroom Temperature is 24 point 75634786679657647877 degrees

And yes this is very accurate :+1:, but a bit to much detail for me!:joy:The Bedroom Temperature is 24 point 7 degrees” would be more than enough for me!

Anyone know how to fix that?

Ray

That was a bug the initial stable version unfortunately had. switch to snapshot or try the marketplace binding - not sure if 2.2.0 binding works with 2.1.0 OH…

@X-Ray181 you can define a new Number item and rule to copy the value from the sensor and abbreviate it…

Hello Dimalo,
Yes, our friends on the alexa binding helpt with solving it, i now have 6 xiaomi temp/humid sensors for which alexa correctly states the temp with one decimal.
I use an early 2.2.0 version off the great xiaomi mi home binding, and the temp/humid, cube, switch, door/window sensors, including the plug work great!
The only thing that does not work is the honeywell fire sensor…

You can help make it work. provide logs and infos as issue report to OH on github…

Hi all,

This is my first post here, I’ve been using the Xiaomi binding successfully (thank you very much for this binding) for a couple of weeks now with multiple Xiaomi home gadgets, one of them the aqara wireless wall switch, and since last update of the Xiaomi Gateway 2 firmware (1.4.1_149) the left button does not work.

It seems a problem with the Gateway because I’ve done a tcpdump listening for packages from the Xiaomi Gateway on the OpenHab machine and I detect UDP packages when I press the right button and both but none when I press the left button. Also, I’ve seen this post https://github.com/home-assistant/home-assistant/issues/8935 which seems the same problem with Home Assistant.

The left button does work with MiHome software with automations.

I’m writing this post to see if it’s happening to others and discourage people with this switch from updating the Xiaomi Gateway.

Luis

here is a smoke sensor log

Hello,
Please add support for the latest Aqara motion sensor. Is there a dedicated thread/forum etc for the binding or is this the official channel?
Also, is it possible to select a “scene” from the ones built into the gateway? I thought it might be the illumination item (Number Gateway_AmbientLight { channel=“mihome:gateway::illumination” }) but that didn’t work. Any ideas?

Hello.
I am using this binding and it works beautifully. Thank you for the great work :slight_smile:
Noticed that the gateway supports max 30 devices(info from gearbest). Has anybody tried to connected more then 30 devices to the gateway? And have anybody tried to connect multiple gateways to the binding?

That’d be me :wink: I had no issues with connecting second gateway to my OH instance.
Works flawlessly. I didn’t test it with maximum number of devices, though.
I’ve heard of people that managed to connect even 35 devices to one gateway, so there’s that.

Two gateways are cool - they both serve as a doorbell :wink:

Great, next stop gearbest :slight_smile:

I’ve tried about 38 before some devices become intermittently unresponsive. Waiting for my second gateway to arrive now :slight_smile:

@kubawolanin any special setup/settings to configure the second gateway?

unfortunately the log of the smoke sensor is without the messages in debug log mode. This is what is needed to find out, why its not working…

@CoolWombat: no special setup needed. connect it to the wifi, enable dev mode and it should be discovered. connect as many gateways as you want :sunny:

I installed your binding on OH1 - works great with old Xiaomi devices. Thanks!
Received Aqara door sensors (model MCCGQ11LM) and can’t find how to make them work. Binding detect it as - sid: 158d00016d6dd7 model: sensor_magnet.aq2
I tried using in items:

Contact OfficeDoor "Office door" { xiaomigateway="158d00016d6dd7.magnet" }

and

Contact OfficeDoor "Office door" { xiaomigateway="158d00016d6dd7.sensor_magnet.aq2" }

but it did not works - nothing logged in events.log
Do you have any plans to add support of this sensor in OH1?
Thanks