Monthly Archives: July 2009

Building WattDepot REST API

After getting the simple ping server working with Restlet, last week I turned my attention to the WattDepot REST API, since the API drives the functionality that I will be implementing. Staring at the blank wiki page, I turned to the O’Reilly book RESTful Web Services (link to book content via Safari Books Online for UHM folks). The book is an excellent introduction into why REST makese sense for web services, and goes step by step through the process of designing web services using their Resource Oriented Architecture. So I spent a lot of time reading the book to see examples of how to turn requirements into a ROA API.

There is now a REST API wiki page for WattDepot, but it’s mostly requirements at this point. This week I plan to crank out a first draft of the API, so I can start implementing it ASAP.

There are now 4 weeks left before the semester starts. I’d like to have data persistence, a client that can retrieve Obvius meter data and send to WattDepot, and Google gadget visualization working by then, so my work is cut out for me.

Plans from last week:

  • Read through sensorbase REST API
    • done
  • Start work on WattDepot REST API
    • done
  • Read up on Google Visualization data source library
    • not done
  • Write down initial thoughts on research questions
    • not done

Other accomplishments from last week:

  • Read through first 6 chapters of RESTful Web Services
  • Attended the TechHui conference. There was a lot of good info about renewable energy development, and other tech goodness.
  • Found one more small bug in Hackystat build files, now they should really really be stable 🙂
  • Attended UH SecondLife gettogether, complete with live DJ and dancefloor. It was fun, but I still don’t see myself spending any significant time in SL.

Pointers to work products:

Plans for this week:

  • Finish first draft of WattDepot REST API
  • Follow up on some contacts from Tech Hui conference
  • Read up on Google Visualization data source library

Cool links:

  • Damon Hart-Davis (creator of the site I mentioned last week) has pointed out that Ecotricity (a UK utility) has similar carbon intensity data on their web page. This is precident for utilities sharing this kind of data.
  • Blue Mars is a new massively multi-player online virtual environment like Second Life, being developed in Honolulu. The graphics are far superior to SL, and the business model is interesting in that they are specifically designing it around making it easy for content developers to make a living creating content for Blue Mars. They are also hoping to attract indie game developers to rent out a city block of space where they can create their games with autonomy and make money from it. They are taking beta applications for the client now, but if you are a developer you can get the dev kit right now at their developer website.

Build file extravaganza

Didn’t get to spend as much time working last week as I had hoped. Most of my time ended up being spent getting fully up to speed on the Ivy-based build files for the hackystat-developer-example project. The good news is that we got all (most?) of the bugs worked out, so WattDepot is now using the improved build files. The changes needed to customize to WattDepot are also very localized (mostly in build.xml), so I should be able to easily incorporate any future changes.

I did glance through the Google Visualization data source API, and Google provides a Java library that does all of the heavy lifting. This definitely looks like the way to go for visualizing the data.

(Overly ambitious) plans from last week:

  • Finish getting WattDepot build environment working
    • done
  • Get WattDepot responding to ping API (ala Hackystat sensorbase)
    • done, even has a unit test
  • Read through sensorbase REST API
    • not done
  • Read Google Visualization data source API and libraries
    • only glanced at it, but looks like I can use the Java library and not the raw API
  • Start work on WattDepot REST API
    • not done
  • Write down initial thoughts on research questions
    • not done
  • Start porting over Derby code from sensorbase to WattDepot
    • not done or even thought about

Other accomplishments from last week:

  • Helped test and debug the latest version of the Hackystat build environment
  • Paid for my classes & fees. Hoping for a refund via tuition waiver 🙂
  • Attended the Hawaii Clean Energy Festival, didn’t win anything exciting. Mostly the same folks who had booths at Hawaii Clean Energy Day back in June.

Pointers to work products:

Plans for this week:

  • Read through sensorbase REST API
  • Start work on WattDepot REST API
  • Read up on Google Visualization data source library
  • Write down initial thoughts on research questions

Cool links:

  • This cool website displays the carbon-intensity of the UK electrical grid based on (near-real time?) data from UK utilities. The great thing about it is that it displays the carbon intensity like a traffic light, so you can use it to make decisions on the use of appliances like dishwashers. It would be great if we could get similar data from HECO.
  • Sensorpedia says that it is a Web 2.0 system for sharing all types of sensor data. It’s in an invitation-only beta, and the public information on the website is thin. Something to keep an eye on.

Summer bloggin’, happened so fast

Philip has suggested I return to blogging as I continue my research this summer, and I agree that it would be a good idea. At the end of the Spring semester, I was thinking I would develop my proposal over the summer and defend before the Fall semester started. However, after discussion with Philip and Dave Nixon, it became clear that there was no way we could be ready to start the experiment in the fall, so rushing to complete the proposal this summer was probably not the best plan.

The area I’m planning to explore is how to use computers to facilitate collaboration between people in close physical proximity (such as people on the same floor of a building) as they try to reduce their electricity usage. In order to figure out what kind of computer support would be useful, we need the power data from the electrical meters in a format that allows rapid analysis and visualization. To that end, I’m developing a repository for power data that will support the Google Visualization data source API so that I can display the data using their nice gadgets. I’ll also be developing a client that reads the power data from the meters and inputs it into the repository. This repository system is called WattDepot, and has a Google Code project of that name.

The major tasks I’m working on this summer are:

  • Develop WattDepot to the point that it can slurp up data from the Obvius power meters and display it using the Google Visualization API gadgets (in particular, the annotated time line gadget).
  • Write up user scenarios for how people would actually use the system to collaborate on reducing power usage. What do they need to see to be motivated to conserve? In a typical office, what are the viable options for reducing power usage that are open to the occupant?
  • Brainstorm the research questions and specific hypotheses that I want to test in the experiment.
  • Mock up the user interface required to support the user scenarios.

Going into the fall semester, I will be developing the collaboration web app, designing the experiment in detail, and writing up my proposal for defense before the end of the semester. This should ensure that everything is ready to begin the experiment in the spring 2010 semester.

In other news, I’m applying for a research assistantship from the REIS project for the fall semester. This forced me to write a CV, which is a first for me (previously I’ve only had resumés). I used LaTeX for this task, naturally. The blessing and curse of LaTeX is that there are umpteen zillion CV packages out there, and many people seem to roll their own too. I ended up using the moderncv class, and can’t say I’m 100% satisfied with it. However, a comprehensive comparison of the many CV classes would have taken too much time. Maybe I’ll switch packages the next time I need to revise the CV.

Other accomplishments from last week:

  • Wrote cover letter for RA application
  • Wrote up CV for RA application
  • Compiled Hackystat from source using new Ivy-enabled version
  • Mostly got up to speed on Hackystat/CSDL development environment

Pointers to work products:

Plans for this week:

  • Finish getting WattDepot build environment working
  • Get WattDepot responding to ping API (ala Hackystat sensorbase)
  • Read through sensorbase REST API
  • Read Google Visualization data source API and libraries
  • Start work on WattDepot REST API
  • Write down initial thoughts on research questions
  • Start porting over Derby code from sensorbase to WattDepot

Cool links:

  • TheBus (Oahu’s mass transit system) has a beta website where you can track upcoming bus arrivals for a particular bus stop. I’ve been wanting this forever, so hopefully it is accurate (haven’t had a chance to use it in practice yet). Here are the arrivals for the Sinclair Circle bus stop. Also, the site is very mobile friendly, which makes perfect sense.