So how does thumbless Riblet manage to Twitter? Through the magic of home automation.
I had joked that people only post inane garbage on Twitter (“I’m eating a sandwich”) and my cat could contribute just as meaningful messages about her daily minutia….then I decided to try and follow through with my claim. I purchased some home automation equipment from X10.com. (I’d post a link to the site, but you don’t want to go there. It’s the most annoying website ever).
Here’s Riblet’s current Twitter setup: An EagleEye wireless motion sensor (MS14A), an ActiveHome Pro computer interface module (CM15A), a computer, and a food bowl. The computer interface module receives a signal from the wireless motion sensor when she eats at her food bowl. The computer interface module then notifies the computer via a USB cable. The software that came along with ActiveHome Pro didn’t really allow for any sort of Twitter functionality so I had to download the ActiveHome Pro SDK (Software Development Kit) and build my own. Currently that involves a JavaScript application that monitors the ActiveHome service and watches for motion sensor events. When it gets an event it selects a random phrase (all currently food based) and triggers a command line utility called Curl that interfaces with the Twitter API. The bottom line is it sends a Tweat to Twitter.The current setup is imperfect. Since it is a JavaScript application it runs in a web browser. That means I have to keep that browser window open all the time if I want it to work. The permissions are a bit wonky because web browsers usually don’t want to let JavaScript run executable files on the hard disk. I managed to finesse my way around all that to get the system working, but for long term use I’ll probably have to rewrite the entire thing in C# or something that will make a nice background application.
If I decide to continue the project there are a couple of things I could do to make it better. I could add more motion sensors to capture different Riblet activities. I could create more random phrases for her to post, but I think the real key is concentrating on ways to generate interesting phrases that I can’t always predict. Then I’ll actually enjoy reading her feed myself. An obvious modification would be to add time context in addition to location context to the phrases, so if it’s morning she’ll posts stuff about eating breakfast, then lunch later in the day. I also think it would be really cool if I could figure out how to use another dynamic source to help form her phrases. For instance maybe I could hook into a weather feed and start building phrases about how the weather is making her sleepy or hungry (“I always enjoy a late afternoon snack on a rainy day”).
I suppose there are all sorts of things I could do. Maybe add in a webcam to capture her. Does Riblet need her own flicker account? Maybe, who knows? Of course, I might just get bored and move onto a new project, but at least I can claim success in figuring out automatic Twitter posting on this one.
No comments:
Post a Comment