A good friend of mine recently said “it’s a pity I can’t just automatically post my blog entries on social media”. Good news! You can - with one caveat… you can everywhere except Google+.
If-That-Then-This (IFTTT) is a fantastic (free!) integration tool. I’ll show you how to leverage it.
First, a note on google. How can a company founded, staffed, and loved by developers be so terrible at APIs? A good public API allows developers to integrate. We make tools, we automate things, we develop apps that automatically post a picture of a cat on twitter when your WiFi aware light switch is turned on or off (true story).
So, if any Googlers read this - please, please open your APIs!
Go to IFTTT and sign up. Before starting, you are going to need to activate the Twitter and Feed channels. When you activate a channel, you need to configure all the associated settings for the service. In the case of twitter, you need to sign in your twitter account.
IFTTT organises all of your tasks into recipes. We are going to create a new recipe.
The IF part of If-This-Then-That refers to a trigger condition. In our case, it is a new blog post appearing in our blog’s ATOM feed. Choose the “Feed” channel.
Choose “New Feed Item” as the trigger.
Enter your blog Feed URL.
Set “Twitter” - “Post new Tweet” as the action. This is the That part of If-This-Then-That.
Add some descriptive text. You can reference the title and URL using variables, as pictured.
Confirm your new recipe, and you are good to go. Add a new blog post as a test.
You can add a recipe for Facebook following the exact same process. IFTTT really is a great service. Here are some other things I do with it:
- Sending a push message to my phone when my porch light is turned on
- Sending a push message to my phone when my irrigation pump is turned on or off
- Sending an email to me if it is going to rail tomorrow
- Turning my porch light off at Sunrise.
I recently purchased a Belkin WeMo light switch. I’ve been eyeing these off for a while. The general premise is pretty cool. It is a IP enabled light switch, with Iphone/Android control.
Install was pretty easy. It was simply a matter of cutting a hole in the gyprock (plaster board), and running some wires to my existing switch. Belkin provided some twist-on electrical connectors, which made the job very easy. Note that this will not use any sort of standard Australian wall plate - so it is not going to look like your Clipsal switches. It does fit into a standard plasterboard C-Clip, so that is nice.
Once running, it was fairly easy to setup. After installing the WeMo app, I connected my phone to a new Wifi access point provided by the WeMo switch. The WeMo app then prompted me to enter my existing WiFi network details. From there, the switch connected to my home network and performed a firmware update, and we were in business.
Controlling the switch worked on my home network, or remotely - and it responded fast. There is an audible click from the switch when triggered remotely.
The switch lights up to indicate status, with a small green icon showing on/off state. This is really handy at night. There is also a soft white LED showing a network connection.
Legal & Safety Note
If you live here in Australia, you MUST have the switch installed by a licenced electrician. It is a legal requirement. You should also keep in mind that you are dealing with 240v power. You could do yourself a serious injury or manage to electrocute yourself. Don?t become a Darwin Award.
So far, I have had two problems. The first is that the switch has stopped responding to my phone over wifi. If I connect to it over the cell network, it works fine. I suspect this is a quirk of the NAT setup for my home network rather than an issue with the switch itself.
The second issue I have had is that I setting up IFTTT integration was difficult. The WeMo app was unable to generate a PIN for IFTTT. Belkin were very quick to respond on twitter. They suggested performing a factory reset of the switch (which I did). Within 24 hours it was working. It may have been a server side issue at Belkin.
As a software developer, I was keen to attempt to integrate with the WeMo switch. Unfortunately Belkin don?t provide a public API! I was hoping there would be a REST or SOAP service I could work with. That means our options for integration are limited to third party services supported by the WeMo - which includes IFTTT (mentioned above).
For my integration test, I integrated my home alarm system with the switch. When my alarm is armed at night time, the WeMo Switch turns on my outside light.
In more detail, when I arm my alarm, an email is sent saying “Alarm Armed at (time)”. I added a Google script to my Gmail account to check if it is after sunset, and if it is, send a second email saying “Alarm Armed (Night)”.
IFTTT picks up this second email, and turns on my outside light!
Overall I’m happy with the WeMo switch. The price was $60, which seems ok considering some of the fancier standard light switches are up near that price. If integration was friendlier, I?d rate it higher.
Rating: 4⁄5 Stars - Highly recommended
The installed switch
Front of switch and connectors
Back of switch, showing wires