/CurrentCostLogger

A simple Perl script for logging data from the Current Cost EnviR

Primary LanguageHTML

Reads data from a Current Cost EnviR display via USB port to a Linux machine and logs the data to a file.
Also updates an RRDtool round robin database.

Forked from Jack Kelly's Perl script: https://github.com/JackKelly/CurrentCostLogger which itself was…
Based on Paul Mutton's excellent Perl script and tutorial: http://www.jibble.org/currentcost/
with modifications from Jamie Bennett: http://www.linuxuk.org/2008/12/currentcost-and-ubuntu/

Example graphs and more information at http://matt.blissett.me.uk/apps/current-cost/

----------------
  Dependencies 
================
This module requires the Device::SerialPort Perl module.  Install this using Perl's package manager:
At the Linux command line, type:
    sudo perl -MCPAN -e shell
And then type:
    install Device::SerialPort
Alternatively, in Debian/Ubuntu:
    apt-get install libdevice-serialport-perl

Also requires RRDtool: http://oss.oetiker.ch/rrdtool/
    apt-get install rrdtool
and Proc::Daemon
    apt-get install libproc-daemon-perl

----------------
  Installation
================
The program can either be run directly:
    current-cost
or installed as a daemon (on Debian) by copying 'init-current-cost' to /etc/init.d/current-cost
and copying (and editing) 'default-current-cost' to /etc/defaults/current-cost.  Graphs can be
generated using 'update-power' or 'generate-graphs'.

---------------
  Data format
===============
The data format of the data.txt file is:
UNIX  TIME	WATTS	DD/MM/YEAR HH:MM:SS	TEMPERATURE

The time and date is taken from the local machine, not the Current
Cost (although the time is extracted from the Current Cost's output so
it would be easy to use the time from the Current Cost rather than
from the local Linux machine.)


-----------------------------------
  To import into Open Office Calc
===================================
On the import, select “separated by tabs” and “detect special numbers”