Author: Matthew Colyer

Hacking the Lutron GRAFIK 6000

Introduction

Olin College uses a lot of energy. In response to this and various other environmental issues, Olin also has a club called Greening Olin. Last semester (Spring 2005), Greening Olin decided to create a project to minimize light usage in the Academic Center. Being engineering students we decided that it was necessary to obtain baseline data in order to measure the success of the new initiative.

We soon learned that since Olin is a brand new school, the Academic Center's lights were controlled by a Lutron GRAFIK 6000. If you go to the product page you will realize that this is quite a sophisticated piece of hardware (and that it has a mind boggling number of features). However, by far the coolest feature is it's RS232 port and its well documented data format. So being clever hackers that we are, Chris Murphy, Mike Curtis and myself set out to monitor light usage using only the above information, a working knowledge of Python and small computer with Ubuntu installed on it.

Process

  1. Brainstormed the idea.
  2. Acquired permission from the administration to access the lighting information.
  3. Acquired the hardware and coordinated with facilities to connect the computer to the Lutron.
  4. Downloaded documentation for the lighting controller from the web.
  5. Wrote a simple python wrapper class around the serial port libraries to interpret the data.
  6. Acquired the mapping of individual light "banks" to room numbers.
  7. Created an XML document to hold the mapping of light "banks" to room numbers.
  8. Used the wrapper class to query every room in the building and create a record in a MySQL database if the lighting value of a room had changed.
  9. Created a small XMLRPC webservice that would take a room number and return the value for all lighting banks inside the room from the database.
  10. Wrote a PHP page to query the database and show the data in graphical form using the GD library.
  11. Rewrote the PHP into Python which generated an SVG of the data. This second iteration has the ability to display data on the day scale as well as the week scale. It also has rudimentary support for the month scale (it overlays the last four weeks of data on top of each other using transparency).
  12. Acquired fire escape maps of the academic center, scanned them and then traced them into SVG.
  13. Created a program to query all the rooms and modify the "map" of the academic center to highlight the rooms that were lit.
  14. A small webpage was then created which detailed all the information learned from the project. Unfortunately we are not able to host this on the Internet due to security concerns.

Final Results

Daily View

Shows a day's worth of data in a single image. Hours are located along the x-axis.
Daily View

Weekly View

Shows a week's worth of data in a single image. Days are located along the x-axis.
Weekly View

Monthly View

Shows a month's worth of data in a single image by overlaying the last four weeks using transparency. Days are located along the x-axis.
Monthly View

Map View

A floor layout where each room is highlighted depending on the value of the lights located within it.
Map View

Source Code

A git repository hold the code can be found at http://git.matt.colyer.name/2005/lutron/.

Use git clone http://git.matt.colyer.name/2005/lutron/ to get a copy.

Special Thanks

Mark Chang, deserves a great deal of thanks as he donated the hardware and helped us navigate the tricky political waters of Olin :).