Skip to content

DSMR Binding ​

The DSMR-binding is targeted towards Dutch, Belgium, Luxembourger and Austrian users having a smart meter (Dutch: 'Slimme meter'). Data of Dutch/Belgium/Luxembourg/Austrian smart meters can be obtained via the P1-port. When connecting this port from a serial port the data can be read out.

This binding reads the P1-port of:

  • Dutch Smart Meters that comply to NTA8130, DSMR v2.1, DSMR v2.2, DSMR v3.0, DSMR v4.0, DSMR v4.04, and DSMR 5.0.
  • Belgium Smart Meters that comply to e-MUCS v1.0.
  • Luxembourg’s electricity meter "Smarty" that comply to V1.0.
  • Austrian electricity meters.

Although DSMR v4.2 is not an official specification, the binding has support for this version.

If you are not living in the Netherlands/Belgium/Luxembourg but do want to read a meter please have look at the SmartMeter Binding. Because the Dutch Meter standard is based on the IEC-62056-21 standard it might be desirable to build support for other country metering systems based on that standard in this binding.

Serial Port Configuration ​

The P1-port is a serial port. To configure the serial port within openHAB see the general documentation about serial port configuration.

Supported Things ​

dsmrBridge (The Netherlands/Belgium) ​

dsmrBridge: This is the device that communicated between the binding (serial) and its internal meters. You always have to have a 'Dutch/Belgium Smart Meter'-bridge. The bridge contains the serial port configuration. Specific meters are bound via the bridge to the smart meter. A smart meter consists typically out of minimal 2 meters. A generic meter and the electricity meter. Each meter is bound to the DSMR protocol the physical meter supports. For each meter it is possible to set a refresh rate at which the status is updated. The physical meter might update with a high frequency per second, while it is desired to have only values per minute.

The Belgium e-MUCS protocol is an extension to the DSMR standard. Belgium meters have emucs in the thing name. Due to it similarities the bridge for Belgium meters is also a dsmrBridge.

smartyBridge (Luxembourg, Austria) ​

smartyBridge: This is the device that communicated between the binding (serial) and its internal meters. You always have to have a 'Smarty Smart Meter'-bridge. The bridge contains the serial port configuration.

Discovery ​

The dsmrBridge and meters can be discovered via the discovery process. The smartyBridge can be discovered. Because the smartyBridge requires a decryption key. You need to set the decryption key when the bridge is added. After the decryption key is set a new discovery can be started to discover the meter.

If a bridge is manually configured it is possible to auto detect available meters.

Configuration ​

The configuration for the dsmrBridge consists of the following parameters:

ParameterDescription
serialPortThe serial port where the P1-port is connected to (e.g. Linux: /dev/ttyUSB1, Windows: COM2) (mandatory)
receivedTimeoutThe time out period in which messages are expected to arrive, default is 120 seconds
baudrateBaudrate when no auto detect. valid values: 4800, 9600, 19200, 38400, 57600, 115200
databitsData bits when no auto detect. valid values: 5, 6, 7, 8
parityParity when no auto detect. valid values: E(ven), N(one), O(dd)
stopbitsStop bits when no auto detect. valid values: 1, 1.5, 2

The configuration for the smartyBridge consists of the following parameters:

ParameterDescription
serialPortThe serial port where the P1-port is connected to (e.g. Linux: /dev/ttyUSB1, Windows: COM2) (mandatory)
decryptionKeyThe meter specific decryption key (mandatory)
additionalKeyAdditional key for meters that require a secondary key. Some meters in Austria require this
receivedTimeoutThe time out period in which messages are expected to arrive, default is 120 seconds

Note: The manual configuration is only needed if the DSMR-device requires non DSMR-standard Serial Port parameters (i.e. something different then 115200 8N1 or 9600 7E1)

Troubleshooting ​

If there are unexpected configuration issues. For example a meter could not be found or not all channels expected are available. Than run the discovery process and look into the log file. There are extra checks that can give more information about what might be wrong.

Meters ​

The information in this paragraph in necessary if you choose to configure the meters manually in a .things file.

Supported meters:

