FlipBlade stand for iPad and MacBook Air
Book Review: Cryptozoology: A Pragmatist's Guide

Smart Home Tweets: Fixed

In 2007 I connected my home automation system to Twitter so that I could more easily receive status messages while I was away. This turned out to be one of the best features of my smart home, and might rank as one of the most useful applications of Twitter yet. You can read about how it all began here: Twittering Your Home.

However, a few months ago Twitter.com made a change to their service that broke my system. I've gotten around to fixing it and I thought I'd provide some pointers for those of you in a similar quandary.

The easiest way that I found to use Twitter's new "Oauth" login system is to adopt Tweepy. It's a very impressive Python library for doing everything that Twitter supports. However, because it is so feature-rich, it's intimidating to figure out. Fortunately, Jeff Miller's article on how to use it is well-written and easy to follow.

Another change at Twitter is that they're being more aggressive about filtering out what appear to be duplicate tweets. If your automated system tends to send the same sort of status messages throughout the day, some of them won't get through because of this. (Thanks to Tweepy's author, Josh, for helping with this.) The solution is to add a timestamp to your outgoing messages so they are each slightly different.

Comments

The comments to this entry are closed.