Connect to the Internet of Things with Bandwidth SMS and IFTTT
There has never been a better time for doing cool things with internet connected devices. One of the big markets that has come out of this new wave of technology is Do-It-Yourself home automation. Big players like Philips Hue, Nest, SmartThings, Wink and more, make it possible for anyone to walk into a store, buy a connected “thing” and turn their home into a “smart home.” Over the last three years, this market has exploded, and there are many different ecosystems of connected devices available today. One of the major problems for consumers these days is getting different ecosystems to play nicely with each other. IFTTT (an acronym for “If This Then That”) is a web service that’s sole purpose is to “tie the internet together”. It works by allowing users run various actions when a certain event occurs. For instance, you can set up a “recipe” that automatically uploads the NASA image of the day to Dropbox, as soon as NASA publishes a new image. Or you create a recipe that turns your lights blue when it’s going to rain. The list of connected services is growing very rapidly, opening up new possibilities for these types of web service mashups.
Things can get particularly interesting when you throw text messages into the mix. With of the vast proliferation of smartphones and and the mentality that “there’s an app for that”, most people would rather control things from an app on their smartphone (or smartwatch these days) rather than control things from a text message. However, there are a few circumstances that I can think of off the top of my head where I would actually prefer SMS control over using an app. For starters, many IoT systems do not have any kind of voice control. But my smartphone has pretty good voice dictation built in and will allow me send a text message quickly and easily. All I have to do is get my connected devices to respond to text messages.
IFTTT comes with some very basic SMS capabilities built in, but they are somewhat limited. They give you one phone number to use for all your recipes. You can only send text messages to yourself – not helpful if you want to notify someone or multiple people about events. Unless you want to run the same recipe every time you send your IFTTT number a message, you also have to include a hashtag (like #something) in your message. This makes composing the message slightly more cumbersome, especially if you’re dictating, and it also makes using the actual message contents in your recipe difficult or impossible.
However, things begin to get a lot more interesting when you combine IFTTT with the full featured Bandwidth Application Platform. IFTTT doesn’t include native support for Bandwidth’s App Platform, but they have recently launched the Maker Channel, which lets you “build your own” IFTTT channel. There is still one hurdle to overcome to get the Maker Channel to work with Bandwidth’s App Platform. IFTTT does not let you set custom headers in the HTTP request, which Bandwidth requires in order to securely authenticate your API request. To solve this hurdle, I have built a simple bridge that will relay messages between the Bandwidth Application Platform and IFTTT. It is open source on GitHub, hosted on Heroku, and absolutely free for anybody to use. You still need to create your own IFTTT account, and Bandwidth Application Platform account, and to do a little configuration on both ends. None of these things are difficult to do, and you don’t even need to write any code!