Can I install my own energy monitor?

23, May. 2024

 

An electrician can't help you here.

Those CTs cannot be fit on panels of this style.

What you have here is an "all-in-one" combo/everything meter+main+panel.

As such, the connections from meter to main, and from main to branch circuit breakers, are rendered as "bus bars" which are part of the structure of the machine. They are not wires, cannot be made into wires, and cannot be clamped.

It isn't going to happen. I'm sorry.

The only way to use a Sense or competitor power monitor is to put a CT on each branch circuit. Which in turn requires the power monitor to support a large number of branch circuits. However we can work around this a bit:

  • Note that 240V circuits without neutral only need 1 wire clamped, however you must configure the software to say that's a 240V circuit.

  • 240V circuits with neutral need clamps on both hots if you want exact resolution, but you don't need that on a range/oven because the only 120V/imbalance load is the oven light, and on a dryer clamping 1 wire will result in 10-20% inaccuracy. (the tumble motor would either be not counted, or counted twice).

  • You can also get 240V loads accurately by running both hot wires opposite directions through the CT, and then configuring them as (paradoxically) 120V loads. This will count 120V imbalance loads once, but 240V loads twice since it goes through the CT twice. Hence you need a 120V multiplier.

  • If you're willing to sacrifice some fineness to reduce needed number of CTs, you can combine several branch circuits under a single CT. Polarity is very important here: wires from one pole/phase need to go one direction through the CT, and wires from the other pole/phase need to go the other direction. If this is wrong, loads on the circuit will subtract instead of add (e.g. a 1500W heater on 2 of the circuits would read as 0W instead of 3000W). Do some testing to validate that you got it right.

The "hail Mary" play is talk to your AHJ and power company

And you'll be familiar with the AHJ because of course you pulled a permit for this work LOL!

You would need to ask the AHJ for permission to route the CT clamps up into the "meter part" of the meter pan, because hopefully at the top of the meter are wires capable of being clamped.

And then, you would need to ask power company permission to do the same exact thing. Because they are responsible / have ownership of what happens inside the meter pan. Their seal is on there to detect attempts to steal power by bypassing the meter.

If both the city and the power company bless the venture, then you can install the CTs in a way which both find acceptable. You need both parties' consent because the power company won't work with you unless you have a permit.

Building a DIY Energy Monitor with a Raspberry Pi

Rob Hammond

·

Follow

5 min read

·

Sep 22, 2022

--

Incorrect data from our IHD (left) vs DIY homeAnalytics data (right)

Read instructions on how to set up your own energy monitor here

Background

Until January this year, electricity costs haven’t really been something I’ve paid much attention to.

However after installing a heat pump last year, and switching to an EV for our main family car in December 2021, the monthly bill for January hit over £500, which was a bit of a shock.

Receiving the bill, one other thing that hit me was just how opaque electricity bills still are in 2022.

The detail I got from Ecotricity was woeful — the raw number of kWh used, the cost, and a crude year-on-year comparison (useless as I hadn’t been with them 12 months):

Ecotricity bill detail leaves a lot to be desired

I wanted a better way to break this down and see what was driving the increased costs.

Existing Smart Meter Device

Our ‘smart’ meter device was supplied a few years ago, and shows real-time information on kWh consumed. But that’s about it —the device itself (a Chameleon IHD7) stinks — the tariff data doesn’t update if you switch suppliers (and there’s no over-ride option), doesn’t support peak/off-peak tariffs, has a horrible resistive touch screen and poor visuals.

A Chameleon IHD7 — a device straight out of the 1990s

Making a better Energy Monitor

Finding a data source for our electricity consumption was a long slog — Ecotricity have no API, but after a lot of Googling I found the Loop Energy app, which gave me access to almost a year’s worth of half-hourly usage data.

Loop had a couple of key issues though — they didn’t support custom tariff data, so their cost information was wrong, and they don’t offer an API, so getting that information programmatically was a problem.

I kept searching and eventually I found that every smart meter sends its data to an obscure data processing company called n3rgy. This is where Loop get their data from, and n3rgy offer a free (largely undocumented) API, with half-hourly usage data going back 90 days. It’s not real-time but does offer data with only a few hours lag.

Breaking down usage data

The next step was splitting out the consumption into different categories.

We have a reasonable amount of smart devices in our house, but no way to pull all the data together, so I investigated a bunch of options such as HomeAssistant and HomeBridge, which are great, but didn’t offer the analytical approach I was after.

After playing around with MITMProxy and some Python packages though, I managed to get enough incoming data from other sources to make the idea of building something bespoke worthwhile.

Building the homeAnalytics Energy Monitor

With this in mind I started putting together a rough idea of a website for my local network that I could run on a Raspberry Pi and check in on occasionally.

Once I had a basic project up & running, it occurred to me I could probably build an In-Home Display (IHD) better than the Chameleon smart meter if I put a display directly on the Pi . I found a decent capacitive touch display for £40 at The Pi Hut.

After a good deal more hacking away, I now have an IHD that not only gives me an overview of my energy usage, but also shows a split of where that energy is going:

Breakdown of where energy is going shown on the home-brewed IHD (right)

Now the basics were in place I started exploring other useful smart home info it would be cool to see in my DIY IHD.

One thing I like about EVs is the ability to check if I have enough fuel to get me to a destination without opening up the car. But opening up an app is a pain, so an IHD is a perfect place to passively monitor state of charge.

This is especially useful now I’m on a variable rate tariff with Octopus Energy, so I can reduce the amount I have to charge on the peak rate.

At-a-glance state of charge info for EVs in homeAnalytics

Conclusion

The software behind the Pi display is homeAnalytics, and can be used entirely free of charge. It offers not just the Pi display, but also a Google Analytics-style web interface where you can do deeper analysis of your energy usage:

homeAnalytics web UI

I’ve hacked together a lot of stuff over the years, but building for a small, always-on, fixed-size screen was a new experience — there were some different rules to play by:

  1. Use black as the background colour — initially using white caused a good degree of glare in the evening coming from the cubby hole where the Pi is kept
  2. Information density must be very low — every time I wanted to add in a new metric, I ended up either cutting it down or removing it entirely
  3. Perfecting the layout can turn into a frustrating battle with available pixels vs CSS rules, but at least responsive layouts aren’t a concern
  4. Useful/interesting information needs to have a reasonable freshness — ie data that is only updated on a monthly basis becomes stale and uninteresting quickly

There are many more interesting things that can be done with the data being collected by the homeAnalytics project, and hopefully it can be part of a push to democratise energy usage data, increase energy efficiency and bring home energy reporting into the 21st century.

Can I install my own energy monitor?

Building a DIY Energy Monitor with a Raspberry Pi

For more information, please visit Igu-16hr 3c Node, Smartsolo Igu16's Nodal Seismic Instruments, SmartSolo Devices.