I posted this originally in the discussion forums - but I think it really belongs as a document.
I got this "free" home energy monitor from my energy supply company. It's actually developed by Current Cost www.currentcost.com. Two basic parts. A current clamp with a wireless transmitter which you fit over the incoming supply cable plus a display unit which you can site anywhere in the house. This unit displys current power, and (if you put in the per kWHr cost) the cost per and per month of the current power consumption. It also keeps track of historical data and temperature. Of interest to the DIY LabVIEW developer - it has a serial port on an RJ45 connector. So I bought the serial - USB cable from their ebay shop. Plugged it in. And after googling for the driver (their new website is much better), fired up a simple LV VI and grabbed some data.
Turns out the device transmits a set of data in an XML format every 7 seconds or so. It is a very simple format and - although I might convert it to the LabVIEW XML library later - for now I just parse that string with standard string handling functions. (Look.....it's not that the XML library is hard to use... its just overkill for this....anyway I first learnt LabVIEW 15 years ago and I can "do" the string functions in my sleep....aaahhhh yes that's "real" LabVIEW programming...from the GPIB era... when there were only a few instruments drivers....ooops sorry drifted off for a moment there). On further reflection - I am going to stick to the string functions - moving to the XML library will make the app Windows specific. There is no reason this shouldn't work on MacOS or Linux.
So I now have a little LV program that gets the data and displays it graphically. (see screen shot below). Also used it with the built in web server so I can check on it remotely.
Now - the point behind this is ....once you start monitoring power usage you want to reduce it. To do the monitoring with LabVIEW needs the PC to be on and that consumes around 100W... all the time ... and that costs - you get the idea. So next step is to get this working on my home built Windows Home Server system, which is power optimised and is on all the time. Then - add some proper historical logging and long term trending, send usage email reports, text message alerts. Perhaps it could automate yelling at the children when power usage goes over a certain limit It's at this point that your other half starts to mutter - "LabVIEW all day and now all night.... you're addicted!".
Oh well output of the addiction is attached. ("Home Energy Monitor.zip")
The original Home Energy Monitor program has now been updated. Not really tackled much of my "Version 2 feature list" except for a couple of minor mods too make it work OK on Windows Home Server (which is a thinly disguised Windows Server 2003). But I have added the following:
This new version is attached below as "Home Energy Monitor-4.ZIP" and see screenshot below
It is an interesting experiment and an evolving "meme" - this idea of bringing together personal energy use and social networks. It is really powerful to be able to compare our energy profile against other homes in UK and around the world.
I am questioning whether running this on the Windows Home Server machine is really the best from an energy efficiency standpoint. Having the program has given me much greater insight into our energy usage and looks like it has stimulated at least a 15% reduction. But it now looks like at least 20% of our background electricity use is down to the server. I am now looking at running this on a really low power (15W) machine - but it ships with Xubuntu Linux - but apparently it will run XP. I will get around to testing the app on Linux at some point.
Another potentially big job is to get the program working with the new CC128 "Envi" device. This has much expanded I/O, the imminent luanch of indvidual device monitors and even an OEM/"hobbyist" board with 2 AI and one DI which can be paired with a channel.Slightly annoyed that the new device's XML output format is not an extension to the original but is different in structure.
Note - latest version is attached as Home Energy Monitor-4.ZIP
Update - 5th August 2009
Breaking news - the application has now been tested on Linux. The project as attached below will open and run in LabVIEW on Linux although depending on what fonts you have instlled and how your distro handles them, you may have to makes some cosmetic tweeks. This was tested on OpenSUSE 11.0 with LabVIEW 8.6.1. This is one of the officially supported distros so getting LabVIEW and NI-VISA installed was no problem. (I recommend using NI-VISA 4.5.0 and above with this version of OpenSUSE)
The app as it stands does try to detect whether it is running as a standalone program or in LabVIEW itself as this affects how the app stops. Right now this detection doesn't work correctly on Linux (not a bug in LV but an issue in my code) so when you hit the stop button it will shut down LabVIEW! A fix for this will be in the next version.
It would be great if someone could try this on a Mac and let me know if it works!
Update - 21st December 2010
In the newsletter that's just gone out the Home Energy Monitor got number 1 in top 5 Example Codes for 2010!
Now I feel guilty about lack of updates.
First - if you use the program you will have noticed that since August the Twitter functionality stopped working. Twitter changed how apps are authenticated from very simple to pretty complex. For now - you will just have to turn Twitter updates off whilst I try to get my head around OAuth (or find someone inthe LabVIEW community who has done it already).
Second - I have actually been working on support for the Envi or cc128. Think it's basically working. Needs some more testing which takes longer because of how the history now gets updated. Will continue testing and cleaning it up and then hope to post a new version that supports both Classic and Envi in new year.
Update - 18th November 2014
At the request of one member of the community - I have now posted VI's with support for the later CurrentCost Devices like the Envi. I cannot guarantee that these work perfectly with the latest devices as my newest CurrentCost is over 4 years old. At least they will give some indication of how to accomodate the changes to the protocol - especially how the longer history functionality is managed.