Monthly Archives: March 2010

Azavea’s Coffee Helper: Caféduino

Azavea has a clearly defined symbiosis with coffee. We have a designated Minister of Coffee, an incredible coffee grinder, and we get selections of coffee from around the world; some of it hand-delivered, and some of it hand-crafted.

One of the problems opportunities that I observed was that as coffee was brewed and consumed in the office (about 6 brews a day), there would often be an unlucky staffer who picked up the (opaque) coffee pot to find it empty.  I don’t personally drink coffee, so I was unaware of how much anticipation one would have when approaching the pot.  Not knowing how much coffee was in there, and worrying if the mug you pour may be half empty or half full.

I slowly set to work in my free time to solve this conundrum.  To me, it seemed like an individual would want to know if there was coffee in the coffee pot before approaching the coffee maker (whom some of us address reverently as Zojirushi-san).  This could be 1) a web page, 2) a desktop app, or 3) an IRC (not IIRC) bot.

I drew up some schematics, took some measurements, and retreated to my home lab to build an Arduino based, web-enabled measurement system tailored for the coffee pot. I used an Arduino Diecimila, an Ethernet Shield, a couple piezoelectric sensors, a 3 color LED, a couple buttons, and an awesome hand-crafted wooden base.

A short while later, I had a working prototype ready for testing. This device now sits in Azavea’s kitchen, measuring the weight of the coffee maker, and reporting the measurements to pachube.  After doing some internal evaluation, the name ‘Caféduino’ stuck, and I developed a couple methods of viewing the coffee pot status.

  1. Direct web access
    The web page generated by the Cafeduino

    The web page generated by the Caféduino

    Using this method, it’s possible to directly address the Caféduino.  This gives one direct access to the measurement values, but is more useful for other applications that are polling the data frequently.

  2. Caféduino Notification
    The system tray notification app.

    The system tray notification app.

    Using this method, the Caféduino is polled continuously, and the tiny coffee mug in the system tray is updated as the coffee level changes.  This is the most aggressive method of monitoring the Caféduino which, mysteriously, is the most comforting for users.

    Visualizing the Cafeduino history.

    Visualizing the Caféduino history.

    When the coffee mug is clicked, the history of the Caféduino is charted in the window.  What you are seeing is a Google visualization applet that is consuming the historical data, stored on http://www.pachube.com/.

  3. IRC bot integration
    A sample IRC conversation with the IRC bot.

    A sample IRC conversation with the IRC bot.

    Lastly, the most interactive method of polling the Caféduino is through our internal IRC channel. The above screenshot is the conversation that I initiated with the IRC bot, and its response.  It has reassured me that there is indeed, 77.78% of a pot of coffee left.

Now our staff can check in on the coffee pot, to insure that their next visit to the kitchen will be without disappointment.  While this system works well for monitoring the coffee level, the next steps may be more involved – building a machine to automatically brew coffee.

Azavea Enters MassDOT Developers Real Time Challenge

We here at Azavea like playing with data. It’s a fact. All sorts of data (geographically aggregated, processed and hunched, walkable, etc) are useful, but not always accessible. So when MassDOT (the Massachusetts Department of Transportation) announced their Developers Real Time Challenge, we knew it was an opportunity that we didn’t want to pass up.

MassDOT has been making steady progress opening transportation data to developers over the past few months. In September of 2009, they first released 2 full days worth of passenger data, and challenged the developer community to play with it to develop a visualization and application that used that data. Then in November of 2009, they hosted a developer conference, announced the winners of their first challenge, and announced the release of a real-time XML feed. They kept that ball rolling in February 2010 with a Hackathon at MIT with the Center for Future Civic Media, and then the announcement of the Real Time Challenge.

BusMinder screenshot

Screenshot of BusMinder in action.

My response to the real time challenge: BusMinder (http://sandbox.azavea.com/mbta/).  BusMinder is an experiment, designed to enable users to create bus reminders (‘busminders’) for their favorite bus stop(s).  Users walk through the process of:

  1. Selecting a bus stop
  2. Selecting a reminder type (sms or email)
  3. Selecting a time window

It’s that simple to get started. The application will save those settings and remind the user when an MBTA vehicle is approaching that stop, and how far away it is in minutes.  Once a user registers, they can set up multiple reminders (commuting to work and commuting to home, for example).

I introduce BusMinder as an experiment because MassDOT has published this real time XML data feed on an ‘trial’ basis. Currently, only 5 bus lines are supported, and it’s understood that the data is experimental.  In fact, one of the bullet points for developers working with MassDOT data is “Expect change”.  My hope is that this application is found to be useful, and it helps MassDOT release more of their real time transit information.

I also want to give a shout out to Robert Cheetham, for Azavea’s generous Research program.  I was able to shift around my projects a bit and take on this challenge under the auspices of my independent research.  Thank you, Robert.

Ok, ok, enough already!  Go to http://sandbox.azavea.com/mbta/ and start playing!

http://civic.mit.edu/