Our Mashed 08 hack: CurrentCost Live

Yesterday was the end of Mashed 08 – the annual London hackday from BBC Backstage.

I saw last week that there was going to be a “social responsibility” category in the hack challenge, and decided that a CurrentCost hack was in order!

Together with Rich, we spent a day trying to hack together a competitive challenge based around CurrentCost, encouraging people to reduce their home electricity usage by making it into a game they can play with their friends.

Here are a few notes based on the presentation I gave at the end.

CurrentCost - the transmitterTo start, a little background. This is my electricity meter at home.

The device attached to it is a CurrentCost meter. It’s an inductive loop that goes around a cable into my electric meter. Every six seconds it measures the amount of electricity I’m using at home.

CurrentCost - the LCD displayThe large black box contains a transmitter, which is used to send the meter readings to this – the display unit.

This shows you the reading – so you can see at a glance how much electricity you are using.

We’ve had these meters for a few weeks now, and what has made them more interesting is the port underneath.

Connect a serial cable to the port and you can get the electric meter readings in XML form.

With friends and colleagues at work, we’ve been playing with different things that we can do with this data.

tweaking the CurrentCost GUIFor example, last week I made a start on a Windows GUI for the CurrentCost data.

Each new update can be shown as a new bar, with graphs for hourly, daily and monthly totals.

A group of us at work have worked on an infrastructure that lets us upload our meter readings to a broker out there on the Internet.

First day's full CurrentCost dataOne of the first uses of this was a way to display real-time graphs of each house’s electricity usage online.

But with all of our readings in one place, we can start making more interesting uses of the data. And this is where we were when we arrived at Mashed.

The idea was to create a game based on the data. We’re both XBox 360 owners and one way that XBox encourages people to play is through XBox Live.

Firstly, it has ‘Achievements’.

Instead of just scores, they set challenges that you can work towards.

And it’s social.

You don’t just look at your own score, you look at your score compared with those of your friends.

You don’t just see if you’ve completed an achievement, you see which completed compared with your friends.

It makes games more interesting and engaging, and provides an incentive to try harder. We thought we’d try and copy that approach with the CurrentCost data.

There are a number of achievements we could define:

  • Lowest single reading
  • Lowest total power use
  • Lowest average use

and so on.

We could also define challenges based on personal improvements:

  • Lowest percentage of personal average
  • Highest reduction in use


We started with Google App Engine. We wrote an app that would provide a web-based way to specify groups of CurrentCost users.

The app accesses the CurrentCost readings for these users from the broker, and analyses them against the achievements we’d defined. The scores are then stored in the Google App Engine database.

But how to report the results to users?

As our aim was to help encourage and motivate people, we didn’t want to create a whole new site as a stand-alone thing that people would have to remember to visit.

Instead, we wanted to find ways to put this in places where people already go.

Firstly, twitter. Every good hack needs a twitter element!

All members of a CurrentCostLive team could follow a twitter bot for their team, which reported scores, winners and losers as twitter messages. It could even send you @replies or dm’s with advice for how to save electricity to users who aren’t doing too well.

Secondly, widgets and gadgets. We liked the idea of modules for each achievement that could be included in people’s blogs or social network sites. If you put your electricity usage on your Facebook profile where everyone can see it, maybe that would encourage you to try and reduce your usage?

As an example of this, we tried to write a few iGoogle gadgets. The vision was that you would be able to choose which achievements you are interested in, and add these to your homepage – moving them around wherever you want.

Thirdly, on your TV. Steve Godwin was kind enough to let us reuse his (prize-winning!) hack that lets you add a twitter feed to your digital TV – so that the text comes up on screen while you watch your program.

Using the twitter feed we could set up for each CurrentCostLive team, this would let you see on TV how you and your friends are doing in your CurrentCost challenges as they are completed.

That was the idea we presented. Unfortunately, we had some hassles with Google App Engine, so some of the links between the bits needed to be faked for the demonstration, but most importantly, the idea seemed to capture people’s interest.

Chris was cruel enough to record my on-stage ramblings, so a video of this presentation has found it’s way to YouTube. I’m sure my voice doesn’t really sound like that… :-)

Tags: , , , , , , , ,

