After several years of our energy provider trying to persuade us to have smart electric and gas meters we finally gave in and had new smart energy meters installed on the 4th September 2024.

We have weekly energy meter readings saved since 2008 and in 2016 we installed our ESP8266 mains energy monitor and it has been saving mains electric and gas readings every day since it was setup.

Our old electric meter had an indicator LED which flashed 1000 times per kWh of energy used and the gas meter had a magnetic sensor which counted the pulses for every cubic meter of gas used.

Installation Day

On the installation day we removed our sensors from the old meters before the installer arrived and it took around an hour for the electric and gas meters to be replaced and configured by the installer.

After the new smart meters had been installed we tried to reinstall our sensors and found that the new electric meter now produces 2000 pulses per kWh used and the gas meter is all solid state and does not have any way to obtain the readings apart from the supplied consumer access device (CAD) remote display unit which does not allow any remote data access.

Accessing the Smart Meter Data

After some research we found a product from Glow which is a Display and CAD shop.glowmarkt.com which connects to your meter data via an account with an app called Bright (from Apple App Store.)

Glow display

Glow's combined Display and Consumer Access Device (CAD) offers real-time energy monitoring for homes with smart meters. This device provides a clear touchscreen interface and integrates with the Bright app, allowing users to view energy consumption on-the-go via Wi-Fi. It supports Home Assistant integration and offers API and MQTT access for advanced data tracking. It is compatible with both SMETS1 and SMETS2 meters.

We installed the Bright app and registered an account and linked it to our energy account using the code on the energy providers smart display.

After 24 hours we could view our energy data in the Bright app and we then ordered the Glow Display and CAD and it was linked to our account.

The display supports Home Assistant integration via a MQTT server. Instructions for setting up MQTT on the display are on medium.com/@joshua.cooper

Once MQTT was setup we had a new top level topic on our MQTT server called “glow”.

This contains a topic for the device ID and then state with device data and two sensors for the gas and electric meters.

An example of the returned data is below:

{
  "electricitymeter": {
    "timestamp": "2024-09-13T11:31:58Z",
    "energy": {
      "export": {
        "cumulative": 0.074,
        "units": "kWh"
      },
      "import": {
        "cumulative": 4481.99,
        "day": 2.995,
        "week": 32.97,
        "month": 80.503,
        "units": "kWh",
        "mpan": "xxxxxxxxxxxxx",
        "supplier": "xxxxx",
        "price": {
          "unitrate": 0.23827,
          "standingcharge": 0.6333
        }
      }
    },
    "power": {
      "value": 0,
      "units": "kW"
    }
  }
}
{
  "gasmeter": {
    "timestamp": "2024-09-13T11:31:57Z",
    "energy": {
      "import": {
        "cumulative": 133.155,
        "day": 13.094,
        "week": 63.556,
        "month": 132.068,
        "units": "kWh",
        "cumulativevol": 11.867,
        "cumulativevolunits": "m3",
        "dayvol": 13.094,
        "weekvol": 63.556,
        "monthvol": 132.068,
        "dayweekmonthvolunits": "kWh",
        "mprn": "xxxxxxxxxxx",
        "supplier": "xxxxxxx",
        "price": {
          "unitrate": 0.05871,
          "standingcharge": 0.30774
        }
      }
    }
  }
}

Accessing the data in Home Assistant

We created new sensors for the MQTT data in Home Assistant with the following:

- state_topic: "glow/xxxdeviceidxxx/SENSOR/gasmeter"
    value_template: "{{ value_json.gasmeter.energy.import.cumulative }}"
    name: "Gas Meter"
    unit_of_measurement: "m³"
    device_class: gas
    state_class: total_increasing
    force_update: true
    icon: mdi:fire


  - state_topic: "glow/xxxdeviceidxxx/SENSOR/electricitymeter"
    value_template: "{{ value_json.electricitymeter.energy.import.cumulative }}"
    name: "Electric Meter"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing
    force_update: true
    icon: mdi:lightning-bolt

Problems with new Gas Meter data

Our new smart gas meter returns data in kilowatt-hour (kWh) units and not cubic meters which is the unit type which Home Assistant requires.

I found several posts on their support forums with requests for gas meter readings to be used in kWh but this currently does not seem to be working.

To convert gas kWh to cubic meters (m³), you need to reverse the process of converting cubic meters to kilowatt-hours, which typically depends on the calorific value (CV) and the conversion factor used by your gas supplier.

Here's the general formula used in the UK:

Glow display

  • Calorific Value (CV): This is the energy content of the gas and is typically around 40 MJ/m³ in the UK, but it can vary. The exact value is usually found on your gas bill.

  • Conversion Factor: For UK gas, the conversion factor is 3.6.

To use this conversion in a Home Assistant template sensor, you'll need to define the sensor in YAML using the template platform. Here's how you can set up the sensor to convert gas usage in kilowatt-hours (kWh) to cubic meters (m³), based on the formula provided:

- state_topic: "glow/xxxunitidxxx/SENSOR/gasmeter"
    value_template: >
          {% set kwh = value_json.gasmeter.energy.import.cumulative | float %}
          {% set calorific_value = 40.0 %}
          {% set conversion_factor = 3.6 %}
          {{ (kwh / (calorific_value * conversion_factor)) | round(3) }}
    name: "Gas Meter"
    unit_of_measurement: 'm³'
    device_class: gas
    state_class: total_increasing
    force_update: true
    icon: mdi:fire

How it works:

  • sensor.gas_usage_kwh: This is the sensor that provides your gas usage in kWh. You should replace this with the actual entity name in your Home Assistant setup.

  • calorific_value: Set to 40, but you can adjust it according to your supplier's specific value.

  • conversion_factor: Set to 3.6, as per the UK standard conversion.

  • The | round(3) function rounds the result to 3 decimal places for better readability.

You can adjust the entity name and values as needed, and this template sensor will automatically convert the kWh reading to cubic meters.

This is setup you need to restart Home Assistant and wait for new data to be saved for your energy dashboard which should show the correct values.