myProjects

Cloud Services IFTTT (IFThisThenThat example recipes)

Table of contents
What is IFTTT
 Channels: sources and destinations
Example : CPU Load on XLS (Google Drive)
Live Example  : Your position on XLS (Google Drive)


Download source  (for this Live Example  : Your position on XLS (Google Drive) )

Cloud services IFTTT

IF BMW.car(Arriving soon) then ISmartAlarm.HomeAlarm(Disarm)
 IFTTT users are now “cooking” about 20 million “recipes” each day

 Site : https://ifttt.com

IFTTT is a () trigger () action cloud service that interconnects :
– “physical devices  “physical devices” (iSmartAlarm with Socket)
– “physical devices  “cloud services” (iSmartAlarm with Gmail)
– “cloud servicescloud services” (DropBox with Gmail)
Since IFTTT interconnects “physical devices” (and internet services) IFTTT can be considered part of the IoT (Internet of things) world.

The acronym IFTTT stands for “If This Then That” and in pseudo (obj)code  :

 If (This) then {That}
 If (  Whirlpool.Washer(cycle is over) ) then { GoogleDrive.xls.addRow(timestamp.now); }

The previous trigger-action rule is named Applet (or Recipe) and allows to create chains between Source and Destination.

You can use a simple graphical  applet-creation-wizard which drives you in some steps (it is also available app for iOS and Android).

 Applet-creation-wizard example 

Channels: sources and destinations

ifttt_this A Source triggers events (This):

  • Wheather [ Current temperature drops below ]
  • BMW [ Enter an area ]
  • Office 365 [ New email From ]
  • Whirpool Washing Machine [ Washing cycle is over ]
  • DropBoxp [ New photo in your folder ]
  • iSmartAlarm [ Contact Sensor ]

A Destination receives actions (That) :

  • BMW [ Send my car a notification ]
  • GE Refrigerator [ Change temperature ]
  • iSmartAlarm [ Disarm Alam]
  • Office 365 [ Send Email ]
  • OneDrive [ Add file from URL ]
  • Phone [ Call my phone ]
  • WeMo Slow Cooker [ Adjust cooking mode ]

The list of Sources [ Triggers ] and Destination [Actions]  (IFTTT-friendly) is pre-defined in the IFTTT catalog.
In order to use a Source or a Destination  with IFTTT the supplier (or service provider) provides a portal which allows you to identify yourself (e.g. your Gmail account) or your appliance (e.g. your iSmartAlarm appliance).

Channels Connection: click to expand for some images

When you create an Applet the IFTTT applet-creation-wizard opens the supplier (or service provider) portal and allow you to SIGN IN.

Useful channels

  • Maker : receive a web request (and trigger an event)
    https://maker.ifttt.com/trigger/<event_name>/with/key/<your-key>
  • Date & Time : every X time triggers an event
  • SMS : send SMS notifications on your phone
  • Gmail : events on your Gmail account
  • Google Drive : create / modify documents (i.e. add row to spreadsheet)

Example: CPU Load on XLS (Google Drive)

Channels used: Source Maker” destination “Google Drive”
1-line shell (OSX) to post the CPU load on google drive.
Use Maker event :
 https://maker.ifttt.com/trigger/load/with/key/dZCTwZ_KR6b6m9-HHOtHCd

while :; do curl https://maker.ifttt.com/trigger/load/with/key/dZCTwZ_KR6b6m9-HHOtHCd?value1=uptime | cut -d " " -f 12`; sleep 10; done
IFTTT CPU LOAD
IFTTT CPU LOAD

Live Example: your position on XLS (Google Drive)

Channels used: Source Maker” destination “Google Drive”
Using service http://ipinfo.io the JS gets your geolocalisation from IP and Triggers the Maker event:
https://maker.ifttt.com/trigger/sayhello/with/key/d5KhAxE-_UZGklMQMVSQ2E?value1=Rome&value2=Lazio&value3=IT
The Applet reacts to this event with adding a Row in XLS on Google Drive.

 Download source

1 Press Button “Say Hello from…

2 See XLS on Google here
City : 
Loading…
Region :
Loading…
Country :
Loading…
Url we are going to submit:
Loading…
Url Template:
Loading…

Steps to build Applet

Steps to connect to Maker channel

Steps creation Applet (applet-creation-wizard)

Powered by WP Review

Posts