Meter ThingThing type IDM-Bus channelRefresh rate
DSMR V2 / V3 Devicedevice_v2_v3-110 seconds
DSMR V4 Devicedevice_v4-110 seconds
DSMR V5 Devicedevice_v5-110 seconds
e-MUCS V1.0 Devicedevice_emucs_v1_0-1?
ACE4000 GTMM Mk3 Electricity meterelectricity_ace4000010 seconds
DSMR V2.1 Electricity meterelectricity_v2_1010 seconds
DSMR V2.2 Electricity meterelectricity_v2_2010 seconds
DSMR V3 Electricity meterelectricity_v3_0010 seconds
DSMR V4.0 Electricity meterelectricity_v4_0010 seconds
DSMR V4.0.4 Electricity meterelectricity_v4_0_4010 seconds
DSMR V4.2 Electricity meterelectricity_v4_2010 seconds
DSMR V5 Electricity meterelectricity_v5_0010 seconds
e-MUCS V1.0 Electricity meterelectricity_emucs_v1_00?
Smarty V1.0 Electricity Meterelectricity_smarty_v1_0010 seconds
ACE4000 GTMM Mk3 Gas metergas_ace400031 hour
DSMR V2.1 Gas metergas_v2_1024 hours
DSMR V2.2 Gas metergas_v2_2024 hours
DSMR V3.0 Gas metergas_v3_0note 11 hour
e-MUCS V1.0 Gas metergas_emucs_v1_0note 1?
ACE4000 GTMM Mk3 Cooling metercooling_ace400061 hour
DSMR V2.2 Cooling metercooling_v2_201 hour
ACE4000 GTMM Mk3 Heating meterheating_ace400041 hour
DSMR V2.2 Heating meterheating_v2_201 hour
ACE4000 GTMM Mk3 Water meterwater_ace400051 hour
DSMR V2.2 Water meterwater_v2_201 hour
DSMR V3.0 Water meterwater_v3_0note 11 hour
ACE4000 GTMM Mk3 1st Slave Electricity meterslave_electricity1_ace400011 hour
ACE4000 GTMM Mk3 2nd Slave Electricity meterslave_electricity2_ace400021 hour
DSMR V4.x Slave Electricity meterslave_electricity_v4note 11 hour
DSMR V5 Slave Electricity meterslave_electricity_v5note 15 minutes
DSMR V3.0 Generic metergeneric_v3_0note 11 hour
DSMR V3.0 Giga Joule meter (heating or cooling)gj_v3_0note 11 hour
DSMR V4.x Giga Joule meter (heating or cooling)gj_v4note 11 hour
DSMR V5 Giga Joule meter (heating or cooling)gj_v5_0note 15 minutes
DSMR V4.x m3 meter (gas or water)m3_v4note 11 hour
DSMR V5 m3 meter (gas or water)m3_v5_0note 15 minutes

note 1. The channel of these meters is dependent on the physical installation and corresponds to the M-Bus channel. You can ask your supplier / installer for this information or you can retrieve it from the logfiles (see Determine M-Bus channel).

Configuration ​

The configuration for the meters consists of the following parameters:

ParameterDescription
refreshTime in seconds with which the state of the device is updated. Default is 60 seconds
channelM-Bus channel. See the table above

Examples ​

dsl
Bridge dsmr:dsmrBridge:myDSMRDevice [serialPort="/dev/ttyUSB0"] {
    Things:
        device_v5 dsmrDeviceV5 [channel=-1]
        electricity_v5_0 electricityV5 [channel=0]
}

Channels ​

Item configuration ​

Item configuration can be done in the regular way.

Manual configuration: The following channels are supported:

  • Y channel is supported
  • - channel is not supported
  • O channel is supported only if the device has this functionality
