Project: Build your own Home Energy Monitoring System

Energy prices are on the rise, and it’s becoming increasingly important for homeowners to find ways to manage their energy usage in order to save money on their utility bills. One solution that has gained popularity in recent years is the use of home energy management systems.

Home energy management systems (HEMS) are devices or software that allow homeowners to monitor and control their energy usage in real-time. These systems typically include a combination of hardware (such as smart meters or energy monitors) and software (such as mobile apps or web portals) that work together to provide detailed information about energy usage, costs, and potential savings.

A Belgian digital meter

In Belgium, the government is rolling out digital electricity and gas meters to its citizens. These modern meters allow for HEMS to be connected to them using a P1-port. My house already has this kind of digital meter, so it was always in the back my of head the plan to do something with it, and gather insights about my own energy usage. My home doesn’t have a lot of smart appliances that can be used with a real HEMS system to control the energy usage, but that doesn’t mean we cannot monitor it.

Starting January 2023, the VREG (Flemish energy regulator) introduced a new calculation for calculating a part of the network tariffs that every household pays, called the capacity rate. The network tariff is now calculated not only on how much energy your household consumes, but also in part on your peak usage per month. This peak is calculated per 15 minutes, and your tariff will depend on the highest average KwH consuming 15 minutes of the month. The capacity rate has a fair goal: to motivate household to not stress the electricity grid, to spread their usage and to incentivize consuming electricity when your solar panels are generating energy, not when your consuming from the network. This capacity rate can be monitored by the digital meter as well, as the tweet below by @RubenPeene explains.

So this is why I’m starting a new project, called Build your own Home Energy Monitoring System. It’s not a real HEMS, the focus is on monitoring, not managing, but we’ll see what we can get.

The goal

If I reach the goals below, I would have a full view on my households energy consumption, what the peak usage is and most importantly what caused them. This way, I can improve my energy usage and lower my energy bill.

The goals are:

  1. Create a dashboard visualizing my electricity and gas usage. This dashboard should show the amount of KwH I’m consuming from the grid and how many KwH my solar panels are producing. I’ll be able to see the overproduction of solar energy that I’m sending back to the grid, and can optimize my energy usage to consume more when I’m producing energy, rather then when I’m consuming from the grid.
  2. Create an app that allows me to store when I’m using which appliance. It should be a simple app, where I can indicate that I started the washing machine at 9PM and it ran for 3 hours, or when someone has taken a bath. By knowing which appliance is running when, I can plot this on the dashboard and have a view on the impact of the appliance on my usage.
  3. Create a dashboard and alerting system for the capacity rate. As the tweet above stated, I can use the data from the digital meter to get a view on my current monthly peak and the average peak for the current 15 minutes. If the average of the current 15 minutes goes above the peak, I still have the remainder of the 15 minutes to lower the average, or if I don’t, I’ll at least have a view on what caused the peak and learn from it.

The result of goal 1 and 2 should look a bit like the image below:

Source: VREG

To reach these goals, I plan to set up all components in a Low-code way. My coding skills are rusty, so we’ll use whatever low-code or SaaS tools we can get to get the job done. I’m saying Low-code, and not no-code, because unfortunately, we’ll need some scripting to get the data from the digital meter and parse it.

The plan

A high level overview of the steps I intend to take:

  1. Connect Raspberry PI to the P1 port of the digital meter
  2. Read out the sensor data and parse it
  3. Set up InfluxDB and Grafana on the Raspberry Pi to visualize the data and explore it.
  4. Export the data to an Azure service to have it available in the cloud
  5. Set up a low-code app to register the usage of appliances
  6. Build a dashboard in PowerBi or similar to bring this all together.

Each of the steps below will result in a blogpost with detailed descriptions so you can follow along. I plan to publish one post per week.

Prerequisites

I needed some hardware to set this up. The 2 main parts that we need are:

  • A raspberry Pi: This small computer will be hooked up to the P1 port of the digital meter, allowing us to read out the sensor data.
  • A P1-cable: I bought one of Amazon. It’s a P1 to USB cable, that we’ll connect to the P1 port of the digital meter and the raspberry Pi.