Monitoring energy usage was always something handled by the supplier, and it was no different in the UK. We had to submit regular energy readings for gas and electricity, which were then used by the supplier to calculate how much you've used. Then came smart meters, which provided these companies with reliable and accurate data on usage for each customer. It also allowed us consumers to view live data with small connected displays.

The problem is these small displays are anything but brilliant. They frequently crash, sometimes don't connect to the meter, and are just not that enjoyable to use. Plus, when you're building a smart home with Home Assistant, there's almost no way to integrate it into my energy monitoring stack, which consisted of some smart plugs to track some energy usage on a per-device basis.

That all changed when we had an Aiko solar panel array installed on the roof, alongside a hybrid inverter and battery packs from EcoFlow. The inverter had a cloud connection to our EcoFlow account, enabling us to monitor how the system is performing (and how much we're pulling from within the house) in real time. This got me thinking, "How hard would it be to get this all displayed and tracked through Home Assistant?" Turns out, it wasn't that difficult at all.

What I wanted to achieve

See how much we're generating and using

Traditional meters were a hassle to deal with and often placed in downright strange locations. Smart meters are great, but the data can be delayed, which was the case with our Octopus account. We'd only be able to pull data for the day prior, and this would come in a single reading, not split across the 24 hours. This rendered the data almost useless for what I wanted to achieve with Home Assistant.

The platform is incredibly versatile, so I have almost everything running through it. Home Assistant is great, and it would be that much better if I could provide an easier way to glance at live and historical data for our energy. We had the PowerOcean inverter for solar, import/export, and usage, and Octopus Energy for tariff data. Thankfully, there's a community-made integration for both.

It was relatively simple to configure Home Assistant to take input from the array of sensors exposed by the PowerOcean integration, but I did encounter a few hurdles that required overcoming to get it all working just right. I needed to get this working, as our entire cottage is fully electric. There's no gas. Our heating methods are rather rudimentary too, consisting of oil-filled radiators and log burners. We needed to keep tabs on energy usage.

👁 The HACS integrations page
6 of the coolest HACS integrations for Home Assistant users

Level up your Home Assistant game with these neat HACS integrations

The Lord of the Home: The Two Integrations

Pulling data from the cloud

For this all to work properly, I needed two integrations, one to deal with getting EcoFlow data from the PowerOcean inverter off our account in the cloud and down into Home Assistant. The second would handle fetching live Octopus tariff data for import and export, so we can more accurately track costs and earnings. If you have an EcoFlow setup and are using Octopus Energy, I highly recommend powerocean by niltrip and HomeAssistant-OctopusEnergy by BottlecapDave.

Once installed, the PowerOcean integration was able to connect and see our PowerOcean inverter on the EcoFlow account. Once the correct model was selected, it then populated Home Assistant with a few sensors. HomeAssistant-OctopusEnergy is also pretty awesome. After hooking it up to our Octopus Energy account via API access, it began providing Home Assistant with all the necessary tariff information. To make matters slightly more confusing, we have different export and import tariffs to maximize savings.

The majority of magic happens within the Energy Dashboard. All I needed to do was make the data work as Home Assistant prefers to work with historical data rather than live for specifics. So I created a package YAML file at /homeassistant/packages/ecoflow_energy.yaml with some handy sensors:

sensor:

platform: integration
name: "Grid Import Energy Raw"
source: sensor.grid_import_power
unit_prefix: k
round: 3
platform: integration
name: "Grid Export Energy Raw"
source: sensor.grid_export_power
unit_prefix: k
round: 3

These two are vital for tracking import and export, taking data from the EcoFlow inverter, and allowing Home Assistant to correctly track everything. It didn't quite work with what the inverter provided through raw sensors. And PowerOcean exposes a metric ton of them, including battery pack state of charge (SOC), state of health (SOH), cycle count, PV voltage, and other metrics per solar panel string, and many more. Depending on how you configure Home Assistant, it's possible to create quite a solar dashboard.

Bringing it all together

More accurate generation and usage

After I overcame a few minor glitches, including getting the correct and best data for tracking import and export measurements, everything just worked. I chose the corresponding grid connection sensors, added our raw PV data from the inverter for solar generation, and even configured predicted generation without requiring additional coding or integrations. Batteries were also fully supported here with charge and discharge data, though they're combined and not per pack.

Octopus Energy supplied the live rates for importing and exporting electricity, and EcoFlow provided all the data for the home. Home Assistant could then use both inputs and create the ultimate energy dashboard, negating the need to check our Octopus account or EcoFlow app for details. It's not quite local enough for those who would much rather remove cloud dependence altogether, but it's a start, and one I would certainly look into expanding to see if we can pull the data from the inverter without going through EcoFlow.

I love how Home Assistant displays all the data with a few views to work with. I can quickly glance to see how the system is performing, whether we're pulling too much power during peak hours, or if we're missing out on selling any excess energy back to the grid at the highest rate times. Once I've added a few more smart plugs to the house, we'll better monitor all usage and remove as much from "untracked consumption" as possible.

Home Assistant
OS
Windows, macOS, Linux
iOS compatible
Yes
Android compatible
Yes