If This Then That (IFTTT)

IFTTT Trigger library to interface with the maker.ifttt.com service. This library allows you to send GET or POST requests to the maker.ifttt.com service to trigger actions.

Hello World

Import programIFTTT_ESP8266_Example

Interface with the If This Then That (IFTTT). This example uses both POST and GET to interface with IFTTT. Up to 3 values can be sent along with the trigger event name.

Library

Import libraryIFTTT

If This Then That interface library. Designed to hook up to various services provided by IFTTT.

Datasheet

https://ifttt.com/maker

Notes

What is IFTTT?

If This Then That (IFTTT) is an online service that allows you to create simple programs called recipies that trigger an action based on a trigger. More info can be found here : http:ifttt.com/wtf .

What is IFTTT Maker Channel?

Quoted from here, the IFTTT Maker channel is

Quote:

The Maker Channel allows you to connect IFTTT to your personal DIY projects. With Maker, you can connect a Recipe to any device or service that can make or receive a web request.

The maker channel lets you trigger actions from your micro-controller, and pass up to 3 additional values to each trigger.

What can I do with it?

You can trigger actions on your ifttt account using this library. This means any action possible with IFTTT can be triggered using mbed. For example, you could send yourself a text every time a switch is pressed, or you could upload temperature measurements to a google doc spreadsheet, use your imagination and check outall the actions possible with IFTTT here.

Getting Started

1) Sign up for a ifttt.com account
2) Register the maker channel to your account.
3) Create a recipe using the maker channel
/media/uploads/mbedAustin/ifttthelloworldrecipe.png
4) Import the mbed example code
5) Replace the Secret Key and Event key with the keys from the event on your ifttt account.
6) Compile, load, and Run.

Some Other Examples

Here are some examples of running IFTTT on other interfaces such as Ethernet.

Import programIFTTT_Ethernet_Example

Interface with the If This Then That (IFTTT). This example uses both POST and GET to interface with IFTTT. Up to 3 values can be sent along with the trigger event name.

TODO

Things still left to be improved on this library

  • GET requests do not currently handle non-alpha numeric characters, need to add support for this
  • all data is sent via unencrypted channels, need to add security (https / ssl)
  • We accept patches, so if you see something else fix it and submit a pull request!!!

IP_Address_Change

The ESP8266 library does not use DNS, therefore the IP Address of the maker.ifttt.com server is hard coded into this library. Every 3 months or so the IP Address changes. If you get a message like ""503 Service Unavailable" then you need to update the IP. This can be done by changing the IP define in ifttt.h, you can find the IP you need by running `ping maker.ifttt.com` and using the IP address returned from the ping.