Sunday, 18 June 2017

Adding Xiaomi sensors into SMARTTHINGS


You will need all kinds of sensors and switches to fully automate your house to exactly how you want it to be.

Sensors aint cheap.

Then, there is this Xiaomi who saved the world of home automation with very reasonably priced sensors. These sensors don't work out-of-the-box with your Smartthings, but it is not difficult to get it working. Once you get the hang of it, it's a piece of cake.


Motion Sensor - RMB59

Window/Door Sensor - RMB49
Wireless Switch - RMB39

Zigbee Power Plug - RMB69

You can order them through your favorite channels of buying from the China market.
According to Xiaomi, the batteries in these devices(apart from Power Plug) can last for 2 years.

In order to pair them with Smartthings, first, you will need to be as close to the Smartthings hub as possible with the sensor, your notebook and your phone.

1) On your notebook, login into your SMARTTHINGS IDE on a web browser -> https://graph-eu01-euwest1.api.smartthings.com/       login.

2) On the IDE web browser, select "My device Handlers" from the top and then click on "Create New device Handlers". Give it a name and click create, then paste the entire thing you have copied from the following. Take note that you will need to create one device handlers for each of the type of devices.

You can get all your device handlers from here  

3) After you have added all the Device Handlers you are trying to add, click "My Location" from the top and then, Events .


4) On your Smartthings App on the mobile phone, go to "My Home" , under the "Things" tab, scroll all the way down and select " + Add a Thing".

5) Each of these sensors comes with a small hole, which you will need to poke it for 5 secs either with a tooth pick or the pin that comes with it to reset it and put it in a pairing mode. You can see the device reacting with its LED light when you have successfully done that.

6) On your IDE, refresh it and look for an entry that says "Catchall", it should appear seconds after you reset the sensor. Once you find that entry, mouse over the entry and you should have a String of Hexadecimal numbers that don't make much sense to you. Look out for the 4 character which I have highlighted in yellow, note that down. It should be on the 19th -22th character of the string.


7) Once done, one the IDE, click "My devices" from the top and then "+ New devices", key in as follows and click Create. Your devices should appear on your Smartthings.





8 comments:

  1. after you add all these devices, can you then control them with google home?

    ReplyDelete
  2. The sensors aint really something you want to control with google home. They actually help you to automate your house. For example, you can put your motion sensor in corridor and you can then program your SMARTTHINGS or IFTTT to turn on the corridor lights when motion is detected and when it gets dark. As far as home automation is concerned, Google home is more about a voice command input to trigger things to want to get done, for example, turn on the TV, turn on the air-conditioner, turn off the lights.

    ReplyDelete
  3. I have tried this and I get internal serer error

    ReplyDelete
    Replies
    1. Probably some issues with the server, try again after a while.

      Delete
  4. after poking the reset hole for about 5 seconds i see the LED flashing a few times. When i release the Reset push, the LED flashes again one or two times. But the catchall even is not showing under locations - events, when i refresh the page.
    what am i missing?

    ReplyDelete
    Replies
    1. Yes, I believe you did the reset right, I do remember the LED will flash two more times after you release.

      Did you check if you are in the right view on the SMARTTHING IDE ? MY LOCATION -> EVENTS -> ALL

      Delete
  5. @roni did you sort this I'm getting same issue no catchall coming up? It did originally for 3 sensors they then subsequently went offline I've deleted them now trying to reconnect them and no catchall...... Help!!! Lol

    ReplyDelete
    Replies
    1. Ok, try to bring your sensor to as close to the SMARTTHINGS as possible, like one to two metre and reset it again.

      Delete