Revising WattDepot API

Philip looked at my diagram, and had more suggestions for improvement. I’ve now created three diagrams: one that shows the relationships between resources, one that shows examples of how sensor data might flow into WattDepot, and one that shows examples how sensor data from WattDepot might might be used. The WattDepot REST API introduction has been updated with the new diagrams. I also realized that for many applications, it will be necessary to combine the data from multiple Sources to map to real world concepts, for example a building’s usage might be recorded from multiple meters. I was planning to create a new type of resource for this, but Philip sagely pointed out that I should just allow Sources to include other Sources. So I’ve updated the API to support virtual Sources, which include the data from sub-Sources. Actually aggregating the data from multiple sources will require some additional thought, because in the general case the clocks of the meters are not synchronized, so the data for a particular point in time for a virtual source will require some work to calculate.

My implementation is behind schedule. I spent a lot of time figuring out how to get HTTP authentication working. This turns out to be really simple in Restlet, but it took me a long time to fully grok it. I now have HTTP Basic authentication working for the admin user, and placeholder User resources behind the authentication. I’m spending time figuring out the infrastructure required to get any of the stateful resources working (logging, concurrency control, persistance), but once I have them all working for the first resource, the rest should follow more quickly.

Plans from last week:

  • Implement user authentication in WattDepot
    • done
  • Implement User resource
    • started, currently just has placeholder
  • Implement memory storage of data
    • not done
  • Start reading CouchDB manual
    • not done
  • Finish reading docs for Google Visualization data source library
    • not done

Other accomplishments from last week:

Pointers to work products:

Plans for this week:

  • Get logging working in WattDepot
  • Implement UserManager for concurrency control
  • Implement memory storage of data
  • Work on User resource
  • Look for home meter solutions that could work with WattDepot

Cool links:

  • Enphase makes microinverters for solar panels. This animation of their Enlighten monitoring system shows how powerful it is to have data about the production from every panel.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s