Channel Type IDItem TypeDescriptionAce4000DSMR V2.1DSMR V2.2DSMR V3.0DSMR V4.0DSMR V4.0.4DSMR V4.2DSMR V5SMARTY V1.0e-MUCS V1.0Austian
Channels for the generic device
p1_text_codeStringText code from the device-YYYYYY----
p1_text_stringStringText string from the device-YYYYYYYYY-
p1_version_outputStringVersion information (most times this refers to the DSMR specification)----YYYYY-Y
p1_emucs_version_outputStringe-MUCS version information--------Yy-
p1_timestampDateTimeTimestamp of the last device reading----YYYYYYY
Channels for the cooling meter
cmeter_value_v2Number:EnergyThe total amount of cooling used in the past period (GJ)Y-Y--------
cmeter_value_v2_timestampDateTimeTimestamp of the last meter readingY-Y--------
cmeter_equipment_identifier_v2_2StringEquipment identifier--Y--------
Channels for the main electricity meter
emeter_equipment_identifier_v2_xStringElectricity Equipment identifier-YY-----Y--
emeter_equipment_identifierStringElectricity Equipment identifier---YYYYY-Y-
emeter_delivery_tariff0Number:EnergyTotal amount of electricity used for tariff 0 (kWh)Y-------Y-Y
emeter_delivery_tariff1Number:EnergyTotal amount of electricity used for tariff 1 (kWh)YYYYYYYY-YY
emeter_delivery_tariff2Number:EnergyTotal amount of electricity used for tariff 2 (kWh)YYYYYYYY-YY
emeter_production_tariff0Number:EnergyTotal amount of electricity produced for tariff 0 (kWh)Y-------Y-Y
emeter_production_tariff1Number:EnergyTotal amount of electricity produced for tariff 1 (kWh)YYYYYYYY-YY
emeter_production_tariff2Number:EnergyTotal amount of electricity produced for tariff 2 (kWh)YYYYYYYY-YY
emeter_delivery_tariff0_antifraudNumber:EnergyTotal amount of electricity used for tariff 2 [antifraud] (kWh)Y----------
emeter_delivery_tariff1_antifraudNumber:EnergyTotal amount of electricity used for tariff 1 [antifraud] (kWh)Y----------
emeter_delivery_tariff2_antifraudNumber:EnergyTotal amount of electricity used for tariff 2 [antifraud] (kWh)Y----------
emeter_total_imported_energy_register_qNumber:EnergyTotal Imported Energy (Q+) (kvarh)--------Y-Y
emeter_total_imported_energy_register_r_rate1Number:EnergyTotal Imported Energy Rate 1 (kvarh)----------Y
emeter_total_imported_energy_register_r_rate2Number:EnergyTotal Imported Energy Rate 2 (kvarh)----------Y
emeter_total_exported_energy_register_qNumber:EnergyTotal Exported Energy (Q-) (kvarh)--------Y-Y
emeter_total_exported_energy_register_r_rate1Number:EnergyTotal Exported Energy Rate 1 (kvarh)----------Y
emeter_total_exported_energy_register_r_rate2Number:EnergyTotal Exported Energy Rate 2 (kvarh)----------Y
emeter_tariff_indicatorStringCurrent tariff indicatorYYYYYYYY-Y-
emeter_treshold_a_v2_1Number:ElectricCurrentActual threshold (A)-Y---------
emeter_treshold_aNumber:ElectricCurrentActual threshold (A)Y-YY-------
emeter_fuse_threshold_aNumber:ElectricCurrentActive fuse threshold (A)---------Y-
emeter_treshold_kwhNumber:PowerActual threshold (kW)----YY---Y-
emeter_switch_position_v2_1NumberSwitch position-Y---------
emeter_switch_positionNumberSwitch positionY-YYYY--YY-
emeter_active_import_powerNumber:PowerAggregate active import power (W)Y----------
emeter_actual_deliveryNumber:PowerCurrent power delivery (kW)-YYYYYYYYYY
emeter_actual_productionNumber:PowerCurrent power production (kW)---YYYYYYYY
emeter_actual_demandNumber:PowerCurrent power delivery demand (kW)---YYYYYYYY
emeter_maximum_demand_current_monthNumber:PowerMaximum power delivery demand current month (kW)---YYYYYYYY
emeter_actual_reactive_deliveryNumberActual Reactive Power Delivery (kvar)--------Y-Y
emeter_actual_reactive_productionNumberActual Reactive Power Production (kvar)--------Y-Y
emeter_active_threshold_smaxNumberActive threshold (SMAX) (kVA)--------Y--
emeter_threshold_kwNumber:PowerActive threshold (SMAX) (kVA)---YYY--YY-
emeter_power_failuresNumberNumber of power failures----YYYYY--
emeter_long_power_failuresNumberNumber of long power failures----YYYY---
emeter_power_failure_log_entriesNumberNumber of entries in the power failure log----YYYYY--
emeter_power_failure_log_timestamp[x] note 2DateTimeTimestamp for entry [x] in the power failure log----YYYYY--
emeter_power_failure_log_duration[x] note 2Number:TimeDuration for entry [x] the power failure log----YYYYY--
emeter_voltage_sags_l1NumberNumber of voltage sags L1----YYYYY--
emeter_voltage_sags_l2NumberNumber of voltage sags L2----OOOOO--
emeter_voltage_sags_l3NumberNumber of voltage sags L3----OOOOO--
emeter_voltage_swells_l1NumberNumber of voltage swells L1----YYYY---
emeter_voltage_swells_l2NumberNumber of voltage swells L2----OOOO---
emeter_voltage_swells_l3NumberNumber of voltage swells L3----OOOO---
emeter_instant_current_l1Number:ElectricCurrentInstant Current L1 (A)----YYYYYY-
emeter_instant_current_l2Number:ElectricCurrentInstant Current L2 (A)----OOOOOY-
emeter_instant_current_l3Number:ElectricCurrentInstant Current L3 (A)----OOOOOY-
emeter_instant_power_delivery_l1Number:PowerInstant Power Delivery L1 (kW)----YYYYY--
emeter_instant_power_delivery_l2Number:PowerInstant Power Delivery L2 (kW)----OOOOO--
emeter_instant_power_delivery_l3Number:PowerInstant Power Delivery L3 (kW)----OOOOO--
emeter_instant_power_production_l1Number:PowerInstant Power Production L1 (kW)----YYYYY--
emeter_instant_power_production_l2Number:PowerInstant Power Production L2 (kW)----OOOOO--
emeter_instant_power_production_l3Number:PowerInstant Power Production L3 (kW)----OOOOO--
emeter_instant_reactive_power_delivery_l1Number:PowerInstant Reactive Power Delivery L1 (kvar)--------Y--
emeter_instant_reactive_power_delivery_l2Number:PowerInstant Reactive Power Delivery L2 (kvar)--------Y--
emeter_instant_reactive_power_delivery_l3Number:PowerInstant Reactive Power Delivery L3 (kvar)--------Y--
emeter_instant_reactive_power_production_l1Number:PowerInstant Reactive Power Prodcution L1 (kvar)--------Y--
emeter_instant_reactive_power_production_l2Number:PowerInstant Reactive Power Prodcution L2 (kvar)--------Y--
emeter_instant_reactive_power_production_l3Number:PowerInstant Reactive Power Prodcution L3 (kvar)--------Y--
emeter_instant_voltage_l1Number:ElectricPotentialInstant Voltage L1 (V)-------Y-Y-
emeter_instant_voltage_l2Number:ElectricPotentialInstant Voltage L2 (V)-------O-Y-
emeter_instant_voltage_l3Number:ElectricPotentialInstant Voltage L3 (V)-------O-Y-
Channels for the slave electricity meter
meter_device_typeStringSlave Electricity Meter Device Type----YYYY---
meter_equipment_identifierStringSlave Electricity Meter ID----YYYY---
emeter_delivery_tariff0Number:EnergyTotal amount of slave electricity used for tariff 0 (kWh)Y----------
emeter_delivery_tariff1Number:EnergyTotal amount of slave electricity used for tariff 1 (kWh)Y----------
emeter_delivery_tariff2Number:EnergyTotal amount of slave electricity used for tariff 2 (kWh)Y----------
emeter_production_tariff0Number:EnergyTotal amount of slave electricity produced for tariff 0 (kWh)Y----------
emeter_production_tariff1Number:EnergyTotal amount of slave electricity produced for tariff 1 (kWh)Y----------
emeter_production_tariff2Number:EnergyTotal amount of slave electricity produced for tariff 2 (kWh)Y----------
emeter_tariff_indicatorStringCurrent slave tariff indicatorY----------
emeter_treshold_aNumber:ElectricCurrentActual slave threshold (A)Y----------
meter_switch_positionNumberSlave electricity switch positionY--YYY-----
emeter_active_import_powerNumber:PowerSlave aggregate active import power (W)Y----------
emeter_valueNumber:EnergySlave electricity usage (kWh) in the past period----YYYY---
emeter_value_timestampDateTimeTimestamp of the last reading----YYYY---
Channels for the gas meter
meter_device_typeStringGas Meter Device Type---Y-----Y-
meter_equipment_identifierStringGas Meter IDY--Y-----Y-
gmeter_equipment_identifier_v2StringGas Meter ID-YY--------
gmeter_24h_delivery_v2Number:VolumeGas Delivery past 24 hoursYYY--------
gmeter_24h_delivery_v2_timestampDateTimeTimestamp of the last readingYYY--------
gmeter_24h_delivery_compensated_v2Number:VolumeGas Delivery past 24 hours (compensated)-YY--------
gmeter_24h_delivery_compensated_v2_timestampDateTimeTimestamp of the last reading-YY--------
gmeter_value_v3Number:VolumeGas Delivery past period---Y-------
gmeter_value_v3_timestampDateTimeTimestamp of the last reading---Y-------
gmeter_last_valueNumber:VolumeGas Delivery last reading value---------Y-
gmeter_last_value_timestampDateTimeTimesamp of last Gas Delivery reading---------Y-
gmeter_valve_position_v2_1NumberGas Valve position-Y---------
gmeter_valve_position_v2_2NumberGas Valve positionY-Y--------
meter_valve_switch_positionNumberGas Valve position---Y-----Y-
Channels for the generic meter
meter_device_typeStringGeneric Meter Device Type---Y-------
gmeter_equipment_identifierStringGeneric Meter ID---Y-------
genmeter_value_v3NumberDelivery past period---Y-------
meter_valve_switch_positionNumberGeneric Meter Valve/Switch position---Y-------
Channels for the GJ meter (Heating or Cooling)--
meter_device_typeStringGJ Meter Device Type---YYYYY-
meter_equipment_identifierNumberGJ Meter ID---YYYYY---
gjmeter_value_v3Number:EnergyGJ Delivery past period---Y-------
gjmeter_value_v3_timestampDateTimeTimestamp of the last reading---Y-------
gjmeter_value_v4Number:EnergyGJ Delivery past period----YYYY---
gjmeter_value_v4_timestampDateTimeTimestamp of the last reading----YYYY---
Channels for the heating meter
meter_valve_switch_positionNumberGJ Meter Valve position---YYYY----
meter_equipment_identifierStringHeating Meter IDY----------
hmeter_equipment_identifier_v2_2StringHeating Meter ID--Y--------
hmeter_value_v2Number:EnergyHeating Delivery past periodY-Y--------
hmeter_value_v2_timestampDateTimeTimestamp of the last readingY-Y--------
m3 Meter Device Type----YYYY---
meter_equipment_identifierStringm3 Meter ID----YYYY---
m3meter_valueNumber:Volumem3 Delivery past period----YYYY---
meter_valve_switch_positionNumberm3 Meter Valve position----YYY----
Channels for the water meter
meter_device_typeStringWater Meter Device Type---Y-------
meter_equipment_identifierStringWater Meter IDY--Y-------
wmeter_equipment_identifier_v2_2StringWater Meter ID--Y--------
wmeter_value_v2Number:VolumeWater Delivery past periodY-Y--------
wmeter_value_v2_timestampDateTimeTimestamp of the last readingY-Y--------
wmeter_value_v3Number:VolumeWater Delivery past period---Y-------
meter_valve_switch_positionNumberWater Meter Valve position---Y-------

note 2. The power failure log has a dynamic number of entries starting at 0. So emeter_power_failure_log_timestamp0, emeter_power_failure_log_duration0 refers to the first entry, emeter_power_failure_log_timestamp1, emeter_power_failure_log_duration1 refers to the second entry, etc.

Channel identifier: dsmr:<ThingTypeID>:<bridge id>:<id>:<channel type id>

  • ThingTypeID. See table with supported meters
  • BridgeID. The configured id for the bridge
  • id. The configured id for the ThingType you want to address
  • channel type id. The channel type id

The following configuration must to be added to an item configuration file. E.g. things/dsmr.items

dsl
ItemType <name> "<description>" (<Group>) {channel="<Channel identifier>"}
Examples ​
dsl
Number:Energy MeterDeliveryTariff0 "Delivered Low Tariff [%.3f kWh]" {channel="dsmr:electricity_v5_0:mysmartmeter:electricityV5:emeter_delivery_tariff1}

Full configuration example ​

things/dsmr.things

dsl
Bridge dsmr:dsmrBridge:mysmartmeter [serialPort="/dev/ttyUSB0"] {
    Things:
        device_v5 dsmrV5Device [channel=-1]
        electricity_v5_0 electricityV5 [channel=0]
}

things/dsmr.items

dsl
String P1Version "P1 Version output" {channel="dsmr:device_v5:mysmartmeter:dsmrV5Device:p1_version_output"}
Number:Energy MeterDeliveryTariff0 "Delivered Low Tariff [%.3f kWh]" {channel="dsmr:electricity_v5_0:mysmartmeter:electricityV5:emeter_delivery_tariff1"}
Number:Energy MeterDeliveryTariff1 "Delivered High Tariff [%.3f kWh]" {channel="dsmr:electricity_v5_0:mysmartmeter:electricityV5:emeter_delivery_tariff2"}

Determine M-Bus channel ​

By manually trigger the discovery process, you can use the logging to find out a M-Bus channel. Look for the following logfile line: <Timestamp> [INFO ] [<class>] - New compatible meter: [Meter type: M3_V5_0, channel: 1, Meter type: ELECTRICITY_V5, channel: 0]

Here you find the ThingTypeID (it is stated only in capitals) and the M-Bus channel. The above example would lead to the following Thing definition

dsl
Bridge definition {
    Things:
        m3_v5_0 mygasmeter [channel=1]
        electricity_v5 [channel=0]
}