[OBSOLETE] Xiaomi Zigbee Outlet (Steps to Pair any Xiaomi Zigbee device!)

could someone please provide a link where I can buy these plugs? For some reason I cant find the zigbee plug on gearbest website.


I need help!
Just bough a new SmartThings hub, but i can’t get my xiaomi devices paired (outlet and smart button)…
Installed the device handlers, try to pair, but it just don’t work, i clicked the little button 100 times, nothing happens.

Also tried to create a device, but i can’t get that working…
Added both id’s on the back of the xiaomi device…
Also tried to get the network id from my xiaomi hub, but i only can find the MAC and IP adress in there…

Can some one help?
A little push in the right direction will make me very happy :slight_smile:



You can find it using the AliExpress app on your phone.
Look for the international version, the standard is only chinese…

I have started an all inclusive thread for the Xiaomi Zigbee sensors. Please refer to this thread.

I hope to have all these other Xiaomi threads closed.

I just got a Xiaomi motion sensor.

I can pair it. but it lost connection hours later.

I will try this:

On the sensors, after pairing I continued to click on the reset lots of times. It seems to have done the trick and make the sensor stay connected to ST overnight for the first time.

Look here:

Thank you!

How can i know if the sensor is pair to hub directly?
Once paired to hub directly, will it automatically change to pair through other router later?

Therefore when pairing you need to make sure all other zigbee routing devices are off and that the device is pairing directly to the hub.

I’ve got 7 of the water sensors but one of them is not working properly and giving me a strange reading (Current states: - battery: 58, - checkinterval: 7620??). It’s not giving me the Dry/Wet status. Perhaps it’s just defective or is there something else I can do?

You’re using the most up-to-date device handler from the bspranger GitHub repository, right?

From your screenshot, it looks like the sensor was paired correctly (The ST hub received its Zigbee Id, which is great.)

If so, perhaps this particular leak sensor has a bad battery. Best to check the actual voltage reported. In your SmartThings mobile app, view the device, and switch to the “Recently” tab, which lists all events from the sensor. Scroll down until you find a “Raw Battery is…” message. What’s the voltage reported?

Thanks for the reply!

Not sure if I have the latest DH or not. It’s been a while since I added any new DHs so I’ll have to refresh my memory on how to do that. But all of my other sensors are working fine. The only feedback on my app was from last night and it shows 58% battery (not “raw battery”).

In the IDE, three hours ago I see a couple of refresh and configure commands sent to the device but no response. I’ll try to put in a new battery and try again, but I’m guessing it’s just a bad device.

I just realized you’re not using the latest DH from bspranger. In addition to battery and checkInterval listed in the Current States list for the device, there should also be lastCheckin, lastWet, lastWetDate, and BatteryRuntime.

I am using the latest DH from bspranger with my Leak Sensor and it works great. The voltage range used to calculate the battery percentage has been adjusted to make the reported percentage more realistic with expectations.

You should copy the code text from here, go to the My Device Handlers tab in the IDE, click on the name of the DH (“bspranger : Xiaomi Aqara Door/Window Sensor”), select all the code that’s in there and delete it (so the code window is blank), and paste in the new code text. Then click the Save button, and finally click Publish, and select For Me in the drop-down menu. Then all of your Leak sensors will be using the new DH.

Then both in the Device Events log in IDE and also in the ST mobile app you’ll see the raw voltage reported in addition to percentage, like this:

NOTE: for all of the Xiaomi DHs to work properly, your hub needs the timezone set for your location. Please make sure that it’s been set for you local timezone.

Also note: any refresh commands to Xiaomi devices or using the refresh button for the device in the ST mobile app will not update the display to the latest status. All it does is resend the configuration for the device health reporting time interval, which gets set up when the device is first paired anyhow. Xiaomi devices do not strictly follow ZigBee Home Automation 1.2 standards, and so the normal ZigBee reporting, configuration, and refresh commands do not work at all.


Thanks Keith, for the detailed instructions! Well, I installed the new DH, and all of my other sensors are reporting in just fine, but that one still does not give any dry/wet status. I haven’t had a chance to get a new battery yet, but I’m really leaning towards it being defective. Since I got it cheap from China, I don’t think it would be worth it to try and get it replaced. Any other suggestions?

BTW, here’s the latest status on that device:

That status is OFFLINE, which may explain why it’s not reporting anything. It looks like it’s not even using the new DH yet.

Try re-pairing it?

Oops, sorry, that was right after I set it up with the new DH. And I did notice, so I uninstalled it and re-paired it, but now I only get the checkinterval again

Yeah, something is definitely not right. I’d guess low battery or possibly weak ZigBee mesh network connection?

By the way, how do you have all of those extra detailed Device Event log entries for your devices? I never see any entries with information in the Type column, and I don’t have the Event Type Filter options like you do. Is that a setting somewhere?

I don’t know how I can have a weak Zigbee network as I’m pairing up the device about 5 feet from the hub and all other devices are reporting in just fine. This event log is just from the IDE for that device (see the blue “List Events” in my previous post).

I’ll try and get a new battery tomorrow and give another try, otherwise I’m gonna just call this one a loss.

Thanks again for your effort!

The DH is working now (notice it now shows battery at 93%!), but still no Dry/Wet status


I’ve got a problem pairing a Xiaomi Outlet (https://www.gearbest.com/living-appliances/pp_344666.html).
There is no real reset buton on the device, only the on/off button.
Pressed that button 100 times in different ways, but i never get to see the catchall.
The thing i see in de IDE is this:
Only some strange ssdpTerm info.
Can i connect the outlet with the info given after “devicetype:04”?
Tried to use the device address and 3d05 as the Device Network ID, but that doesn’t work.

Paired a couple of Xiamoi devices now to Smartthings, but this thing is a real pain in the ass!

Thanks :slight_smile:

Please could you tell me where is the hub log? Where should I go in the IDE?

Hi Guys,
In Australia, Have a ST v2, z-wave disabled, and have it working with 2 of the original xiaomi temp/humidity sensors
Under Groovy IDE, these are shown as ONLINE/CLOUD and I get readings on the phone on the ST app

Now, I bought a couple of the xiaomi outlets. I can add them in, change the Dh to the latest by spranger.
They show up on Groovy IDE as ACTIVE/CLOUD, but when I touch their button on the ST App, i get a message “Cant connect to Device. Check device & try again”
On groovy IDE, I can check the log, and it shows status, and will show each time I manually press the on/off button on the device.

So, my ST hardawre is communicating to the device (or at least getting updates from it) but the app on phone SGS 8+ isnt.

My ST account is set up in Stockton USA, and I have set same location on the App.

Any ideas appreciated