Introduction
In this tutorial, we will cover IFTTT. What is it? How can we use it? Writing a simple service with IFTTT and how it can be implemented with IoT. The steps will include setting up your IFTTT account and the steps to follow to make the service complete. This service can be integrated with Windows embedded and using Visual Studio can be programmed and used.
What is IFTTT?
IFTTT is a web service that allows other services to be programmed by means of simple conditional statements called recipes.
Let’s look at what IFTTT comprises of as per their website information:
-
Channels
Channels are the basic building blocks of IFTTT. Each Channel has its own Triggers and Actions.
- Triggers
The ‘this’ part of a Recipe is a Trigger. Some examples Triggers are “I’m tagged in a photo on Facebook” or “I check in on Foursquare".
- Actions
The ‘that’ part of a Recipe is an Action. Some examples of Actions are “send me a text message” or “create a status message on Facebook”.
- Ingredients
Pieces of data from a Trigger are called Ingredients. For example, the Ingredients of an Email Trigger could be: subject, body, attachment, received date, and the sender’s address.
- Recipes
Personal Recipes are a combination of a Trigger and an Action from your active channels.
- On / Off
Personal Recipes can be turned on and off. When turned back on, they pick up as if you had just created them.
- Polling Period
Most Personal Recipes check for new Trigger data every 15 minutes, some are even faster. Let’s look at the process of creating an IFTTT service.
Here is the flow of the entire logic
Now what we will do is create a simple web service with IFTTT to see what we can do with it.
We will go through creating a trigger.
We follow the same methodology with Conditional Statements
where IF is our ESPN Channel and that is our Dropbox service.
Step 1: Joining the IFTTT service.
Step 2: You need to create an account:
Step 3: You need to follow steps to create your own recipe first then click on the Use button to get started.
Step 4: Now it will take you to the page where you have the option of Creating recipes from My recipes personal section and then create a recipe link button in the personal section:
Now here is the turn to use conditional statements you need to click on THIS option.
Step 5: Now you need to choose a trigger channel we choose ESPN and click on it.
Step 6: Now you need to activate the channel and click on
Activate.
Step 7: You will get another activate button you need to click it.
Step 8: After this step, you need to click on
Done.
Step 9: You need to activate the
ESPN Channel.
Step 10: You need to click on
Continue to the next step.
The next step is to choose a trigger.
Step 11: We chose
Breaking top news.
Step 12: Now you will have options for completing trigger fields, click
Create Trigger.
Step 13: Now is the last logic for the conditional statement to complete the recipe creation. We need to click on
THAT to continue.
Step 14: Now you will have to choose an action channel. Choose
Dropbox and click on it.
Step 15: You need to activate the Dropbox channel.
Step 16: As you will be accessing Dropbox the service will ask to access the folders. You need to click on
Allow.
Step 17: Now on the next scene you will get
Dropbox activated and you need to click on
Done.
Step 18: You need to click on
Activate for the Dropbox action channel to get activated.
Step 19: For activation to go to the next step you need to click on activate the Dropbox channel.
Step 20: You need to perform an action, for that now we choose to
Create a text file.
Step 21: Now we need to complete action fields.
Step 22: As all the steps conclude you need to Create and Activate the recipe
Click on
Create Recipe.
Step 23: After that, you will see the recipe is created.
Here we have created IFTTT service involving two channels: One for the THIS condition that is the ESPN channel THAT being the Dropbox channel.
How can we use it in Arduino based board?
Let’s get to know what we will implement A Game score that will result in generating the trigger and saving it in a text format in the Dropbox folder.
The Workaround is given in BigButtonFun.com.
We will have to setup Arduino/Intel Galileo to go to the webpage that we will create. The Webpage will work as ESPN scores are updated and as the trigger updates (button) with the score changes or when it writes in Dropbox.
The things you will need to get the IFTTT service working with Arduino/Intel Galileo:
Turn recipe off-> It will turn off the recipe we are using.
Check recipe now-> It checks the working of the recipe. When you click the button it will show a green light that suggests the recipe is working.
View recipe logs-> It will show the logs of the recipe when it was triggered.
Edit recipe, delete, view its logs-> This will show the total working of the recipe and all possible modifications we can do.
References
-
https://ifttt.com/
- http://www.instructables.com/id/E-mail-Button-Connecting-Arduino-to-IFTTT-to-send-/?ALLSTEPS
- http://bigbuttonfun.com/content/email-button-connecting-arudino-ifttt-and-beyond