Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elmeasure Home Assistant Integration

A custom Home Assistant integration for Elmeasure energy monitoring systems.

The integration connects Home Assistant to the Elmeasure API and exposes electricity usage, live power, balance, supply source, daily energy consumption, and account information as Home Assistant entities.

Note This is an unofficial custom integration and is not affiliated with or endorsed by Elmeasure. Read the Write-up: For a detailed, story-driven breakdown of how I reversed engineered this device and intercepted its requests, check out the blog post: Building a Home Assistant Integration for Elmeasure smart meters.

Features

  • Live current power consumption
  • Grid current power supply
  • Optional DG (generator) current power supply
  • Current electricity supply source
  • Account balance
  • Grid/EB energy readings
  • Optional DG energy readings
  • Optional Solar energy readings
  • Today's EB/Grid energy usage
  • Today's DG energy usage
  • Today's Solar energy usage
  • Today's total energy usage
  • Account and meter information
  • Configurable polling/refresh interval
  • DG and Solar entities can be enabled or disabled from integration settings
  • Configuration through the Home Assistant UI

Prerequisites

Before installing the integration, make sure you have:

  1. Home Assistant 2026.3.0 or newer.
  2. HACS if you want to install and update the integration through the Home Assistant Community Store.
  3. Your Elmeasure username and password.
  4. The Elmeasure API Base URL used by your Elmeasure installation.

An API Base URL should look similar to:

http://10.0.1.2:1234

The address above is only an example. You must enter the actual API address used by your Elmeasure installation.

Installation

Option 1: Install using HACS

  1. Open HACS in Home Assistant.
  2. Go to Integrations.
  3. Open the menu and select Custom repositories.
  4. Enter this GitHub repository URL.
  5. Select Integration as the repository type.
  6. Add the repository.
  7. Search for Elmeasure in HACS and install it.
  8. Restart Home Assistant.

After restarting, continue with the configuration steps below.

Option 2: Manual installation

  1. Download the latest release of this repository.

  2. Copy the following folder:

custom_components/elmeasure

to your Home Assistant configuration directory:

/config/custom_components/elmeasure

The final structure should look like:

/config/custom_components/elmeasure/
├── brand/
│   └── icon.png
├── translations/
│   └── en.json
├── __init__.py
├── api.py
├── config_flow.py
├── const.py
├── coordinator.py
├── manifest.json
├── sensor.py
└── strings.json
  1. Restart Home Assistant.

Configuration

After installing and restarting Home Assistant:

  1. Go to Settings → Devices & services.
  2. Click Add Integration.
  3. Search for Elmeasure.
  4. Enter the requested connection and account information.

Setup fields

Username

Enter the username used to sign in to your Elmeasure account.

Password

Enter your Elmeasure account password.

API Base URL

Enter the base URL of your Elmeasure API.

Example format:

http://10.0.1.2:1234

Do not use the example address unless it is actually the address of your Elmeasure server.

Refresh interval

Enter how often Home Assistant should refresh Elmeasure data.

The refresh interval is specified in seconds.

For example:

60

means the integration will refresh approximately once every 60 seconds.

Avoid unnecessarily short polling intervals, as the source data may itself only update periodically.

Enable DG (Generator)

Enable this option if your property has DG/generator supply and you want DG-related entities in Home Assistant.

When disabled, DG-specific entities are not created.

Enable Solar

Enable this option if your Elmeasure installation reports solar energy and you want Solar-related entities in Home Assistant.

When disabled, Solar-specific entities are not created.

Changing integration settings

You do not need to remove and re-add the integration to change the refresh interval or optional energy sources.

  1. Go to Settings → Devices & services.
  2. Find Elmeasure.
  3. Open the integration settings/configure option.
  4. Change:
    • Refresh interval in seconds
    • DG support
    • Solar support
  5. Save the changes.

The integration reloads so the new configuration can take effect.

Entities

The exact entities shown depend on the information available from your Elmeasure installation and whether DG and Solar support are enabled.

Typical entities include:

