Last night I was flicking through Flipboard, on my iPad, and I stumbled upon this article from Engadget about a mashup called Beeri. It’s really cool! Basically, you tell Siri to make you a beer and it does but in a random way – it drives a radio controlled car, with a can of beer strapped to it, into a spike!
Cool outcome but I couldn’t help think the process could have been cleaner. Here’s how they did it; they sent an SMS saying “pour me a beer” to Twitter. Next, they polled Twitter every 10 seconds for the word “pour”. When it found a match, an Arduino did the rest.
I thought about doing it this way. It wouldn’t be hard to Tweet “turn lights on”, set up a CRON to hit the Twitter API – but that seemed like too much, why get Twitter involved?
Here’s my solution.
I’m using iTagg. iTagg sell “keywords” for their shortcodes (5-digit phone numbers). I’ve purchased the keyword “lights” and programmed a contact into my iPhone 4S called “iHomeTouch. I’ve then added the shortcode as a phone number.
iTagg has the ability to forward incoming SMS to a URL. So, I’ve set up an API at the URL I’ve specified. The API looks to see who sent the SMS, and if it’s my mobile number it will turn the lights on or off, depending on the message sent.
The API is a Sockets call to iHomeTouch Server, which has access other the Internet.
When the message contains the word “ON” it will send an on command to iHomeTouch. There’s a slight delay, but the lamp comes on.
I rushed into the office this morning to hack this together. It was fun and it really gets me thinking about how cool Siri is going to be when developers can interface with the Siri API.