Power and the Glory

Part 2 — Empiricists to the front

When we left our heroes — that’s my better half and me — they were pondering how to get rid of a cool 16,800kWh of power usage.

As we are both empiricists1 the first step after an observation is measurement. We subsequently ran around the house with a power meter, plugged it into wall sockets, plugged consumers2 into the meter and stood waiting with bated breath.

Whilst the breath is bated, let’s return, for a moment, to the house design. As is common in Sweden, we use a 230 volt, 3–phase alternating current system with 20 ampere per phase. A consuming device can therefore either pull 230 volt on a single phase, or 400 volts on three.3

Our stove, for example, runs on three phases and a common power meter plugs into a single phase wall socket. You see where this is going, certainly: we could, easily but with effort, get at the measurements for all the various wall sockets, lamps, phone chargers e.t.c. The small fry, in short. Even the air–fryer in the kitchen, which pulls 2000W, only do so in short bursts. The large consumers that run continuously mostly do so on three phase connections which are hardwired in the fuse box.

Before you ask: there are measurement devices, known as clamp meters, which can do what we need. All one have to do is simply cut open the cables to get to the wires … (yes, we have one of those too)

Back to zhe dravink board

Time to take this more seriously. The first problem was to find a way to measure consumed power in a reasonable and useful manner. Running around with a power meter (not reasonable) and writing down the measurement when we remember to do so (not useful) is out.

We dug. It was clear that we needed some way of measuring and storing without running us or cables ragged. Continuous measurements over time are to be preferred, so a fixed installation beckoned.

Wireless to the rescue with three technologies in the running: Wifi, Zigbee and Z–Wave. The two latter are both low–energy mesh–networks. The “low–power” bit worried us; the first floor is built of LECA blocks, a material not particularly polite to radio waves.

For wifi, on the other hand, we have a set of Unifi access points. Recommence the digging.

It turns out that a near perfect solution exist in form of the Bulgarian Shelly brand of wifi–enabled energy measurement units. They come in 1–phase (Plug S) and 1–phase for DIN–mounting (Pro 1M), and communicate quite nicely. Easy install, easy … well. Herein lay another rub. We can now gather information, but we still need to use it. Enter home automation software which can connect to stuff like the Shellies, retrieve values, present statistics4 and more.

Home Assistant

The software with the imaginative name competes directly with stuff like The Three Bimbos (Siri, Alexa and Assistant), Homey and SmartThings. The difference is, mainly, in that before you let HA loose on your living environment, you can actually study the things it’ll do to that environment as it is open source.5

In — very — short, HA, like the others, connect to sensors of different types and give you a reasonably simple way of collect, collate and use the sensor values for a variety of stuff. Such as figuring out where those 17k worth of ’tricity is going.

We started out by connecting the Nibe heat pump — integrations exist for the ModBus protocol. That way we could get at the most recent, most modern consumer which, traditionally, has also been the largest.

After adding the total usage, and the Nibe, plus a nasty amount of Yaml interspersed with ninja2–code we arrived at a reasonable interpolation of which is which. In the following chart, the black at the top is total (household), the red is the heat pump, the green everything else.

In the bottom graph the grey is the “everything else” from above, the green are the known consumers, and with red the ones we can’t pin down. The “unknowns” average 900W; 22kWh / day, or 7,800 kWh a year.

We kept at it. The conclusion, in the end, is that the FTX ventilation system from ’84 is the likely culprit.

Our next step is to fill the fuse box with DIN–mounted Shellies. Just waiting for the electrician to have an hour or two for the job …

Above and beyond

As you’ve probably noticed from part 1 of this rant, and which you most certainly will notice in part 3, all the details can be overwhelming.

One added benefit of all these integrations, bells, whistles and so forth is that Home Assistant can give us rather nice overviews of what’s what. No, the burglar alarms and cameras are not shown, thank you for asking.

We’ve perhaps gone a tad overboard on this, but we found cheap and very adaptable temperature and humidity sensors from Aqara, some nice moisture sensors from same; a Reolink camera or two … which, with Fronius, BYD, Hue and Skoda integrations all came with Home Assistant.

Win–win. Better control over our power usage, better control of temperatures, proper detection of water leaks and an IR controller for our older machines such as the ACC which use remote controls.

Perhaps, just perhaps, the Aqara roller shade thingamabob which, once the light level gets too high in the kitchen, run the shade down and, once the sun is below 19 degrees elevation pull it back up, was a little bit too much…:)

But it doesn’t stop there. In the fifth instalment we’ll have a good old summary. Upwards and onwards!


1 The empiricist is a person who trusts in empirical evidence; that is that which can be measured.

2 Yes, a “consumer” in this context is an actual consumer of something — electricity, to be precise. It’s not the sloppy definition of post–modern IT types.99

3 Actually … 230/400 with 16, 20 or 25A … just stick with the simplification, yeah?

4 We could have used the pyShelly library with some GnuPlot magic, but (a) it’s python (eww), and (b) GnuPlot is dark magic. Very, very dark.

5 Paranoia? When you set up your home automation to deal with stuff like ventilatin’, heatin’ and smoke detectin’ … there ain’t no such thing as paranoia. At –28C we do not want to fall foul of “license expired” level cr*p.

99 Yes, I know. Electricity is energy, and energy can’t be consumed per δQ = dU + δW … oh, heck, go read up on Noether’s Theorem and stop bothering me :) I’ve got no idea how that stuff work.

index
2009 — 2013 archive (aka "ye olde stuff")