Entity Description
Balance Current account/prepaid electricity balance
Current Power Current power consumption reported by the meter
Grid Current Power Supply Current power attributed to Grid/EB supply
DG Current Power Supply Current power attributed to DG supply when DG is active
Current Supply Indicates the currently reported electricity source
EB Energy Grid/EB energy reading
DG Energy DG energy reading when DG support is enabled
Solar Energy Solar energy reading when Solar support is enabled
Today EB Today's Grid/EB energy consumption
Today DG Today's DG energy consumption when enabled
Today Solar Today's Solar energy consumption when enabled
Today Energy Used Combined energy used today from enabled energy sources
Account Information Elmeasure account and meter information

Entities created in Home Assistant

After configuring the integration, Elmeasure creates a device containing the available energy, power, supply, and account information entities.

The entities shown depend on your Elmeasure installation and whether DG and Solar support are enabled in the integration settings.

Elmeasure entities in Home Assistant

Note: DG and Solar entities are only created when their respective options are enabled.

Current supply and power attribution

The integration uses the supply information returned by Elmeasure to determine the active electricity source.

When the property is on Grid/EB supply, the current power reading is exposed as Grid Current Power Supply.

When the property is on DG supply, the current power reading is exposed as DG Current Power Supply.

This makes it easier to build Home Assistant dashboards and automations based on the active power source.

Daily energy sensors

The integration retrieves the recent energy dashboard information and uses the latest daily entry to expose today's readings.

Depending on the enabled options, this can include:

  • Today EB
  • Today DG
  • Today Solar
  • Today Energy Used

If DG or Solar support is disabled, the corresponding optional entities are not created and those disabled sources are not included in the calculated daily total.

Account information

The Account Information entity is designed to keep the device page readable while still exposing useful account details.

Its visible state shows:

Flat Name · Username

Additional information from the Elmeasure login response is available as entity attributes, including:

  • User Name
  • Flat Name
  • Meter ID
  • User ID
  • Mobile Number
  • Email
  • Address
  • Access information
  • Change Password status

These attributes can also be used in Home Assistant templates and dashboards.

For example:

{{ state_attr('sensor.account_information', 'meter_id') }}

The exact entity ID assigned by Home Assistant may differ.

For security, the authentication token is not exposed as an entity or entity attribute.

Dashboard usage

All exposed entities can be used with standard Home Assistant cards, Mushroom cards, Bubble cards, ApexCharts, templates, and automations.

Account information attributes can be displayed using Home Assistant templates, while energy and power sensors can be used directly as normal entities.

Troubleshooting

Elmeasure does not appear under Add Integration

  1. Confirm that the integration folder is located at:
/config/custom_components/elmeasure
  1. Confirm that manifest.json is directly inside that folder.
  2. Restart Home Assistant.
  3. Check Settings → System → Logs for errors related to custom_components.elmeasure.

Unable to log in

Check:

  • Username
  • Password
  • API Base URL
  • Whether the Elmeasure API server is reachable from Home Assistant

Make sure the API URL includes the correct protocol and port when required.

Example:

http://10.0.1.2:1234

Entities do not update frequently enough

Open the Elmeasure integration settings and reduce the refresh interval.

Remember that the value is in seconds and that polling faster than the underlying Elmeasure data updates may not provide fresher readings.

DG or Solar entities are missing

Open the Elmeasure integration settings and verify that the relevant option is enabled.

If DG or Solar is disabled, its related entities are intentionally not created.

After updating the integration

Restart Home Assistant after updating the integration files.

If an old entity remains after a feature was disabled or removed, Home Assistant may retain it in the entity registry. It can be removed manually from the entity settings if it is no longer provided by the integration.

Support and issues

If you encounter a bug, open an issue in this repository's Issues section and include:

  • Home Assistant version
  • Elmeasure integration version
  • Relevant Home Assistant log messages
  • A description of the expected behavior
  • A description of what actually happened

Do not include passwords, authentication tokens, API URLs containing credentials, or other private information in issue reports.

Disclaimer

This project is an unofficial Home Assistant integration for Elmeasure systems.

Use it at your own risk. API behavior may differ between Elmeasure installations or change without notice.

About

A custom Home Assistant integration for ELMeasure smart energy monitoring systems.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages