Skip to content

Automation with IFTTT

Matthew Ng edited this page Oct 23, 2017 · 9 revisions

What is IFTTT?

IFTTT is a platform that allows you to control your smart devices with Alexa, Google home etc. It stands for "If then then that" essentially allowing you to choose a trigger and cause an outcome. For example you can have "Google Assistant" be the trigger with a certain voice command and LIFX can be the outcome where if you say "Turn off my lights", it will turn off your LIFX lights. For more information on how IFTTT works, please visit their homepage

How does IFTTT work with Lightpack Filter?

Starting from version 0.7.0, there is a new tab for "Automation" allowing you to run a URL when the video "plays", "pauses" or "closes". IFTTT has a trigger called "Web Hook" which can be used to trigger something. For example, you can specify when the video starts to play to dim your lights. Input the url as the trigger under the play event and in IFTTT configure your web hook to turn off your LIFX/Hue lightbulbs.

Instructions

Pre-Setup

  1. Go to IFTTT site and register to create an account.
  2. Hook up your LIFX or Hue light bulbs to the service.
  3. Log into your account

Create an Applet and Finding the Webhook URL

  1. Go to the webhook settings page to find your URL and make sure it is active. An example can be https://maker.ifttt.com/use/fytawzcMLxMmHZXbfrSNBR32H0MhsXEMpsOV7r5iLle, your key will be "fytawzcMLxMmHZXbfrSNBR32H0MhsXEMpsOV7r5iLle", mark this down for step 9.
  2. Go and create a new Applet
  3. For this choose webhook, then choose "Receive a web request"
  4. Enter an event name such as "video_play" for when the video plays and create the trigger. Mark this down for step 9
  5. For that choose LIFX or Philips Hue (or any other service you wish to control).
  6. For your service, configure what you like it to do, such as "turn off lights" or "turn down the thermostat".
  7. Finally when you finished configuring your service, press "Create action"
  8. I recommend you turn off notification (as it can get bothersome with the mobile app)
  9. Finally find the URL you need to input into Lightpack Filter

https://maker.ifttt.com/trigger/<event name>/with/key/<your key>

Add URL to Lightpack Filter

Imgur

From the description in Usage

  1. Input the URL from the last section into a field representing which event you wish to trigger on.
  2. Set the time window you wish this event can occur on. If anytime then it will always run.
  3. Turn on the switch to allow this rule to work.
  4. OPTIONAL You can specify a timeout between each event (video play, pause and close) so that each IFTTT request can run. Sometimes the second request may not run such that if you pause and close a window near the same time, the pause event will successfully run, but close event will run after and IFTTT will not do anything. Adding a delay will allow each event to run.