With a wifi connection and a bit of help from their proprietary apps, many smart devices already offer some level of online web control. For example, the Hue mobile app allows you to control your lightbulbs from anywhere in the world, or to activate them as you arrive or leave home (geolocation), or at certain times of day (clock + geolocation), or even connect to hue.com for more complex actions ('formulas', like "turn the lights blue if the temperature drops below 60 degrees F" or "only turn on the lights at 7 am if the sun did not rise").

Not all smart devices offer complex (or any) level of control. Web automation is the way to make smart devices do even more.

IFTTT (IF THIS THEN THAT)

ifttt.com

IFTTT is the first stop for smart-device automation. It's an online service that launched back in 2011 and now has agreements with over 600 vendors ('services') to help automate their devices. More are being added every day! Services range from device makers such as Samsung Refrigerator and Philips Hue, to online tools like Dropbox and Google Calendar, and even in-device apps like iOS Contacts or Android SMS. The IFTTT Services list is also a great resource to discover new devices and tools that are not as well known or have just launched (this is how I discovered the smart Appkettle, Woopla phone calls, and the 500px photo network).

IFTTT calls its automation programs: 'applets'. Applets connect pairs of services through the traditional "if this, then that" programming paradigm (ie "if the sun sets, turn on this light bulb"). You can invent your own applets, or use any of the 54 million that have already been created by other users of IFTTT (categorized in Collections such as 'Applets for Travelers', 'Applets for Outer Space', or 'Applets for Your Car').

Each service lists what it can (or cannot) connect in an applet; some services are more oriented to triggering actions ("if this"), and others are better for making things happen ("then that"). For example:

Google Calendar can make something happen (trigger) when:
... an event is added, an event starts, an event ends, or you respond to an event invite.
And it can be made to do these things by itself or another service (actions):
... add a general event, or a detailed event.

Nest Protect can make something happen (trigger) when:
... smoke/co2 alarm/emergency are triggered, or battery is low.
But it can't be made to do anything by itself or another service (doesn't have actions).

So it's sometimes a matter of doing a bit of research about each service's triggers and actions.

Some of my favorite applets:

"Tell Amazon to trigger an emergency email blast" [link]
"Send files from Dropbox to your Kindle" [link]
"Sunday email digest of the week's payments accepted via Square" [link]
"A reminder to drink water" [link]
"Get a notification when the International Space Station passes over your house" [link]
"If you arrive between 6pm and 6am, then activate a color lightbulb Scene" [link]

BONUS: Since some of the services include DIY electronics, IFTTT can also be a great way to get started with this interesting hobby. 14 services include Adafruit, Littlebits, Thinga and more.

BONUS: Developers can also add more power to IFTTT with webhooks, M2X, openHAB, Particle or Arrayent.

ZAPIER

zapier.com

Zapier is another online automation service that is popular these days (launched in 2012). More for online tools than physical smart home devices. It's a bit more complex, and a great way to get more done (more customization and specialization). Whereas IFTTT focuses on 'this' and that', Zapier goes beyond into 'multi-step zaps' ("if this, then that and that and that and that"). Zapier also has more triggers and actions, and is a bit more 'business-oriented'.

In Zapier, services are called 'apps', and what is known as an applet in IFTTT, is a 'zap'. Whatevs.

Some integrations/services are slightly different in Zapier and IFTTT. For example, in Zapier Gmail can be used to set 7 different triggers or 3 actions, while in IFTT Gmail allows 6 triggers or just 1 action. But with other services, like Slack... Zapier integrates with Slack through a possible 5 triggers, 5 actions or 3 searches (mid-process information gathering steps). IFTTT has a grand total of 1 action for Slack and that’s it.

Zapier also includes... filters. Filters can be placed before any action, limiting the zap to only running when preset criteria are reached (e.g., when an "email address" field contains "zapier.com").

Some of my favorite zaps:

"Add New York Times articles that match a keyword to Pocket" [link]
"Post new Google Calendar events to your Facebook Page with a GIF from GIPHY" [link]
"Create custom Salesforce objects from newly completed DocuSign envelopes" [link]
"Convert an email into a PDF stored in Google Drive" [link]
"Turn off Lono garden watering zones based on the weather forecast from AerisWeather" [link]
"Get a Temi transcript for new YouTube videos you upload" [link]

HOW TO DO IT

Here is the basic workflow for IFTTT. Basic setup for "turn on my TP-link Kasa lights when I get home", but the same logic applies to all automated steps (Applets).

Connect Services > New Applet > This (choose Service + details) > THAT (choose Service + details).
That's all you really need to know for powering up your smart home devices.

IFTTT overview

-----

I program interactions between software and hardware. Contact me to get your home 'smartified', or to create complex office workflows in Zapier, or even to develop innovative electronics solutions.


-Sandro Alberti

Design

creative@sandroalberti.design

Published on:

Thursday, June 27, 2019