Support for more Mi-Home Aqara items

would be good to have a log showing the status message of the gas or smoke sensor…

I’m not sure if this is what you are looking for, but this is what I get when I just added the smoke sensor. I got the last three lines when pushing the test button on the smoke sensor itself.

2017-09-13 20:28:22.557 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Send to bridge mihome:bridge:f0b429cc59fa: {"cmd": "read", "sid": "158d00015b1a77"}
2017-09-13 20:28:22.723 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Device 158d00015b1a77 honored read request
2017-09-13 20:28:22.723 [DEBUG] [discovery.XiaomiItemDiscoveryService] - Detected Xiaomi smart device - sid: 158d00015b1a77 model: smoke
2017-09-13 20:28:33.893 [DEBUG] [g.mihome.handler.XiaomiBridgeHandler] - Adding item listener for device 158d00015b1a77
2017-09-13 20:29:09.244 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d00015b1a77 on channel mihome:smoke:158d00015b1a77:alarm received command REFRESH
2017-09-13 20:29:09.244 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Update Item 158d00015b1a77 with retented message
2017-09-13 20:29:09.244 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"read_ack","model":"smoke","sid":"158d00015b1a77","short_id":30476,"data":"{\"voltage\":3085}"}
2017-09-13 20:29:09.250 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d00015b1a77 on channel mihome:smoke:158d00015b1a77:status received command REFRESH
2017-09-13 20:29:09.251 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d00015b1a77 on channel mihome:smoke:158d00015b1a77:batteryLevel received command REFRESH
2017-09-13 20:29:39.748 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"report","model":"smoke","sid":"158d00015b1a77","short_id":30476,"data":"{\"density\":\"0\"}"}
2017-09-13 20:29:39.752 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"heartbeat","model":"smoke","sid":"158d00015b1a77","short_id":30476,"data":"{\"voltage\":3085}"}
2017-09-13 20:29:39.946 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Item got update: {"cmd":"report","model":"smoke","sid":"158d00015b1a77","short_id":30476,"data":"{\"alarm\":\"0\"}"}

Also, when clicking the alarm switch ON/OFF through sitemap I got the following.

2017-09-13 20:30:20.297 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d00015b1a77 on channel mihome:smoke:158d00015b1a77:alarm received command ON
2017-09-13 20:30:20.297 [WARN ] [home.handler.XiaomiSensorBaseHandler] - Channel mihome:smoke:158d00015b1a77:alarm does not exist
2017-09-13 20:30:21.323 [DEBUG] [home.handler.XiaomiDeviceBaseHandler] - Device 158d00015b1a77 on channel mihome:smoke:158d00015b1a77:alarm received command OFF
2017-09-13 20:30:21.323 [WARN ] [home.handler.XiaomiSensorBaseHandler] - Channel mihome:smoke:158d00015b1a77:alarm does not exist
1 Like

Hey Andreas thanks for the perfect log! There is an undocumented channel “density” showing.
here you go :smile:

1 Like

The gateway firmware has been updated - and the issue i had with the second button not sending has been fixed!


Now to block the gateway from the internet!

1 Like

Hi,
just received my Water Leak sensor.
It work very fine, but I cannot get battery voltage channel:

image

I tried to use batteryLevel instead of voltage, and I get a strange value, 81. It mean 81% ? Is it possible to have also the voltage?
Thanks
Do you have some examples for this sensors?
At this link http://docs.openhab.org/addons/bindings/mihome/readme.html miss some example for Water Leak and Smoke Sensors.

Many thanks in advance

Could you indicate the steps you took to operate the “aqara” door sensor? I’m a rookie yet. Thank you

I just bought Xiaomi Mijia Aqara Smart IP Camera
It is camera with getaway functionality. Could you update the binding to support new aqara member?

Hi @Tribon
The binding uses the developer mode of the gateway. Does the new camera support developer mode?
Please check by doing the same as for the gateway described in the readme.
If the camera has no developer mode, then its a case for the miio binding - have a look here

I’m waiting for delivery of camera. Will give some more info when received.
To be honest this camera was advertised as getaway = I hope I will be able to use it instead of getaway. As I don’t need Chinese radio or led lamp I thought to order some door/window sensors and connect them to over zigbee to new camera.

I have received this camera. It is possible to perform the first steps to enable developer mode, but the camera device doesn’t support the feature to change network mode.

Besides this it seems to work as a gateway. My ordered gateway v2 still hasn’t arrived. I also hope that the extra gateway could be awoided.

AndersBN, I had the same idea. I was looking to add 2 cameras that will act as getaways. I was able to turn ON developer mode. Could see “local area network communication protocol” and “gateway information” but after choosing first option it states that “current device don’t support this feature”. When picking “gateway information” I can see detailed information about network, camera. I found there token that will try to use with Mi IO Binding.

I have both a MiHome Gateway v2 and two IP Cams (which I initially thought also would be managed by the Gateway. I didn’t find a way to connect the Cameras with the Gateway - they do connect with the MiHome App - but they don’t seem to be connected to the Gateway.
I’m curious for Controlling the IP Cams with openHAB - as they don’t seem to have an API or ONVIF-Support.

@AndersBN: you said, you could set the camera to developer mode? how did you do that? and what can you do with that?

My two cameras are:

  • XIAOMI CHUANGMI 720P Smart Camera IR
  • Xiaomi mijia Smart 720P WiFi IP Camera Pan-tilt Version

Hi Thomas

I think I read that this camera still is in beta, therefore the software still might have to be updated fully.

In the MI Home app, I selected the camera, then settings. Under About I clicked on the Version number 5-6 times and then I get the info as discribed for the normal gateway, 2 new menu items: 1) local area network comm protocol 2) gateway information.

It is not possible to select Local area network, a popup states: Current device does not support this feature

Under Gateway information I can see the Token and multiple other info. I did try to enter the Token into OpenHAB, but it was not accepted as a valid developer key.

As I ordered an extra, I’ll be happy to sponsor 1 device if this would make it easier/faster to have a go at? Unfortunately my skillset in coding+chinese doesn’t provide the necessary tools to solve this.

1 Like

Thanks! But unfortunately both my cameras lack that entry (no “Setting” and no “About”) - they don’t have the word “Aqara” in it. Perhaps that’s the point. Can you point me to your camera? I only find These:

Yes, this one:
https://www.gearbest.com/ip-cameras/pp_978606.html

For some reason it is not listed as Xiaomi, but only Aqara smart IP camera. FYI, I found this comparison on youtube quite good:
https://www.youtube.com/watch?v=zwBZh1LCpmI

2 Likes

Hi,
I just bought an Aqara Smart IP Camera.
Is there any progress on the integration with OpenHab? I would love to see the video stream on OH :slight_smile:

@wars how is the response time of the Home Aqara Human Body Sensor ? the phillips hue motion sensor only get feedback every 1s which is to slow for bathroom light.

Is it possible to install the binding git? Because it does not show up in paper UI?

I think there are some hack you can use, I found this one and almost got it to work:

though this you can stream from the camera without using the cloud. I think you can find hacks for most of the xiaomi cameras.

It’s nearly realtime I guess. Depending on the network latencies…

I use it for my light in basement & storage room and for me the sensor reacts almost realtime.
When the lights turnoff after my predefined time, they doesn’t go on immediately when I’m still in the same room. But I didn’t took the time to find out why.