Giter Club home page Giter Club logo

ifttt-glue's Introduction

IFTTT Glue

An example API-middleware/SMS approach to chaining IFTTT recipes conditionally.

Setup

  • Get the Google App Engine SDK (for golang).
  • Clone this repo into your /path/to/go/src directory
  • Copy config.go.example to config.go
  • Enter your Twilio/IFTTT info into config.go
  • Run it! $ goapp serve

Background

The Google OnHub router just got a new IFTTT integration. Google/IFTTT challenged my brother and I to come up with a as many integrations as we could using the OnHub and a huge box of smart-home stuff.

See the video here: https://www.youtube.com/watch?v=JPH74ZHDuCI

With IFTTT you can trigger recipes from the OnHub when a) a device joins the network, or b) when a device leaves the network. We cooked up a lot of basic recipes around that premise. But we were also interested in using the OnHub as a kind of situational monitor to do more complex recipes like:

IF the Nest camera senses motion, AND nobody is on the router network, THEN sound the D-Link siren!

IFTTT doesn’t support this kind of contextual chaining out of the box. But we found you can patch independent recipes together with a little middleware magic. So, the above recipe becomes:

IF kylePhone connects to the OnHub, THEN post request to https://ifttt-glue.appspot.com/onhub/connect/kylePhone

IF kylePhone disconnects to the OnHub, THEN post request to https://ifttt-glue.appspot.com/onhub/disconnect/kylePhone

IF brendanPhone connects to the OnHub, THEN post request to https://ifttt-glue.appspot.com/onhub/connect/brendanPhone

IF brendanPhone disconnects to the OnHub, THEN post request to https://ifttt-glue.appspot.com/onhub/disconnect/brendanPhone

IF Nest detects motion, THEN post request to https://ifttt-glue.appspot.com/nest/motion-detected

IF SMS received with #alarm in body, THEN sound the D-Link siren!

This API will keep track of who's on or off the network, and conditionally send an SMS trigger when nobody is home... to sound the alarm!

I discuss the approach a little more in a blog post here: https://medium.com/sea-salt-ventures/google-onhub-ifttt-81ebc2e60c24.

ifttt-glue's People

Contributors

keighl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.