Mi(Xiaomi) Smart home bindings?

Hey marcolino7, I’ve actually got a couple of this and unfortunately they do not seem to work with the current firmware. As far as I can tell it doesn’t even appear as a usable device on my v2 gateway when I pair one of them. The connected devices count goes up by one, but I do not see it as a device in the Android Xiaomi App. So, my guess is if it doesn’t even work on the Android app/gateway, it won’t get reported to the binding. That’s what I’ve found so far in the debug logs -

2017-05-25 11:02:41.067 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Updated “last time seen” for device 158d0001720b48
2017-05-25 11:02:41.069 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Device 158d0001720b48 honored read request
2017-05-25 11:02:41.070 [DEBUG] [discovery.XiaomiItemDiscoveryService] - Detected Xiaomi smart device - sid: 158d0001720b48 model:
2017-05-25 11:02:41.072 [ERROR] [discovery.XiaomiItemDiscoveryService] - Unknown discovered model:

If anyone else have better luck, please do share. Hopefully, it will work with the v2 gateway with new firmware. I’m a bit worried that it might only work with the v3 Aqara branded gateway. Unfortunately I do not have one, so I can’t confirm.

hi @CoolWombat
I’m confised. Is there another gateway available for Aqara devices? Is this gateway backyard compatible with non aqara devices?

Thanks

Yeah, there’s another gateway, officially known as Xiaomi Aqara Air Conditioning Companion or something in that line. As far as I know it is backward compatible as in the example they give, they actually use the round temperature and humidity sensor. I was hoping that someone on this forum owns one of this v3 gateway and have tried it with the new Aqara branded temperature and humidity sensor. I am guessing that it might work as it’s actually branded Aqara.

New firmware-update:

1.4.1_146.0141

I checked it today, but it seems, the new version is out since 2 weeks.

Also there should be another action for wireless aqara wall switch: ‘both_click’

Can someone implement this into the binding?

Here the info from another forum:

17-05-10 20:08:58 DEBUG (Thread-5) [custom_components.xiaomi] PUSH >> <Entity Wall Switch (Left)_158d000183f688: off>: {'dual_channel': 'both_click'}
17-05-10 20:08:58 DEBUG (Thread-5) [custom_components.xiaomi] PUSH >> <Entity Wall Switch (Right)_158d000183f688: off>: {'dual_channel': 'both_click'}

EDIT:

Seems that the Xiaomi Zigbee was decoded:

EDIT2:

And there is a possibility to send a read command to the sensor. Is this already implemented or can the current binding only hear what the sensors are sending on its own?

2 Likes

Hello! My English is very bad, but it seems to me that what you are talking about, it works from the very beginning.

rule "aqara both_click"
when
     Channel "mihome:86sw2:158d000106ae23:dual_sw" triggered BOTH_CLICK
then
     .....
end

Hello!
I did not specify Developer Key in the paperUI.
But like everything works. Do I need to specify it, if so, what is the difference with it and without it?
Thank you!

With the developer key, you can write the Gateway, like changing color, playing sound, etc.

Hello! I suspected that this was for the gateway, but he had not worked with him yet, thank you for explaining.

Hello!
When the motion sensor triggers a log error:

2017-06-06 00:00:09.126 [ERROR] [me.handler.XiaomiSensorMotionHandler] - Cannot find item for timer value, using already set value 120

items:

Switch		motion01_state			"State [%s]"						<motion>		{ channel="mihome:sensor_motion:158d000113e072:motion" }
// minimum 5 seconds
Number		motion01_timer			"Timer"								<clock>			{ channel="mihome:sensor_motion:158d000113e072:motionOffTimer" }
DateTime	motion01_last_motion	"[%1$tY-%1$tm-%1$td  %1$tH:%1$tM]"	<clock-on>		{ channel="mihome:sensor_motion:158d000113e072:lastMotion" }
Number		motion01_battery		"Battery"							<battery>		{ channel="mihome:sensor_motion:158d000113e072:voltage" }

In what error, I do not understand?

Good afternoon!
When changing the battery level in temperature sensors, motion sensors, buttons, etc., I record the time of change and the current level of charge. In grafana I output this data in the form of a table. From time to time, the value of the battery charge level is transmitted as a fractional number. Could it be right, at the binding level, to bring this number to the whole?


Thank you!

Hi,
I tried to persist Xiami Binding values with rrd4j and mapdb, and no data persisted.
I have other items not Xiaomi persisted and it work.

Is there issue with this?
Thanks

Hi,
Sorry for stupid questions and if someone will send me to appropriate FAQ or RTFM it will be enough :slight_smile:
The first question is about Xiaomi Infrared Universal Remote mentioned here. Is it possible to integrate it into OH2 via the current bindings or it will require creation of a separate binding due to it works via WiFi (not ZigBee)?
Could Xiaomi Gateway controller manage this Infrared Universal Controller or it’s made via android/ios application only? And if the Gateway can do it does it mean that integration through the current binding is possible?

The second question is about new xiaomi product - Xiaomi Aqara curtain motor (ZigBee version). It’s controlled via Xiaomi gateway 2 or Aqara Gateway 3. Could you advise how to initiate the support of this device in the current binding and how can I help in this process?

Thank you and kind regards!

Have the switches changed the channels? Instead of sw, now we need to use ch?
It was
{channel=“mihome:ctrl_neutral2:xxxxx:sw1”}
Became
{channel=“mihome:ctrl_neutral2:xxxxx:ch1”}

There is a new firmware for the xiaomi mi gateway:

1.1.4_147.0143

I installed the binding from https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.mihome/

The discovery finds my gateway and add things regarding the gateway (color, volume…) But I’m unable to find my temperature & humidity sensor. (Also tried t in Domiticz and this is working)

What did I forgot/did I wrong?

Search again now that you have added the gateway. From memory, this needs to be added before any linked devices appear.

On Gearbest they are stating, that you can measure the amount of light in the surrounding area with the smart home sensors.
Is this feature really available?

The Xiaomi Mi Home Gatway has the functionality (light sensor), but there are no separate sensors for that.
At least not yet. Maybe the Motion Sensors could be used for that, but there is no parameter exposed so far.

Xiaomi Mi Home has now an official openHAB 2.0 binding! :guitar:

So the day has come! @Ondrej_Pecta @pboos @dimalo and all of you taking your time to test and report issues - thank you for making it happen!

http://docs.openhab.org/addons/bindings/mihome/readme.html

MiHome binding was finally merged! :clap:

7 Likes

@kubawolanin good work! Thank you all!

2 Likes