17 Responses to “Our Mashed 08 hack: CurrentCost Live”

  1. […] with Dale. Mashed2008 was my first, and it certainly will not be my last. We hacked together a current cost idea, and won! However that was not this hack. On the train on the way in I was discussing some simple […]

  2. […] now called Mashed, and it was great to hear that CurrentCost mania is continuing to spread, with Rich and Dale’s CurrentCost Live project winning the Guardian prize! (See the presentation that led to fame and fortune on […]

  3. Phil Wilson says:

    Presumably you don’t have it connected directly to your slug though, do you? Unless you’re going through an arduino on the way maybe? I just got my currentcost and already have an always-on slug so connecting the two would be perfect.

  4. Phil Wilson says:

    Oh wait, you’re probably using the official cable, then (from your other blog post) I see you’re using a serial-usb converter to connect it to your slug. Although I’m not sure I’ve uncovered the place to get the drivers from quite yet. Also your sidebar link “my feeds” is broken since share.opml.org went off the air a little while ago.

  5. dale says:

    @Phil – yup, the slug is connected to the CurrentCost meter using a daisy-chain of two cables – a RJ45 to serial cable connected to a serial-to-usb adaptor cable that I got from Maplins

  6. Phil Wilson says:

    and then polling the port “just works” ? Sorry for all the questions, but all the vital info seems to be reasonably spread around multiple blog posts on multiple blogs. I don’t suppose there’s a wiki somewhere?

  7. dale says:

    yeah, I open the serial port and just listen for what comes down.

    I don’t know of any external wiki – we do have an intranet one at work that has a few bits and pieces, but to be honest most stuff has been blogged about externally. As you say, though – it’s fairly spread about.

    There is a Facebook group as well, which might be a useful place to ask questions.

  8. Roo Reynolds says:

    I don’t know who set it up, but swik.net/currentcost is worth looking at. It needs some love though.

    Congrats on your Mashed entry. Very very cool.

  9. MrHappy says:

    Does anyone know the correct serial port settings for the unit itself? I’m trying to read the input in VB6 but i’m just getting jibberish, it always gives me three lines of assorted ASCII characters. I’ve tried every combination I can think of but getting no where… – 9600, N, 7, 2 is the closest I can get to normal letters but it still doesent represent anything.

    Thats if I ain’t damaged it as when I first got the thing I plugged it straight into a router, when I realised that did’nt work I forced it open with a stanley knife to get some more info as I had no idea who made the thing!

  10. dale says:

    @MrHappy – There are a couple of models of CurrentCost meters around. Some of them are 2400 baud, the newer ones are 9600.

    I have a 9600 baud model, and connect to it from .Net apps (in C#) using:

    SerialPort serialPortObj = new SerialPort();
    serialPortObj.PortName    = "COM20";
    serialPortObj.BaudRate    = 9600;
    serialPortObj.ReadTimeout = 1200;
    serialPortObj.DtrEnable   = true;

    Hope that helps.

  11. MrHappy says:

    dale…thanks for the guidance but i’m still getting rubbish outputted by it (both at 2400, 9600, different parities, different data bits and with the simplest VB program you could ever have), I think I might go for a new ser-usb lead tommorow as the one im using at the minute was extremely cheap and I would’nt be surprised if that was at fault and not outputting TTL signals – or I build the MAX chip into the plug. Cheers.

  12. Laura Cowen says:

    I love it! It’s a fantastic idea. :)

    And you’re right, you don’t really sound a lot like that… Less echo normally, I think… 😉

  13. Phil Wilson says:

    As promised, I gathered some of the more pertinent links together here: http://currentcost.pbwiki.com/ it’s probably wildly inaccurate but it’s half-midnight so I think I can be excused 😉

  14. […] played with ways that CurrentCost users could compare their usage with their friends for a […]

  15. […] Current Cost so there’s plenty of guidance on the web about this – they even won a prize for hacking the machine and sharing the data. There’s also a […]

  16. […] our power usage with each other, and I showed some of the slides from Mashed where we tried turning energy monitoring into a competitive group activity to encourage and motivate people to use less […]

  17. […] much all you need to know is covered over at Dale Lanes’ blog in this post.? Worth mentioning is that I picked up the current cost device from the eco gadget shop, which […]