[OBSOLETE] Xioami Zigbee Door/Window Sensor, Motion Sensor, & Smart Button Device Type

Very interested thread!! Rave you are a master!
Have you been able to check if the plug works as a repeater?
thanks

@Rave Thanks for all your great work!

Iā€™m new to ST and tried to read as much from this thread as I can because Iā€™m looking to add these xiaomi devices to my ST. In order to add these devices to my ST bridge, is there anything else I need other than the Zigbee ID and Device Network ID?

Iā€™m trying to learn but other than using a xiaomi hub, is there any other way to get the Zigbee ID?

Thatā€™s all youā€™ll need. You can always try to pair it with ST first, maybe youā€™ll have a better luck than me.

Iā€™m researching If thereā€™s any way to get that device Id so i can probably add some cheap non standard HA Zigbee devices as well. Iā€™m pretty sure ST has that information, just that it is not showing up on the event logs. Iā€™m getting a Zigbee sniffer and see if it is showing up there

Thanks :grin: is there anyway to test it other than putting a Zigbee device out of range and placing the plug in the middle? My apartment is pretty small so Iā€™m sure it wonā€™t get out of range without stepping out of the doorā€¦

@Rave. Just to add to pullling apart the wireless switch. The switch has 2 contacts DI+ and GND on the PCB. if you short circuit (ie close) these, it act as a switch press as well.

The window and door sensor also has these 2 contacts. However, the device is in normally closed mode. This means if you have the 2 contacts closed, it will act as the door/window is closed. Once you open the 2 contacts, it will detect as a open event.

Iā€™m going to try a smart alarm by using the switch. smoke alarms should send some signal to the piezo alarm, one site said this is a pulse 200ms long of 9V. you can then step down the 9V down to 5V (with a resisitor voltage divider and a cap to filter the voltage) and activate a mini reed relay that will activate the xiaomi switch. Thatā€™s my plan anyway.

maybe you can enclose the device in some metal sheeting. Normally that will shorten the range considerably.

@rexii454 great info! Can you share your results when you finish?

I have a new plan to utilize the door sensor. Since these only have 2 states (open/close), so it works better for things like detecting light, sound, water and etc. The idea is to use a sensor to send signal to arduino clone, then use PWM pin to drive a transistor so the current will flow between the 2 contacts in the door sensor which eventually trigger a Door close event (i think). Maybe i can skip the arduino, like what you did

@Rave this article gave me the idea. https://harizanov.com/2014/07/diy-internet-of-things-fire-alarm/

I was originally going to use the door sensor too. the problem with the door sensor is that it is normally closed (NC). I donā€™t think I can find a NC relay small enough to fit it all inside a smoke alarm. Otherwise I think a powered circuit will be needed to keep it all in the NC state.

With the wireless switch, since its normally open, all we need to do is to send a signal to close the contact, so there is no power draw. The wireless switch is only a tiny bit bigger than the door sensor and also a few dollars cheaper too. Iā€™ve also tested the contact points, basically if you close the contacts for > 1sec, it counts as a long press, even if you hold the contact closed for extended amount of time - eg when the smoke alarm goes off this will be sending a continuous 5V (using the voltage divider) to the relay to close the contact.

Once I get my mini relay and smoke alarm, iā€™ll test it out.

Also need to get a smartthings hub too! waiting for Amazon to drop their price again. Question too, once you connect the xiaomi device to ST, does it show if the device drops out? The issue with the xiaomi setup is that if the device goes out of range/out of battery, there is no indication at all. There is no heartbeat system implemented by the look of things. For the moment, I have to regularly manually activate my sensors to test them.

I donā€™t know :thinking::thinking:
Will have a look on the web

I think you can use a transistor as a relay. It can have a NC configuration. But what youā€™re doing is great.

I believe ST doesnā€™t show any indication if a device ran out of battery or drops out. But i did see that the switch does report battery life every 20 mins. But Thereā€™s a bug in the device handler, I have tried updating the handler but the battery value doesnā€™t seems to be saved to the device battery state. Creating new attribute to store the battery value doesnā€™t work too. Need an expert to look at it.

Btw, the switch is just a one way device. I canā€™t seems to find a way to ask the switch for information like battery and state.

Using the same method (Xiaomi Gateway), i managed to add Xiaomi Wall Switch (not that cheap). Zigbee communication works so its just a matter of writing a device handler. I will not mess with the device handler because that wall switch will probably stay with Xiaomi gateway for now

https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20161212061936&SearchText=Aqara+Zigbee+Wall+Switch

@sballoz From what i read here, Xiaomi Zigbee Plug is a repeater.

(Use a translator)
http://bbs.xiaomi.cn/t-13039683-1-o0

That would be great news!
Think iā€™ll order one and test this.
Would this hub-technique also work with the iPhone app ?

Cheers Rave, keep up the good work!

Unfortunately not. Only xiaomi home Android app has the option to enable developer mode in order to get the device id.

Anyone know if there is a US version of the plug?

Hello

Are you going to buy this?
http://www.ebay.co.uk/itm/321133775602
and then connect it to the switch in some way?
I would be very interested in doing the same with some help ā€¦
Thanks a lot
F

No and i donā€™t think there will be one. Xiaomi only caters China market. But i think theyā€™re rated 100 to 220v. So technically, youā€™ll still be able to use it in US with a matching travelers plug

I have 10 motion sensors on orderā€¦ canā€™t wait to have them running. @Rave quick question, do these devices periodically check in with the hub or send some sort of update (even if there is no motion for hours). The reason I am asking is to see if there is some way I can know the battery is dead.

@Rave [quote=ā€œRave, post:195, topic:31948ā€]
From what i read here, Xiaomi Zigbee Plug is a repeater.
[/quote]

Awesome find. I didnā€™t know this. Iā€™ll test it out tonight. I bought a secondary gateway, but it looks like I donā€™t need one after all!

@sballoz Iā€™m going to buy a similar looking smoke detector and connect it to the wireless switch

I would like to try as well.
If I buy a few of them, would you mind helping me remotely?
Are you going to buy the same model of the link?
Unfortunately I am not good at electricity connectionsā€¦
thanks
ciao
f

Let us know what you find. If this is a repeater it would be great!
Getting the ID via another way would also greatly help.