electrical meters
| |

Monitoring Energy Usage in Home Assistant

TL;DR: Use an RTL-SDR receiver with rtlamr2mqtt to read your electric and water meter broadcasts directly into Home Assistant – no meter modifications needed.

Disclosure: Some links on this page are affiliate links. If you purchase through these links, I may earn a small commission at no extra cost to you.

Prerequisites

With an upcoming solar installation, I also wanted to be able to monitor my overall energy usage via Home Assistant. There are multiple ways to integrate this, most of which are listed in Home Assistant’s electric monitoring guide. My electrical meter is on the outside of the house, having to install a device there to read the counter or the LED was a non-starter for me. There’s many nice tools that will integrate with the electrical panel, and give you monitoring per circuit for additional data. However, these have a higher startup cost, and require a lot more work to integrate. After much research I landed on the rtlamr2mqtt integration, which is not listed on Home Assistant’s page as a recommended option, but is a relatively inexpensive and easy method for reading meters if your utility providers use compatible meters.

Both my electrical and water meters are broadcasting a signal for the utility company to read. For my setup I ordered an RTL-SDR Blog V4 and a RTL-SDR Dipole Antenna Kit. Once I had it connected to Home Assistant it was simply a matter of installing rtlamr2mqtt and setting it up:

Note: Stop the add-on when making changes to the configuration. I struggled at first to get my edits to stick, and this was because it will not save properly if the add-on is running.

To find the locally broadcasting meters set the configuration to:
listen_only: true
Then monitor the add-on logs to confirm you are receiving the IDs of your meters. These IDs should likely be visible on your meter as well. I was picking up a few of my neighbors’ meters too, so be sure to confirm which is yours before adding them in the configuration. Looking at the screen on your meter itself should also help you confirm the format. My electric meter, for example, outputs data in full kWh without a decimal.
Be sure to turn listen_only to false again when adding your devices to the meters portion of the configuration.

Home Assistant Energy Monitoring Configuration

YAML
general:
  sleep_for: 300
  verbosity: debug
  listen_only: false
  tickle_rtl_tcp: false
  device_id: single
mqtt:
  ha_autodiscovery: true
  ha_autodiscovery_topic: homeassistant
  base_topic: rtlamr
  tls_enabled: false
custom_parameters:
  rtltcp: "-s 2048000"
  rtlamr: "-unique=true"
meters:
  - id: #water meter ID#
    protocol: r900
    name: water_meter
    format: "#####.##"
    unit_of_measurement: ft³
    icon: mdi:water
    device_class: water
  - id: #electric meter id#
    protocol: scm
    name: electric_meter
    format: "######"
    unit_of_measurement: kWh
    icon: mdi:meter-electric
    device_class: energy

This adds two MQTT devices to Home Assistant.

Which can then be configured in the Energy configuration screen:

The downside of monitoring the meters this way, as opposed to some other monitoring options, is mine only report on the full kWh. So, while my hourly usage at these times is generally around 1.5 kWh, the graph shows up like this:

Not really a big deal, but for a lover of data it’s less precise than I’d like at this hourly time-frame.

Tracking Individual Device Energy Usage

The energy monitoring dashboard also includes the ability to monitor individual devices, or groups of devices. For these devices I utilize Sonoff S31s, they provide energy tracking as well as switch functionality in HA. They are easy to flash to ESPHome, just follow this guide. This also lets me track a group of devices, as a whole. For example I track my “desk’s” electrical usage, which is combination of my work laptop, home laptop, and any peripherals that may be on my desk at the time.

I also wanted to track my smart home data closet’s electrical usage (Smart Home Energy Usage in the chart above), which includes networking equipment, Home Assistant, Proxmox Beelink mini-PC, and a Reolink NVR. For this I utilized Network UPS Tools through Home Assistant, this keeps my home automations running for a short while if I lose power, while also giving me energy tracking.

Some devices in my house also track consumption natively. Like the Tesla Wall Connector or my Rheem heat pump water heater. Where possible, especially with the Tesla device, I have the devices segregated on an internal-only network. This way they can’t communicate out to the internet directly. This works for all my ESPHome devices, but isn’t possible with all IoT devices. This was easy to setup with my Unifi home network.

Your Complete Home Assistant Energy Monitoring Setup

Your setup will now:

  • ✅ Read electric meter broadcasts every 5 minutes
  • ✅ Read water meter broadcasts (if compatible)
  • ✅ Send data to Home Assistant via MQTT
  • ✅ Display usage in the Energy Dashboard
  • ✅ Track individual devices with smart plugs
  • ✅ Monitor without modifying your meters

Useful Links:
GitHub Config Files – Sanitized configuration files from this tutorial
rtlamr2mqtt – The add-on used for meter reading
Compatible Meters – Check if your meter is supported

Hardware:
RTL-SDR Blog V4: Amazon
RTL-SDR Dipole Antenna Kit: Amazon
SMA to BNC Adapters (optional): Amazon

Related Posts:
Making Simple Mini Splits Smarter – Control mini splits with ESPHome IR

Similar Posts

Leave a Reply