Skip to content

SmartGateways.nl

Skip to main content
How Can We Help?

Search for answers or browse our knowledge base.

Documentation | Demos | Support

Print

Heat energy is published as GJ while the meter uses kWh

The problem

Some Kamstrup heat meters report heat energy in kWh, while the Kamst-IR Gateway currently publishes this value in Home Assistant as GJ.

The gateway does read the raw value from the meter correctly. The issue is only with the unit published through MQTT autodiscovery. Most meters provide the heat energy value in GJ, while a limited number use kWh. For this reason, we chose to provide the value in GJ through MQTT autodiscovery.

Example

A Kamstrup MULTICAL 403 may report a value of:

22,719.8 kWh

The gateway currently publishes this as:

22,719.8 GJ

Home Assistant can then interpret this as approximately 6.3 million kWh.


Solution: create a custom sensor in Home Assistant

You can easily work around this by creating a template sensor in Home Assistant that takes the value from the existing sensor and defines it as kWh.

No conversion factor is required. The gateway already reads the value from the meter correctly; only the published unit is incorrect.

Add the following YAML:

template:
  - sensor:
      - name: "Heat Energy Kamstrup"
        state: "{{ states('sensor.smart_gateways_kamst_ir_f879b0_heat_energy') | float }}"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        availability: "{{ has_value('sensor.smart_gateways_kamst_ir_f879b0_heat_energy') }}"

Note: the exact name of the existing sensor may differ between installations. In the YAML, use the entity ID of your Kamst-IR heat energy sensor. This consists of the last 6 characters of the gateway’s MAC address.

After adding the template sensor, you can use this new sensor in the Home Assistant Energy Dashboard.


First check the unit used by your meter

Not every Kamstrup meter reports heat energy in kWh. Many of the meters we encounter use GJ.

Therefore, first check which unit your meter actually uses.

  • Meter reports kWh β†’ use the template sensor above
  • Meter reports GJ β†’ the standard sensor can be used

Only use the template when the meter itself reports the energy value in kWh.


Note: the power value may also have an incorrect unit

Some Kamstrup meters report the current heat power in kW.

The Kamst-IR Gateway currently publishes this value as W. As a result, the displayed power can be a factor of 1,000 too low.

Example

A meter may report approximately:

4.15 kW

The gateway may currently publish this as:

4.15 W

In other words, an actual heat output of approximately 4,150 W would be displayed as only 4.15 W.

This does not affect the measured energy total; it only affects the displayed power value.

Was this article helpful?
0 out of 5 stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
Please Share Your Feedback
How Can We Improve This Article?
Inhoudsopgave