Daemon that listens for data from a current cost device, stores it in a rrd database, and can also optionally serve a dynamic webpage to allow easy viewing.
Python Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


currentcostd is a python based daemon designed to listen to the output from the currentcost devices, and then store the corresponding data in an RRD database.

The daemon can currently:
  * Switch user
  * Run the foreground for debugging purposes
  * Runs an optional, basic, HTTP server where you can see the current power and temperature, and serve static files (Note, static files are very badly done and is probably exploitable at this point - just needed something working here for a demo)
  * Uses a template file to build the web based UI

Rather than make the daemon generate graphs I've currently resorted to a shell script and rrdtool on a cronjob.

  * Make the HTTP server less crap
  * More error checking

  * It doesn't understand multiple sensors
  * Error checking is barely there
  * Not smart enough to know when its not getting data and take the necessary steps
  * The code is probably pretty poor. My excuse is that python makes me angry and this was an attempt to see if I could live with it.

At present it depends on:
  * pyserial
  * python-rrdtool

Thanks go out to to the following guys who have done the majority of the leg work already:
  * Paul Mutton (http://www.jibble.org/currentcost/)
  * Everyone involved with the currentcost project at code.google.com (http://code.google.com/p/currentcost/)
  * James Smith (http://www.ibm.com/developerworks/xml/tutorials/x-ameetut/)
  * "histori1" (http://forum.makehistori.com/index.php?topic=688.0)