SmartThings Community

Xiaomi Zigbee Outlet (Steps to Pair any Xiaomi Zigbee device!)


(Rinke) #41

Yes, i had the same experience with the Osram plug, it messed up everything.
Problem is finding a good zigbee one, they’re rare. Only one i can think off is the ST plug.

(Wayne) #42

Setting aside my emotional state when everything went “belly up”. I decided to conduct some better tests. It seems to repeat for a length of time then just stop and to then switch off the power to the relay at the same time. Hitting refresh and powering the relay back on seems to allow it to work again.

So… creating a simple CoRE piston to detect when the switch is off and to run a refresh and power back on the relay seems to work.
I’m cautious in saying this and the test has only been for 24 hours so far and seems to work. If it does indeed work then it does mean that you will not be able to use this to power any peripherals off attached to it as it will break any heavily laden zigbee networks like mine. The smartthings motion sensors appear to be incapable of recovering when the xiaomi outlet it is attached to goes into this bad state. My theory is that the xiaomi still advertises that it can take incoming connections but just does not relay, almost like some kind of power saving mode. Maybe the Xiaomi hub has some kind of api to deal with this that the smartthings hub lacks.

Another benefit this gives is that the periodic refresh updates the temperature reading if it has changed.

[RELEASE] Xiaomi Mi Cube / Magic Controller
Xiaomi Zigbee Door/Window Sensor, Motion Sensor, & Smart Button Device Type [beta]
(Rinke) #43

Does this mean the plug turns off, as in real off? So if i leave it on powered, it should be turned off the next morning?
Isn’t it just possible to create a routine that turns the plug on when turned off?

I also noticed then when powered off, the temperature turns blue at some point and the details screen in the app goes blank (as in just a white screen).
Because of that, i commented out all the code related to the temperature. This seems to work, the plug reacts better and also the button on the plug itself seems to report the status back to the hub properly now.

I created a piston which does what you described. I can see a refresh and a temp update in the logging.
Somehow i don’t have issues with the xiaomi door sensor. Not sure if they’re being relayed through the plugs, but i have quite a few plugs active.

I know the orvibo door sensors don’t like the xiaomi plug (or the osram). But the problem there is already after 5 minutes. The first opening of the sensor is then not detected/relayed, but the second one is. It seems to wake up, but this is ofcourse VERY unreliable if you want to know if someone just opened a door.

(fabrizio) #44

Hi Rave

Do you know how is it possible that plugs work fine on Smartthings and Actiontiles but home kit (through homebridge) only get temperature and not the ability to switch the plugs on and off?


(Wayne) #45

I’ve got 32 orvibo contact sensors installed and since my change have remained stable for over 24 hours. Seems to work fine now, fingers crossed

(Rinke) #46

Is a simple refresh (with a piston) every 5 minutes not enough? or must it be turned on?


So it recognize it as an outlet but turning on and off in homekit app does nothing?

(fabrizio) #48

No it does not recognize it as an outlet but only as a temperature sensor.
It is strange as my wemo plugs are being detected correctly. I have also try to create a virtual device but the virtual device sync app does not work either, it does not find endpoints.


Try remove the temperature capability from the device handler. Could be the home bridge smart app issue

(Wayne) #50

I initially tried the refresh only but it I still saw devices dropping. You need the piston to turn it back on asap like your screenshot.

(Rinke) #51

Thanks Wayne,
i personally haven’t found any issues with them (apart from the temp-screen issue) but i haven’t done any zigbee-mesh repairs/refresh yet. The Xiaomi door sensors have quite a bit of range (more than the Orvibo’s), so they seem to talk to the hub directly from anywhere in my house.
I might dump the plugs if i get the same issues (have about 6 of them) and replace them with TKBhome plugs.

I’ll keep an eye on them…

(Wayne) #52

I have a lot of zigbee devices around the house. They are intensely monitored by a combination of modified DTH and the simple device viewer app. If I get any problems I know within an hour. I found that without doing what i’ve done, their mere existence on the network was causing a mess. I might eventually remove them if they provide no benefit, but like you I wanted to strengthen my zigbee mesh.

(fabrizio) #53

No it does not work.
It is very strange indeed.


Did you try my suggestion earlier? Removing the temp capability?


Can’t seem to get this to pair. Could. Someone help me out. In the instruction, it said to press button for a few seconds. Is this until it flashes red once and blink continuously blue?
I was able to pair the body sensor and door/window sensor.
Do I just, add new thing via St app… Then press button on outlet for a few seconds until it flash red and blink blue. Wait for the device to be found in St app. Then change device handler after added?


Retry the steps i provided. You missed the step about getting the network id from the log. It doesn’t matter how many times or what color it blink, a long as you can get the network id from the log

(fabrizio) #57

i am gonna try tomorrow.
Apparently it didn’t work but I need to be at my place to check the raspberry
will let you know


Ok, I will retry. So it won’t just show up as an unknown thing like the Xiaomi Body Sensor or the Door Sensor? How do I know it’s in pairing mode as your instruction said press for a few seconds, but I’m not sure which light I should wait for.


Just tried again, but no luck. Here are the steps I did:

  1. Open ide logs page.
  2. Click Add a Thing in ST app
  3. Plug in the Xiaomi Outlet into power and press the power button until it flash red
  4. Release button and blue led blinks slowly
  5. Check IDE logs, but nothing related to the xiaomi outlet shows up

(Rinke) #60

You probably checked the live log, you need to check the hub log.
Look for “catchall”. See the first post :slight_smile: