Novels of Scotland, software, and the space between. Author of the Wardstane Chronicles, the DI Cormac Buchan Investigations, and the Pondlife novels.
ha-hildebrandglow-dcc
GitHub · Python · Fork

ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS smart meters, pulling data from the DCC via the Hildebrand Glow API.

View on GitHub

Hildebrand Glow (DCC) Integration

hacs_badge CodeFactor Grade DeepSource "Buy Me A Coffee"

Home Assistant integration for energy consumption data from UK SMETS (Smart) meters using the Hildebrand Glow API.

This is a fork of the original HandyHat/ha-hildebrandglow-dcc project, which is no longer maintained, updated to fix issues with sensors no longer updating.

This integration works without requiring a consumer device provided by Hildebrand Glow and can work with your existing smart meter. You'll need to set up your smart meter for free in the Bright app on Android or iOS. This will only work when using the Data Communications Company (DCC) backend, which all SMETS 2 meters and some SMETS 1 meters do. Once you can see your data in the app, you are good to go.

The data provided will be delayed by around 30 minutes. To get real-time consumption data, you can buy Hildebrand Glow hardware. Although this integration will technically work with their hardware, you should instead use the Local MQTT integration or the Cloud MQTT integration to get real-time consumption data which is not delayed.

Installation

Automated installation through HACS

You can install this component through HACS to easily receive updates. Once HACS is installed, click this link:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

<details> <summary>Manually add to HACS</summary> Visit the HACS Integrations pane and go to <i>Explore and download repositories</i>. Search for <code>Hildebrand Glow (DCC)</code>, and then hit <i>Download</i>. You'll then be able to install it through the <i>Integrations</i> pane. </details>

Manual installation

Copy the custom_components/hildebrandglow_dcc/ directory and all of its files to your config/custom_components/ directory.

Configuration

Once installed, restart Home Assistant:

Open your Home Assistant instance and show the system dashboard.

Then, add the integration:

Open your Home Assistant instance and start setting up a new integration.

<details> <summary>Manually add the Integration</summary> Visit the <i>Integrations</i> section in Home Assistant and click the <i>Add</i> button in the bottom right corner. Search for <code>Hildebrand Glow (DCC)</code> and input your credentials. <b>You may need to clear your browser cache before the integration appears in the list.</b> </details>

Sensors

Once you've authenticated, the integration will automatically set up the following sensors for each of the smart meters on your account:

Where the API can report it, the meter's own identifying number is also recorded as the serial number on the meter's device in Home Assistant's device registry.

If your account has Glow hardware (an IHD/CAD), the integration detects this automatically at startup and creates these additional entities:

Accounts without Glow hardware simply don't get the hardware entities; the endpoints are probed once at startup and skipped silently if unsupported.

The usage and cost sensors will still show the previous day's data until shortly after 01:30 to ensure that all of the previous day's data is collected.

If the data being shown is wrong, check the Bright app first. If it is also wrong there, you will need to contact your supplier and tell them to fix the data being provided to DCC Other Users, as Bright is one of these.

Update frequency

Hildebrand's DCC backend only publishes new smart meter readings roughly twice an hour, so all sensors are refreshed on the same cadence rather than continuously:

Services

Two services are provided for when the data looks stale or wrong. Both accept a device target, or no target at all to cover every meter on the account:

Energy Management

The sensors created integrate directly into Home Assistant's Home Energy Management. It is recommended you use the daily usage and cost sensors in the Energy integration.

Open your Home Assistant instance and show your Energy configuration panel.

Debugging

To debug the integration, add the following to your configuration.yaml

logger:
  default: warning
  logs:
    custom_components.hildebrandglow_dcc: debug

Development

To begin, it is recommended to create a virtual environment to install dependencies:

python -m venv dev-venv
. dev-venv\Scripts\activate

You can then install the dependencies that will allow you to develop: pip3 install -r requirements-dev.txt

This will install black, homeassistant, isort and pylint. The integration itself has no external dependencies: it talks to the Glowmarkt API directly via custom_components/hildebrandglow_dcc/glow_api.py.

Code Style

This project makes use of black, isort and pylint to enforce a consistent code style across the codebase.

Credits

Thanks go to:

View ha-hildebrandglow-dcc on GitHub