[OBSOLETE] Xiaomi Sensors and Button (beta)

my button is still going strong, but my door sensor and motion sensor isn’t… motion sensor is on it’s 4th drop-off now.

It’s starting to look like these cheap (beautiful) little devices are cheap for a reason :frowning:

I disagree, I think for the price they are Excellent little devices, it’s just that they’re designed to be used within their own system, we’re just stretching their functionality.

1 Like

haha… I’ll take that point… but as far as SmartThings is concerned, they aren’t really that reliable IMO. I wonder if there’s any more reliable way to integrate them through the Xiaomi Gateway?

paired correctly… I think is the issue.

Here’s what I’m doing

  • Add Devices
  • Hold in reset button until three flashes, pause, flash, pause, three flashes
  • wait a couple seconds
  • press and release reset button… check IDE log
  • repeat until new Xiaomi device appears.

Is there something I’m missing?

Mine have actually been surprisingly reliable. The biggest problem was, of course, getting them added in the first place.

I have motion sensors in high-traffic and low-traffic areas. They are all working perfectly.

My experience with these Xiaomi devices has been the exact opposite of my experience with Lowe’s Iris devices. I have had around 50% of my Iris devices to be defective at the time of purchase, or fail within a short period of use (sometimes within hours).

I have had no such issues with reliability or connectivity with the Xiaomi devices so far.

Knocking on wood with crossed fingers.

1 Like

There are a lot of comments in various threads about how difficult it is to pair the devices to the hub…this has not been my experience now I use the below method
(It WAS more difficult when I was using the ‘pressing the reset button multiple times for extended periods before and after discovery’ method)

I have found adding the Xiaomi devices very easy and reliable using the catchall method. Although this method has been described several times, elsewhere, let me summarise:

From within the app: Things > Add a Thing (This starts the Hub searching for new devices)

With your Xiaomi device close to the hub:

  • Hold the reset button for a few seconds and release, then click the reset button briefly (these two steps may be slightly different for each device, but this sequence has worked for me on the buttons, cube, motion sensors, contact sensor - I have not found it necessary to press the reset more than twice as described)
  • Open the IDE
  • Go to ‘My Hubs’ and select your hub.
  • Scroll down the page until you see the link to ‘List Events’
  • Click on ‘List Events’
  • Under the name column, look for a ‘catchall’ around the time you pressed the reset button
  • Hover over the catchall entry and you will see the long string of digits
  • Take a note of the 4digit (combination of letters and/or numbers) appearing after the long string of 0’s and 1’s

Next:

  • Select ‘Devices’ in the IDE
  • Click on ‘New Device’

Fill in the fields:

  • Give the device a name
  • Add the 4 digit ID you found above ad the ‘Network ID’ (the ‘Zigbee ID’ can be anything - I use the same as for the Network ID)
  • Under ‘Type’ - choose your device handler
  • Fill in all the other fields
  • Click ‘Create’

Done!

37 Likes

Can I make a suggestion and this comes down to pairing devices in general.
Everybody always says put the device close to the hub and then pair it.
Personally I never do this.
I always go to where the final installation of the device will be and pair it from there.
My reasoning is that if its z-wave or zigbee it may pair using another device as a repeater.
Also if I cannot get it to pair in its final position, I may get issues with normal operation.
If it is in its final installation place then its repeater, if it uses one will be the one it is going to use for normal day to day operation.

I’ve never had any major issues with devices that have to be continually re-paired or that keep going to sleep. (EDIT: Apart from ST motion sensors and I have given up on them).

I am in no way an expert in z-wave and zigbee protocols or networking, indeed I only came across these terms when I bought my hub 18 months ago.

Just my 2 pence worth.
Perhaps there are others out there who will definately know more than me who may wish to comment on my thoughts. (I’m probably way off the mark). :slight_smile:

2 Likes

I have to disagree with comments that these devices are unreliable once paired correctly. I have in excess of a hundred zigbee devices of various brands and these are clearly very robust and much more reliable than smartthings sensors.
As with all sensors, having a strong mesh is vital for reliability.

3 Likes

@a4refillpad I totally agree with your comments.
I have only had one issue with these devices.
A door sensor did not change to close once. That’s it. No sleeping, disconnecting or having to repair issues.

Hi, @a4refillpad i would liket o ask you about the motion sensor i noticed some strange behaviour,after i paired it i set the time to report motion to 3 seconds and everything works like a charm except battery level the weird think is when the battery reading came up and from that point on the motion reports motion only after 60 seconds and i noticed that in both my sensors,any idea to fix this?
Also i want to say thank you to all the community and to you especially for hard work so some of as we can use your hard work for making thinks happening.

As @spdestounis - I have also found that the motion sensors are blind to motion for 60 seconds after activation.

1 Like

The default of Mi motion from active to inactive is 60 seconds.
You may change the value in the device setting.

I think the point being made here is that changing this in the settings does not have an effect. I have mine changed to 10 seconds. Whilst the app shows Motion as inactive 10 seconds after active, the sensor remains unreactive to further motion for 60 seconds.

Also we have to state here that this is only happening when the readings from battery came up.

Can anyone help me understand the relationship between DTH and connection reliability? I always thought the connection reliability is related to the quality of the physical device. (build, components etc.)

I ask this because, Xiaomi buttons and sensors work great as long as I use the DTH from @a4refillpad. When i change the dth or tinker with his code in anyway, the sensors and buttons start acting erratically.

I am in no way a coder/developer but have done a fair bit of coding for personal projects. Any pointers would be great.

Is there a reason why you need to play with the DTH?
If it works why play.
Just wondering.

There’s a little misunderstanding what the setting is. The setting is the number of seconds before the motion sensor flags motions from active back to inactive. It is not a blind time setting.

1 Like

No particular reason. Just itchy fingers. :sunglasses:

I started getting my hands dirty with smartapps and would love to know more about how device handlers work.

I read through the official documentation in IDE but did not find/understand the relation between DTH and connection quality.

2 Likes

You may want to look into this Wiki site:

https://en.wikipedia.org/wiki/SmartThings

I’ve working Xiaomi button since about 2-3 weeks now. I wrote two core pistons, one for pushed, another held, but when held both the pushed & held pistons get executed, the DTH events shows status as “held”. Anyone successfully did two functions of a single button ?