I've been dying, ever since a couple of the core contributors visited frog Austin a little over a year ago, to play with Spacebrew, and in yet another skunkworks bit of hacking at work recently, I finally got to.
We, the secret snooping society, want to fill the Austin studio with sensors of varying type and scope, and we wanted it to be very easy for people, once they've found us out, to play along. This is a perfect fit for Spacebrew, which aims to make interactive spaces, exposing data via a simple API. One rig can be set up to be a data "publisher," and, without permission or help of any kind, anybody that can reach that server via a network/Internet connection can write a "subscriber" that can do whatever it likes with that data (usually, visualizing it).
I also finally got to play with the Electric Imp, a nifty little WiFi-enabler.
You can read all about it, and get all the source code, on github, but here's a short walkthrough of how it works (from the "What does it do?" section of the project's README):
- Use an Arduino to power a proximity sensor as a motion detector, and, when it sees motion, send a command over serial to an
- Electric Imp, which throws an event over the Internet to
- Electric Imp's cloud service, which we've configured to exposes an API that rolls up and reports these events upon HTTP GET, which
- Our Node.js server polls, and upon finding new events, acts by both
- Writing a record to a mongoDB and
- Forwarding the event to
Up to this point we have built a Spacebrew publisher, that happens to also persist data (something not typically included in Spacebrew).