Tag Archives: Ax

Reading a Rainforest Automation EAGLE with a Jace

I’ve always been concerned about utility use in my house.  With a wife and a couple of young boys, keeping our utility bills under control can be a challenging task.  I’ve put together a few projects in the past to help monitor our consumption as it’s happening, and they’ve generally helped identify energy hogs and bad practices in my house.  The solutions I’ve come up with in the past were fairly rudimentary, and weren’t easy for my family to read.  I wished there was a simpler way to read the consumption information off the shiny new “smart” meter that our friends at our local utility installed.  It collects a bunch of really cool data that they let me access the next day or so on their website, but that doesn’t help me identify problems that are happening right now.  If only there was a way we could pull that information in near real-time, we could do some really neat stuff with that.

Enter the Rainforest Automation EAGLE.  What a cool little device!  It communicates directly with the main electric meter at my house via ZigBee, and pulls off the one thing that was of real interest to me – current demand.  The folks over at Rainforest make several different devices that help accomplish this, but the Eagle was the one that interested me the most.  It’s a stand-alone device, and they have an API that lets me pull basically whatever data they get off of my meter into whatever I want.  I won’t go into the minutia of how to set the device up – the Rainforest documentation is more than adequate for that – but I will tell you the whole process took less than 10 minutes.  If you’re interested in monitoring your demand, and you’re lucky enough to live in one of the areas served by the utilities that support this device, I highly recommend you pick one of these bad-boys up.

Once I had the Eagle up and running, it took a little bit of work to get the data from the device into the Jace I have at my house.  I am working on getting all my utility information collected using the Jace so that I can eventually build a portal for my house that I can use to do all my monitoring and control.  This was the first device that I started reading via the Jace, and it was simple to get up and running.  The Eagle reports using a simple XML structure that can be accessed through a few different methods, all of which are published on the Rainforest Automation site.  It’s easily read using the simple Niagara XML parser.  The great thing about reading this data into the Jace is that we can then perform other calculations and store our data using the capabilities already present in the Niagara platform.  Right now I’m only trending  the current consumption data, as I have been buried in other projects at work and haven’t had any free time to really dig into what I can do with the Eagle.

I’ve done some rough comparisons between what the Eagle is telling me the meter is seeing, and what my e-Monitor is reporting, and the good news is they’re usually reading within a few percent of each other.  Since the e-Monitor averages its readings and the Eagle output is real-time, it’s expected that they’d be slightly different.

If you want to use the code here in your own Jace, you’ll have to create the program object, change the IP it looks at, and make sure you create the necessary slots as well.  Here’s a screenshot of the Slots tab so you can duplicate it.

Slot Tab

The only thing I’ve had a problem with so far is that the query occasionally hangs up – I’m not exactly sure why.  I inserted a check into the program to try to force a re-query, but apparently that’s not bulletproof.  I’ll put a little more effort into it when I get some free time.  For now, here’s the code, feel free to use it and let me know if you see where my hang up is.

Program Code