Illustrated title card for the guide: Local-Only Home Energy Monitoring with Home Assistant
energy-monitoring

Local-Only Home Energy Monitoring with Home Assistant

Compare cloud polling, ESPHome, MQTT and built-in local APIs. Connect a meter to Home Assistant and check that fresh readings arrive without internet.

For local-only home energy monitoring, send meter readings to Home Assistant over your home network. Use ESPHome’s native API for a compatible ESPHome meter, MQTT if you want a local broker, or a built-in local API such as Shelly’s. Cloud polling needs internet access to fetch fresh readings. Home Assistant offline operation · Home Assistant ESPHome integration · Home Assistant MQTT integration · Home Assistant Shelly integration

Compare the four data paths

PathHow readings reach Home AssistantWhat must be reachable
Cloud pollingHome Assistant asks a cloud service for readings at intervals. Sense is one example.The cloud service over the internet. IoT classes · Sense
ESPHome native APIAn ESPHome meter pushes sensor changes over a direct connection to Home Assistant.The meter on your local network. ESPHome integration
Local MQTTThe meter publishes readings to a broker, and Home Assistant subscribes. An ESPHome meter can use this path too.The local broker from both the meter and Home Assistant. ESPHome MQTT · Home Assistant MQTT
Built-in local APIHome Assistant connects directly to the Shelly device. The Shelly integration uses RPC for Gen2 and later devices.The meter on your local network. Shelly integration

The Sense integration documents updates every 60 seconds for its active power sensors and every 5 minutes for its energy trend sensors. Home Assistant Sense integration

Check setup and authentication as well as the routine data path. For example, Home Assistant polls the Enphase Envoy over its local REST API. On Envoy firmware 7 and newer, the access token comes from Enphase’s cloud. Home Assistant Enphase Envoy integration

Connect an ESPHome meter directly

Start with an installed meter already configured to expose its sensors in ESPHome. The ATM90E32 documentation covers hardware such as the CircuitSetup 6-Channel Energy Meter. ESPHome ATM90E32 Power Sensor

  1. In ESPHome Device Builder, select Edit on the meter and configure api with encryption. Replace the placeholder with a key generated on the ESPHome documentation page. ESPHome Native API Component · Getting Started with ESPHome

    api:
      encryption:
        key: "YOUR_ENCRYPTION_KEY_HERE"
  2. Select Save, then Install to apply the change. Getting Started with ESPHome

  3. In Home Assistant, go to Settings > Devices & services. Set up the discovered device, or select Add Integration > ESPHome and enter the meter’s IP address or hostname. Use port 6053 if the meter uses the default. Enter the same encryption key when prompted. Home Assistant ESPHome integration

Send readings through a local MQTT broker

  1. Run a broker on your home network. Home Assistant recommends the official Mosquitto broker app where apps are available. Add the MQTT integration and let it set up the app, or supply your existing broker’s address and port, plus credentials if required. For a meter connecting to that broker, you can create an additional login in the app configuration. Home Assistant MQTT integration

  2. For an ESPHome meter, add the MQTT settings below to its configuration. Use the local broker’s address and the meter’s login if required. MQTT discovery is enabled by default on both sides. ESPHome MQTT Client Component · Home Assistant MQTT integration

    mqtt:
      broker: 10.0.0.2
      username: energy_meter
      password: !secret mqtt_password

    Replace the example IP address and username. Set mqtt_password to the meter’s broker password in ESPHome’s secrets.yaml. If the meter will use MQTT only, remove the api: block or set reboot_timeout: 0s under it. Otherwise the meter can reboot when no native API client connects. Select Save, then Install in Device Builder. ESPHome YAML configuration · ESPHome MQTT Client Component · Getting Started with ESPHome

  3. To check a Mosquitto setup, go to Settings > Devices & services, select the Mosquitto broker integration, then Configure. Enter # in Listen to a topic and select Start listening. Look for messages from your meter. Home Assistant MQTT integration

Use a meter’s built-in local API

If Home Assistant didn’t discover your installed Shelly Pro 3EM, open Settings > Devices & services > Add Integration and select Shelly. Enter the meter’s local hostname or IP address. Shelly requires a qualified electrician to install this model. Home Assistant Shelly integration · Shelly installation prerequisites

To disable the vendor cloud connection, open the meter’s local web interface and disable Cloud under Settings > Connectivity. The cloud indicator is gray when the cloud connection is disabled. Shelly Pro 3EM Web Interface Guide

For a Pro 3EM using the triphase profile, make the HTTP GET request below from your home network. Replace the example IP address with your meter’s local address. If you enabled authentication, use an HTTP client that supports digest authentication. Shelly Pro 3EM device profile · Shelly EMData API reference · Shelly RPC channels

http://192.168.33.1/rpc/EMData.GetStatus?id=0

The response includes total_act for total active energy across the phases and total_act_ret for total active returned energy. Both use watt-hours (Wh). Shelly EMData API reference

Check that readings are still arriving

Add whole-home consumption to the Energy dashboard

Watts (W) show how fast you are using energy. Kilowatt-hours (kWh) show how much energy has been used. Use a sensor that measures the whole home’s consumption for this dashboard field. Home Assistant energy FAQ · Home Assistant home consumption dashboard

ReadingHome Assistant attributesUse
Whole-home energydevice_class of energy and state_class of total or total_increasingThe main home consumption sensor. Home meter requirements
Live whole-home powerdevice_class of power and state_class of measurement, with a supported unit such as W or kWOptional sensor for live views such as Now. Live power requirements

Go to Settings > Dashboards > Energy. Under Home consumption, select Add home meter. Choose the energy entity and, optionally, the live power entity. Select Save. Home Assistant home consumption dashboard

If your meter only provides power, select its power sensor for home consumption and select Save. Choose Create when Home Assistant offers to calculate energy, or Use sensor if the dialog only lists existing sensors. New helpers start counting when created. Home Assistant energy FAQ

If a sensor is missing from the list, check its device class, state class and unit under Settings > Tools > States. Then check Settings > Tools > Statistics for errors on that entity. Home Assistant energy FAQ

Evidence and limits. Documentation was checked on November 26, 2026. The instructions follow Home Assistant 2026.11.3, ESPHome 2026.11.1, Shelly’s Gen2 API reference version 1.0 and the Shelly Pro 3EM web interface guide. The steps were not run on hardware.

Sources

  1. Home Assistant offline operation
  2. Home Assistant integration manifest
  3. Home Assistant Sense integration
  4. Home Assistant ESPHome integration
  5. ESPHome Native API Component
  6. ESPHome ATM90E32 Power Sensor
  7. Home Assistant MQTT integration
  8. ESPHome MQTT Client Component
  9. Home Assistant MQTT Sensor
  10. Home Assistant Shelly integration
  11. Shelly Pro 3EM Web Interface Guide
  12. Shelly Pro 3EM device profile
  13. Shelly EMData API reference
  14. Shelly RPC channels
  15. Home Assistant Enphase Envoy integration
  16. Home Assistant Tools
  17. Home Assistant home consumption dashboard
  18. Home Assistant energy FAQ
  19. Shelly installation prerequisites
  20. Getting Started with ESPHome
  21. ESPHome YAML configuration

Related