When I arrive in my house I switch on the light with my Pebble Watch!

The procedure to make this is very simple. You follow the steps and you can in 30 minute make a awesome Watch Switch.

You must have:

Step 1: Create an IFTTT Account

IFLocation is a simple and very useful app that send a request to the web. We use the request for trigger an action on IFTTT. Do you know IFTTT? No? OK read the follow steps.

Go to ifttt.com and sign in. The service is totally free, and very useful. You can create a your personal recipe, and share it on IFTTT community or take a recipe of community.
After you have created an IFTTT account you must add the MakeChannel, and take note of your personal APIkey.

Step 2: Install IFLocation Pebble App

Now you can install IFLocation on your Pebble.
Go to Pebble app, after go to + sign "Install app", and search IFLocation by CMWen. The official git of CMWen is cmwen.github.io. After this open IFLocation app on your smartphone, and click on setting button. Sign your maker key, compile the label and add "particle" event, by clicking Add. After this you must also add two Values"on", and "off" in the value field.

Step 3: Upload the Code on Particle Photon

Connect your Particle Photon to internet. Download the Particle app on your device and try the TINKER app. Thinker app is the default app. By this firmware you can control the Particle by the smartphone using the official Particle app. If all it's OK, and you can control your Particle, follow the next step, otherwise read the official instruction: https://docs.particle.io/guide/getting-started/in...

Now you can download the particle.txt file.

Go to build.particle.io. Copy the code to interface. Upload the code on the Photon.

Step 4: Create an IFTTT Recipe

You must connect Particle Photon to the internet before this step.

Go to ifttt.com, follow the instructions and Sign In. Now create a new Recipe. Search Make like IF. See the figure.

After this compile the label with "particle" without ".

Now search Particle, and add the channel. In the "Then call function" select the name of your Particle that is online in this moment, and select "particle" function. In the second label with input, select Value1.

On the Pebble watch create a new trigger. Go to IFLocation app. Select New Trigger. Select "particle" like event, and like value select "on". After create a new trigger and select "particle" like event and "off" like value.

The first one trigger put HIGH the pin No. 7 on your Particle Photon, the second one put LOW the pin No. 7 on your Particle Photon.

OK that's ALL clear?!

Step 5: Connect the Hardware

I use a breadboard with a little power supply and a 5v regulator shield. You can connect the Particle and the relay shield to a LM 317 or lm 315 regulator current circuit. Connect the relay to the power. Use the power 5 V to pin VIN of Photon, and connect the pin 7 of the Photon to the control pin of relay.

Step 6: Try to Switch on the Light

Now go to IFLocation on Pebble Watch. Select the app and select one of Triggers that you have created before. If you select particle on the light go on, otherwise the light go off.

Now I connect this switch to my 3D printer, and after the print, I switch OFF the printer by my Pebble.

About This Instructable




More by masteruan:Meteo Node IoT Smart Meteo Station O-Zone: DIY Bluetooth Battery Lamp Omega Onion2 OLED Screen Show IP and LAN Name 
Add instructable to: