Monthly Archives: September 2009

Google Visualization data source API in the house

WattDepot now has a minimal implementation of the Google Visualization data source API, via the Google data source library. It’s working with the table visualization (boring) and the annontated timeline visualization (nifty). There are still lots of wrinkles to be worked out, but I can input data into WattDepot via HTTP, and get it back out as custom XML or JSON via HTTP. Woot!

For the rest of the week, I will be working towards setting up a client on dasha that pulls Saunders Hall power data from BMO online periodically, and then sends that data to a WattDepot server. I will also get the timeline visualization working to the point that it can display the Saunders data.

Plans from last week:

  • Implement Google Visualization data source API
    • minimal version checked into repository
  • Upload demo distribution to Google Code site
    • not done, not quite ready for distribution
  • Add Energy resource to REST API document
    • not done, but clarified requirements with Philip
  • Add Carbon resource to REST API document
    • not done, but clarified requirements with Philip
  • Start implementing Energy resource
    • not done, actually will be implementing a Power resource

Other accomplishments from last week:

Pointers to work products:

Plans for this week:

  • Clean up loose ends with visualization API
  • Write WattDepot client for Building Manager Online
  • Embed timeline gadget in web page

Cool links:

Actually imported data last week

While the minimal demo is not yet complete, WattDepot can now accept sensor data, and I have written a client that takes tab-delimited data from Veris power meters (via Building Manager Online) and sends it to WattDepot. This allows me to input the Saunders Hall data to date, since I have all that in files chunked by month and meter.

The final step required for the demo is getting the Google Visualization data source Java library working. I’m working through the examples and dependencies now, and intend to have something demoable this week.

Been doing the REIS seminar thing for a few weeks now, so the process is fairly cut and dried now. Hopefully shouldn’t cut into research work too much.

Plans from last week:

  • Write unit tests for SensorData resource (PUT, GET)
    • done
  • Implement TabularFileDataInputClient
    • done
  • Implement Google Visualization data source API
    • in progress
  • Attend metering meeting at Blue Planet
    • done
  • Annotate REST API with which parts are implemented so far
    • done, listing things as unimplemented until they are unit tested
  • Once demo feature set implemented, upload distribution to Google Code site
    • not done
  • Start filling in parts of implementation that were skipped for demo
    • not done
  • Write up meter notes
    • deferred, going to wait for feedback from Olin

Other accomplishments from last week:

Pointers to work products:

Plans for this week:

  • Implement Google Visualization data source API
  • Upload demo distribution to Google Code site
  • Add Energy resource to REST API document
  • Add Carbon resource to REST API document
  • Start implementing Energy resource

Cool links:

  • CARMA is a global database of carbon emissions by power plants. Has pretty good listings for Hawaii, as well as an API.

Preparing WattDepot for minimal demo

After I posted last week’s blog entry, Philip and I met and we ended up completely revising my plans for the past week. We decided that I should try to see if I could get enough of WattDepot implemented by Wednesday for a short demo: inputting data into WattDepot, serving it up in XML, and displaying it using the Google Visualization API. In order to meet this deadline, I prioritized the implementation of the code paths needed for the demo: storing SensorData, retrieving SensorData, and implementing the Google Visualization data source API via library.

The other thing we decided I should work is preparing the system for distribution. The system is now under continuous integration with Hudson, the Ant tasks for building a distribution now work, and I’ve brought up a “public” server on dasha, thereby confirming that the JAR from the distribution works.

Regarding the First International Workshop on Software Research and Climate Change, I decided that it was going to be too difficult to prepare the position paper, get travel funding, and actually attend the conference in Florida. The organizers have a mailing list called Software Engineering for the Planet, which I have joined to keep an eye on future workshops.

I also met with Olin Lagon about home power monitoring. He has been testing out different units, so I got some information on his experiences with the meters. I’ll write up my notes later.

Plans from last week:

  • Get Hudson working for WattDepot
    • done (mostly by Philip)
  • Get WattDepot build files working for building distributions
    • done
  • Set up public WattDepot (but not particuarly functional) server on dasha
    • done
  • Finish implementing SensorData resource
    • done, but still working on equivalent client methods and unit tests
  • Finish implementing rest of demo featureset
    • not done
  • Annotate REST API with which parts are implemented so far
    • not done

Other accomplishments from last week:

  • Post-processed REIS seminar slides and video (now a canonical task)
  • Checked out Olin Lagon’s home power meters

Pointers to work products:

Plans for this week:

  • Write unit tests for SensorData resource (PUT, GET)
  • Implement TabularFileDataInputClient
  • Implement Google Visualization data source API
  • Attend metering meeting at Blue Planet
  • Annotate REST API with which parts are implemented so far
  • Once demo feature set implemented, upload distribution to Google Code site
  • Start filling in parts of implementation that were skipped for demo
  • Write up meter notes

Cool links:

  • None to report.

WattDepot unit testing

Last week I continued work on the WattDepot implementation. The unit tests of DbManager took much longer to write and debug than I expected. I ended up doing a lot of refactoring, and probably should do even more refactoring to make the test methods smaller (right now have too many test cases in each test method).

Now that I have a temporary database layer, I’m focusing on the User, Source, and SensorData resources. I started on the User resource last week, need to push through the other resources now. I also need to start working with CouchDB so I can have a real persistance layer, and define the API for the Energy and Carbon resources.

The deadline for the First International Workshop on Software Research and Climate Change is coming up, so I need to figure out if I am going to attend, start writing position papers, make travel plans, and apply for GSO travel grant.

Plans from last week:

  • Finish writing DbManager tests
    • done
  • Implement User resource
    • started, not complete
  • Implement Source resource
    • not done
  • Start reading CouchDB manual
    • not done
  • Install CouchDB
    • not done
  • Add Energy resource to REST API
    • not done
  • Videotape REIS seminar
    • done, but the footage is suboptimal
  • Write followup email to Blue Planet
    • not done, but followup meeting has been scheduled

Other accomplishments from last week:

  • Figured out why JAXB wasn’t working with IvyRoundup (requires manual download), and suggested change to their XML stylesheet to emphasize this fact
  • Started reading the GSO travel grant application process
  • Became primary ICS representative to the GSO
  • Downloaded video from REIS seminar

Pointers to work products:

Plans for this week:

  • Finish implementing User resource
  • Implement Source resource
  • Implement SensorData resource
  • Start reading CouchDB manual
  • Install CouchDB
  • Add Energy resource to REST API

Cool links: