Skip to content

DLMS Meter

The dlms_meter component connects to smart meters which use the encrypted DLMS/COSEM protocol over UART. These smart meters are, for example, widely deployed in Austria and Denmark.

Most providers use M-Bus framed DLMS telegrams and therefore require an M-Bus to UART adapter. Some meters, such as kamstrup-omnipower, instead broadcast direct HDLC framed DLMS telegrams on the HAN interface. The component detects the transport type automatically from the received frame.

You must also request the 32‑character hexadecimal decryption key from your energy provider / grid operator. Some meters additionally require a second 32-character hexadecimal authentication key.

This component is passive; it does not transmit data to the meter. The meter periodically broadcasts frames (often about every 5 seconds). ESPHome listens, decrypts and updates the configured sensors as data arrives.

Smart meter with M-Bus adapter board to ESP32
# Example configuration entry for a generic grid operator
uart:
rx_pin: GPIOXX # Adjust for where the M-Bus adapter RX is connected
baud_rate: 2400
rx_buffer_size: 1024 # Needed for large frames
dlms_meter:
decryption_key: "01234567890123456789012345678901" # Replace with your key
sensor:
- platform: dlms_meter
voltage_l1:
name: "Voltage L1"
voltage_l2:
name: "Voltage L2"
voltage_l3:
name: "Voltage L3"
current_l1:
name: "Current L1"
current_l2:
name: "Current L2"
current_l3:
name: "Current L3"
active_power_plus:
name: "Active power taken from grid"
active_power_minus:
name: "Active power put into grid"
active_energy_plus:
name: "Active energy taken from grid"
active_energy_minus:
name: "Active energy put into grid"
reactive_energy_plus:
name: "Reactive energy taken from grid"
reactive_energy_minus:
name: "Reactive energy put into grid"
text_sensor:
- platform: dlms_meter
timestamp:
name: "Timestamp"
uart:
rx_pin: GPIOXX
baud_rate: 2400
rx_buffer_size: 1024
dlms_meter:
decryption_key: "01234567890123456789012345678901" # Replace with your key
provider: netznoe
sensor:
- platform: dlms_meter
voltage_l1:
name: "Voltage L1"
voltage_l2:
name: "Voltage L2"
voltage_l3:
name: "Voltage L3"
current_l1:
name: "Current L1"
current_l2:
name: "Current L2"
current_l3:
name: "Current L3"
active_power_plus:
name: "Active power taken from grid"
active_power_minus:
name: "Active power put into grid"
active_energy_plus:
name: "Active energy taken from grid"
active_energy_minus:
name: "Active energy put into grid"
power_factor: # EVN specific
name: "Power Factor"
text_sensor:
- platform: dlms_meter
timestamp:
name: "Timestamp"
meternumber: # EVN specific
name: "Meter Number"
uart:
rx_pin: GPIOXX
baud_rate: 2400
rx_buffer_size: 1024
dlms_meter:
decryption_key: "01234567890123456789012345678901"
authentication_key: "FEDCBA9876543210FEDCBA9876543210"
provider: kamstrup-omnipower
sensor:
- platform: dlms_meter
voltage_l1:
name: "Voltage L1"
voltage_l2:
name: "Voltage L2"
voltage_l3:
name: "Voltage L3"
current_l1:
name: "Current L1"
current_l2:
name: "Current L2"
current_l3:
name: "Current L3"
active_power_plus:
name: "Active power import"
active_power_minus:
name: "Active power export"
reactive_power_plus:
name: "Reactive power import"
reactive_power_minus:
name: "Reactive power export"
active_power_plus_l1:
name: "Active power import L1"
active_power_plus_l2:
name: "Active power import L2"
active_power_plus_l3:
name: "Active power import L3"
active_power_minus_l1:
name: "Active power export L1"
active_power_minus_l2:
name: "Active power export L2"
active_power_minus_l3:
name: "Active power export L3"
power_factor_l1:
name: "Power factor L1"
power_factor_l2:
name: "Power factor L2"
power_factor_l3:
name: "Power factor L3"
power_factor_total:
name: "Power factor total"
active_energy_plus:
name: "Active energy import"
active_energy_minus:
name: "Active energy export"
reactive_energy_plus:
name: "Reactive energy import"
reactive_energy_minus:
name: "Reactive energy export"
active_energy_plus_l1:
name: "Active energy import L1"
active_energy_plus_l2:
name: "Active energy import L2"
active_energy_plus_l3:
name: "Active energy import L3"
active_energy_minus_l1:
name: "Active energy export L1"
active_energy_minus_l2:
name: "Active energy export L2"
active_energy_minus_l3:
name: "Active energy export L3"
text_sensor:
- platform: dlms_meter
timestamp:
name: "Timestamp"
meter_number:
name: "Meter Number"
obis_list_version:
name: "OBIS List Version"

The kamstrup-omnipower provider is intended for Danish Kamstrup OMNIPOWER HAN interfaces. It expects direct HDLC DLMS frames over UART and DLMS security suite 0. Kamstrup meters commonly use separate encryption and authentication keys.

  • decryption_key (Required, string, 32 hex chars, case-insensitive, templatable): Key used to decrypt DLMS telegrams. Obtain this from your provider / grid operator.
  • authentication_key (Optional, string, 32 hex chars, case-insensitive, templatable): Additional key used for authenticated DLMS telegrams. Required by meters that use separate encryption and authentication keys, such as Kamstrup OMNIPOWER HAN meters.
  • provider (Optional): Grid operator profile. Options:
    • generic (default) – works for most operators.
    • netznoe – Netz Noe / EVN specific mapping.
    • kamstrup-omnipower – Kamstrup OMNIPOWER HAN mapping. This profile expects direct HDLC framed DLMS telegrams and DLMS security suite 0.

The component detects the transport type automatically from the received frame. The provider option selects the provider-specific decoding and security behavior.

Not all sensors are available on all meters. Provider specific sensors are listed separately.

Each of the following entries is optional; add only the ones you need. All support the standard Sensor options.

  • voltage_l1: Voltage Phase 1.
  • voltage_l2: Voltage Phase 2.
  • voltage_l3: Voltage Phase 3.
  • current_l1: Current Phase 1.
  • current_l2: Current Phase 2.
  • current_l3: Current Phase 3.
  • active_power_plus: Active power taken from grid.
  • active_power_minus: Active power put into grid.
  • reactive_power_plus: Reactive power taken from grid.
  • reactive_power_minus: Reactive power exported to grid.
  • active_energy_plus: Cumulative active energy taken from grid.
  • active_energy_minus: Cumulative active energy exported to grid.
  • reactive_energy_plus: Reactive energy taken from grid.
  • reactive_energy_minus: Reactive energy exported to grid.
  • power_factor: Power factor. All options from Sensor.
  • active_power_plus_l1: Active power taken from grid on phase L1.
  • active_power_plus_l2: Active power taken from grid on phase L2.
  • active_power_plus_l3: Active power taken from grid on phase L3.
  • active_power_minus_l1: Active power exported to grid on phase L1.
  • active_power_minus_l2: Active power exported to grid on phase L2.
  • active_power_minus_l3: Active power exported to grid on phase L3.
  • power_factor_l1: Power factor of phase L1.
  • power_factor_l2: Power factor of phase L2.
  • power_factor_l3: Power factor of phase L3.
  • power_factor_total: Total power factor.
  • active_energy_plus_l1: Cumulative active energy imported on phase L1.
  • active_energy_plus_l2: Cumulative active energy imported on phase L2.
  • active_energy_plus_l3: Cumulative active energy imported on phase L3.
  • active_energy_minus_l1: Cumulative active energy exported on phase L1.
  • active_energy_minus_l2: Cumulative active energy exported on phase L2.
  • active_energy_minus_l3: Cumulative active energy exported on phase L3.

All text sensor entries are optional and support standard Text Sensor options.

  • timestamp: Timestamp included in the received frame.
  • meternumber: Meter number reported by the device.
  • meter_number: Meter number reported by the meter.
  • obis_list_version: OBIS push-list version identifier.