Energy DisplayA few of the regular readers of this blog will know that I enjoy using a Web Energy Logger to track information about my home. Not only does this device track temperatures, but I also use it to interface with a Continental Control Systems WattNode. The WattNode allows me to track my energy usage on a minute by minute basis.

Of course, once you have all of this data, you need an interesting way to display it. I originally purchased a Samsung Galaxy 7” Tab, but found the Android operating system difficult to work with. I also found the touch screen to be much less responsive than the iPhone I was using on a daily basis. So I ended up returning the Tab, and I purchased a refurbished Apple iPod Touch (4th Generation). The iPod Touch included a retina display, which was clearly a better screen than any other off-the-shelf LCD I could buy elsewhere.

A graph showing sample electrical usage dataThis meant that I needed to get my energy usage data from the Web Energy Logger to the iPod Touch screen. I ended up using the Web Energy Logger’s XML file capability to generate an XML file that I could parse with a PHP file for use on a simple web page (which I created using iWeb).

Energy Display

The PHP file I used contains some very simple code:

<font face=”helvetica, arial”>
<?php header(‘Refresh: 15’); ?>
$mydata = simplexml_load_file(‘http://[my internal IP address]/wel.xml’)
echo ‘<p align=”right” style=”font-size: 80pt;color:’.$color.'”;>’.round($mydata->device[28]->value).'</p>’;

Remember, I am not a professional software creator. This code worked, and created something I could insert inside an iframe on my web site.

To host the web site and the PHP scripts, I set up a Raspberry Pi powered by a 50 watt solar panel and 20 Ah Lithium battery. For more information on how I set this up, please read this post. I then set the iPod Touch browser to point to the page hosted on the Raspberry Pi. I did have to run a power cable to the iPod Touch, but I spliced in a four-line telephone cable in the middle of my Apple USB power cord, and it worked well.

The web page that was created is shown below. When the solar panels are generating power, the solar power number is positive and if the solar power is higher than the power we buy from the grid, the grid power number is negative (and green, to indicate we are selling power back to the electric utility company). When we are using grid power that we are purchasing, it shows up in red, indicating it is costing us money to provide electricity to our house.

I ended up putting the iPod touch inside a maple wood frame, and hanging it on the wall with some hook and loop fasteners. This way I can remove it to make changes to the iPod Touch. Using either Atomic Browser or iOS 6’s Safari, I can display the web page full screen on the iPod Touch.

A display showing energy consumption



2 Responses

  1. Nice.

    Do you know about OpenEnergyMonitor? It’s a project that has created an open source energy monitor. It looks very similar to the Web Energy Logger but rather than costing $500 it costs $100. You also get the fuzzy feeling of helping an open source community… 🙂

    • Thanks, I had only briefly heard about OpenEnergyMonitor, but I don’t think it was available when I first tried the Web Energy Logger. It certainly seems worth checking out, and I’m all for working with the open source community. As you can see, everything on my site is open source as well.

Leave a Reply

Your email address will not be published. Required fields are marked *