Introduction: Lights Automation With a Sens'it and a Smart Plug

Have you heard of the Sens'it. It is a small device, Sigfox Ready, that can help you in your daily life. It contains few sensors such as temperature, brightness, movement, magnetic field and a button. You can configure your Sens'it very easily using the sensit.io web app.

In this tutorial, we will see one possible use of the Sens'it. We will use the power of IFTTT service (If This, Then That) to turn on and off a light powered by a D-Link smart plug.

The concept is pretty simple. What I wanted to do is to turn on a light using a button and switch off that light when the room is bright enough.

How it works?

This tutorial will show you how to use a Sigfox device from anywhere, without 2G/3G/4G, Bluetooth, wifi to switch on / off a smart plug connected in wifi.

What is Sigfox?

Sigfox is a connectivity solution dedicated to the Internet of Things. The operated network is currently operating in +22 countries, on every continent. Focused on tiny messages (up to 12 bytes) & low energy consumption, it currently powers 7 million devices. Various Sigfox-compatible technical solutions are available, from different silicon vendors.

Subscriptions to the Sigfox service are free for developers ( development kits & evaluation boards). Otherwise, they range between 1€/month & 1€/year depending on the volume commitment.

Ready? Let's get started!

Step 1: Material

The first thing you need to do is get:

Step 2: Sens'it

When you receive your Sens'it, open the box, you will find your Sens'it along with a small explanation leaflet?

Remember that Sigfox doesn't need any pairing to start communicating. The only thing you need to do is to associate your device with your account:

  • Go to https://www.sensit.io
  • Click on "Start with my Sens'it"
  • Enter the ID provided at the back of the device
  • Follow the instruction on the screen
  • Long press on the main central button
  • The main LED will turn green to show that your Sens'it is in temperature mode
  • Wait until the LED blinks green, showing a signal is being sent

Set the light sensor mode:

  • Long press the main button again
  • The Sens'it LED should be yellow.
  • Go back on the Sens'it.io app, the "LIGHT SENSOR'" mode should appear
  • Click on the yellow element
  • Click now on "Sens'it Parameters"
  • Depending on your environment, choose the right value
    Note that the box may have an impact on the real value in Lux

Step 3: Smart Plug

In this part, we will see how to connect your D-Link Smart Plug.

If you want some additional information, follow the screenshots (sorry it's in french...), it is very simple:

  • Search on your app store "mylink Home" application
    For Android: https://play.google.com/store/apps/details?id=com....
    For iOS: https://itunes.apple.com/fr/app/mydlink-home/id888...
  • Download the app
  • Create an account
  • Add a new device
  • Configure your new device
  • You can flash the QR Code on it or you can configure it manually, I've chosen the easiest way, flashing the QR Code
  • Turn on the device
  • wait until the led on the side blink in orange
  • Then, you can choose the WPS methods or to configure it manually.
    As I don't have WPS authentification on my router, I had to do it manually...
  • The name of your device is up to you, I named it "smart plug"

It is all set, you can go to the next step to see how we will connect your Sens'it with your smart plug using IFTTT

Step 4: IFTTT - Connect the Services

IFTTT is a web service that allows you to do something if something else happens. What is interesting is that you can connect many different services. In our cases, we will use the Sens'it channel (note that the Sens'it channel is not yet available) and the D-Link one.

It is very easy and there is no coding involved (see the attached screenshots for further information).

  • Go to https://ifttt.com
  • Create an account or sign in
  • Go to my recipes in the "IF" tab
  • Click on "Create a Recipe"

Double press the Sens'it button to switch on the light:

  • Click on "this"
  • Select the "sensit" Trigger Channel
  • Connect your Sens'it account to IFTTT
  • Choose the Button double pressed" trigger
  • Click on "Create Trigger"
  • Choose "D-Link Smart Plug" Action Channel
  • Connect your D-Link account to IFTTT
  • Select "Turn on"
  • Choose your smart plug
  • Create action
  • Create recipe
  • Check your recipe

Turn off the light when the brightness is above a certain value

  • Create new recipe
  • Select the "sensit" Trigger Channel
  • Choose "The light is above some lux" trigger
  • Depending on your environment, choose a value.
    In my case, I chose 10 lux (the Sens'it box makes an important delta with the real value)
  • Click on "Create Trigger"
  • Choose "D-Link Smart Plug" Action Channel
  • Select "turn off"
  • Choose your smart plug
  • Create action
  • Create recipe
  • Check your recipe

Everything is set up!!

Step 5: Let's Try If Works

It seems to work :)

Feel free to use your imagination and tell us what you connected. Maybe switch on your coffee machine on your way home? Turn off the air conditioning when you leave?

Thank you for your attention. Do not hesitate to leave a comment if you have any question, I'll be glad to answer!

Comments

About This Instructable

619views

5favorites

License:

More by luisomoreau:Sigfox doorbell posting message on SlackNerf connected target on steroidsLights automation with a Sens'it and a smart plug
Add instructable to: