Build your own project
This project has been released as Open Source, which means that you can use the resources we have created here (the code for the website and collecting energy data etc.) and use it to run your own energy reduction project.
If you wish to create your own local initiative, you will require the following:
1. The equipment to collect the energy readings and then transmit them to the internet.
2. A webserver to run the website and data collation on.
3. A selection of premises with engaged participants who will attempt to reduce their energy.
The broad description of how the equipment is assembled is given by the following diagram:
The CurrentCost CC128 device was
chosen as it facilitated the upload of its data to the internet, unique at the
time. This also requires the CurrentCost bridge unit. See Appendix 1 for links
to both items. It was also necessary to purchase 2 additional sensors for each
transmitter as 3 phase distribution boards require these.
To install the devices, the
instructions were followed as per the product manual. Of note was the distance
through which the wireless signals traversed and its capabilities through walls.
Each installation proved unique in finding a position suitable for placing the
display unit which also allowed for a wired internet connection.
The bridge unit proved
particularly unwilling to pick up an IP address and maintain connectivity in the
heterogeneous networking environments which were encountered. One solution found
was to install a known compatible router in between the bridge unit and the
internet connection available. Through trial and error, many routers were
eliminated as they would over time drop connection and the bridge unit would
fail to re-establish connection. One model which was found to reliable connect
was the Intellinet 300. This was connected such that the Wan connection was
attached to the available Ethernet connection on premises and the first LAN port
was attached to the bridge unit. It was essential to set the router up such that
it offered DHCP in the 192.168.1.1 to 192.168.1.254 range, as the bridge unit
failed to pick up an IP address at other ranges.
The data is published by the
CC128 device to Pachube.com which is a central repository for many “Internet of
things” devices. Pachube offer a set of APIs through which it is possible to
interface. Each of the CC128 devices was originally set up with CurrentCost.com
through the normal installation instructions. After installing as per the
instructions and logging into my.currentcost.com to view the device, it can be
seen to update the feed and appear “live”. Once it is successfully updating the
currentcost site, one may view the Access Key which is listed on the usage page
for a given device. This Access Key is then used to view the device information
To retrieve the latest reading
(CSV export) for a device:
The parameters for above: 10303 = the feed associated with a
particular device and the key is unique for each device.
This returns the following style
The format of the above is:
Datastream Id, Timestamp, Value
Each line corresponds to a
datastream. Each CC128 device emits two streams by default. The first (as given
by the first element of 0), is the temperature in degrees Celcius. The second is
the average wattage consumed in the last 5 minute period.
Other than retrieving the most
recent data, some archive data may also be retrieved.
The ReduceOurEnergy website is
setup with a cron job to make these calls, once for each machine on a daily
basis, appending the results to a text file. 3 levels of resolution are
maintained. These are at one entry per day, one entry per hour and one entry per
5 minute intervals. The purpose of this is for producing reports. Namely, when
visiting the website, only 1 hour resolution is provided for the full historical
graph, otherwise there would be too many datapoints for an effective graph
rendering. However, for the live information graph, the full resolution of 5
minute interval is used. Note, for the live information viewing, a call to
Pachube is made immediately, rather than using the results of the nightly
The ReduceOurEnergy website was
constructed using ASP .NET 3.0 C# running on a Microsoft Windows 2003 server.
The code is attached as an appendix. Of note, the web.config file contains the
keys and details for each device, thus has been scrubbed to protect the privacy
of the participants. These machine identifiers and Access Keys are unique for
each device anyway so are required to setup any new device.
If you wish to
take a copy of this code, you will need to install it on your own domain and
webserver. If you wish to contribute new code to the project, plese send the
email@example.com for review.
The code to run the site is given in conjunction with a Readme text file
which describes sections of importance and the items of note in the web.config
file. A familiarity with Asp .Net programming is required to configure and run
the provided code.
The output is graphed using google graphs for the historical entries and
for the graphical gauges. A Flash component is used for the 1 week comparison
Appendix 1: Web Links
CurrentCost CC128 EnviR device:
CurrentCost bridge unit:
CurrentCost transmitter sensors:
Appendix 2: Source Code
Download the source code zip file.