![]() |
|
|
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")
Update
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!
Current Cost www.currentcost.com home energy monitor is a product for the UK market. However, they do sell a unit for the USA, which has 2 CT clamps. You can find it at http://www.sre3.com/
The SRE device looks like a CC128 Envi which has a different output format than the Classic. This isn't currently supported by my Home Energy Monitor. I now have access to one of these - so this will come at some point - just have to hide my LabVIEW addiction from my wife for a while! If you get one of these - I suggest you use my code as a start and get into DIY LabVIEW!
In a previous comment David Wisti pointed out the SRE device which is actually a CurreCost Envi see my comments on that. Otherwise I haven't really surveyed what's available in US. The key to this is finding a device that can beconnected to a PC. I have seen stuff on the Web about The Energy Detective (www.theenergydetective.com). This can beconnected via USB - however their API is not public but I think you can request to get access to it. You could use my code as a starting point but then you would have to DIY it from there!
There's a lot of companies that make such (or similar) energy monitors (in the USA) e.g. http://www.energyinternet.com/ , http://www.agilewaves.com/ , http://www.getgreenbox.com/ , http://www.energyhub.net/ , http://www.theenergydetective.com/ and more... but if you want to write your own applications to play with the data, make sure that you get a device that can communicate with a PC and allow you to read the data in user-friendly format.
Ian,
Once I receive the CC128, I plan on using your code as the starting point. I think SRE has the classic too but I wanted to get the new one. I looked at other devices here in the USA but none seem to have a public API like the currentcost meter. Plus you can measure 3 phase with this meter, if I get another CT clamp, which might come in handy some day. I think you can upgrade to the CC128 without having to get a new transmitter for only £22.50.
Sorry to ask newbie questions, but when I download "Home Energy Monitor-4.ZIP" I don't understand how to install on my Vista setup. All there is are .vi files and other types of files which Vista says it doesn't recognise, and none of them are .exe files. Once I've downloaded "Home Energy Monitor-4.ZIP" and unzipped it, what do I do?
Thanks for downloading my Home Energy Monitor example program for National Instruments LabVIEW. It is intended for existing users of LabVIEW who like to DIY their own solutions to problems. LabVIEW is a graphical programming language used by engineers and scientists to develop measurement, control and embedded system software. If you are an academic or student you may have access to LabVIEW via your university or school. Also, if you are a student you can get hold of the LabVIEW Student Edition at price that suits the student pocket. Otherwise you can evaluate LabVIEW using the resources at ni.com/trylabview. The "Home Energy Monitor" program is supplied as LabVIEW source code - so you will need LabVIEW to get it working. Thanks again.
This is awesome. I love the concept of using social networking for machine communication. I am thinking about adding a Twitter output from the sprinkler system. Thanks for posting this, keep up the DIY work