Friday, June 6, 2014

Neurio Home Intelligence - Power Usage Monitoring Beta program



Several months ago, I found an interesting project on Kickstarter called Neurio (their Kickstarter page is still available here).  Their current web site is here

Basically what they were proposing was to monitor your home energy usage and then be able to identify individual items in your home by their signature power usage.  Sounded interesting so I contributed $120 to the cause.  They went on to almost triple their goal!

So, a couple of months later, they were looking for people to participate in their beta release.  Sounded interesting to me but you had to pay an extra $120 for a ZigBee router in order to be able to communicate with their beta release of hardware.  Ok, but it still sounded cool, so I went for it.

Around the end of April my kit arrived.  A black box, a white box and 2 inductive sensors.  I installed it fairly easily in my electric breaker box.  In the picture below, I've circled the black box and the 2 inductive sensors (which connect around the 2 phases coming into my house)


The white box that came with it was the ZigBee router that I plugged into my home network upstairs.  
After a little fiddling to get it to accept an IP address, it started working.
I had to register on Neurio's beta web site and then they started displaying a live data feed of my power usage.  Pretty cool!  There was a bit of a lag initially (about 20 seconds) but I could see the graph respond as I turned on and off devices.

So of course, that wasn't good enough for me.  They had and API in the works, but it was still weeks away from delivery.  So I started poking around in the ZigBee router and discovered that it supported SSH and that there was a log of ZigBee packets that it was forwarding on to Neurio.

Coming from a networking background, I recognized a packet when I see one.  With a little help from the engineers at Neurio, I was able to parse the packets passing through the ZigBee log file and create my own local database of my power usage.

I was able to fairly quickly generate graphs of my usage and then I started stumbling around trying to create some kind of algorithm to identify individual appliances in my house.  Not as easy as it sounds.  After a couple of weeks of working on this on and off, I pretty much gave up.  The Neurio guys have specialists in pattern matching and machine learning, so I won't waste any more of my time trying to hack something together.  I'll wait for the API for that part.

However, by this point, I had a week or 2 of accumulated data and I started playing around with displaying it in various interesting ways. 

First problem was the incredible volume of data.  The sensor was sending a ZigBee packet every second (roughly) which means 86400 data points every day.  My SQL database was fairly quickly approaching 1 million rows!  Trying to parse and graph data from it became prohibitively slow.  

My solution was to create a separate database with summarized data in it.  I wrote a little script to sum and store the data into 1 hour blocks.  For historical data, that's good enough.  I don't need to keep 1 second granularity for my power usage last week.  So every day a cron job launches the script that summaraizes the previous day of data and flushes out the oldest day.

Here's what it looks like:


Check out my YouTube channel:   
www.youtube.com/KedarWarriner



No comments:

Post a Comment