DSMR Binding

The DSMR-binding is targeted for dutch users having a Smart Meter ('Slimme meter' in dutch). Data of Dutch Smart Meters can be obtained via the P1-port. When connecting this port to a serial port of a PC the data can be read out.

This binding reads out the P1-port of the Dutch Smart Meters that comply to DSMR v2.1, DSMR v2.2, DSMR v3.0, DSMR v4.0 or DSMR v4.04.

Global Binding Configuration

To enable the binding the following global settings are necessary:
dsmr:port The serial port where the P1-port is connected to. E.g.:
dsmr:port=/dev/ttyUSB1 (Linux)
dsmr:port=COM3 (Windows)
Default: <empty>
dsmr:version The DSMR version for the smart meter (supported values: v2.1, v2.2, v3.0, v4.0, v4.04). E.g.
dsmr:version=v3.0
Default: <empty>
dsmr:gas.channel The M-BUS channel where a gas meter is connected (number values are supported). E.g.
dsmr:gas.channel=1
Default: <empty>
dsmr:water.channel The M-BUS channel where a water meter is connected (number values are supported). E.g.
dsmr:water.channel=1
Default: <empty>
dsmr:heating.channel The M-BUS channel where a heating meter is connected (number values are supported). E.g.
dsmr:heating.channel=1
Default: <empty>
dsmr:cooling.channel The M-BUS channel where a cooling meter is connected (number values are supported). E.g.
dsmr:cooling.channel=1
Default: <empty>
dsmr:generic.channel The M-BUS channel where a generic meter is connected (number values are supported). E.g.
dsmr:generic.channel=1
Default: <empty>
dsmr:slaveelectricity.channel The M-BUS channel where the slave electricity meter is connected (number values are supported). E.g.
dsmr:slaveelectricity.channel=1
Default: <empty>

Differences between DSMR versions

The communication settings for DSMR v4 (115200 8n1) and up differ from previous versions (9600 7e1). If you use the wrong version here no data will be received.

If the communication is up, the most elimentary electricity values will work even if the wrong version is configured. Configuring the wrong version, may result in not having all values available in openHAB and the log may contain problems.

Logging

Increasing the loglevel of org.openhab.binding.dsmr will give a lot of detailed information.

Generic Item Binding Configuration

In order to bind an item to the DSMR binding, you need to provide configuration settings.

The syntax for the DSMR binding configuration string is: dsmr="[dsmr value]"

The following table shows the full list of values

DSMR valueDescriptionSupported for DSMR versionUnit
General P1 Values
P1VersionOutputVersion information for P1 outputv4.0 and up
P1TimestampTimestamp of the P1 outputv4.0 and up
Electricity meter values
eEquipmentIdEquipment identifierAll versions
eDeliveryTariff1Total meter delivery tariff 1All versionskWh
eDeliveryTariff2Total meter delivery tariff 2All versionskWh
eProductionTariff1Total meter production tariff 2All versionskWh
eProductionTariff2Total meter production tariff 2All versionskWh
eTariffIndicatorTariff indicatorAll versions
eActualDeliveryActual power deliveryAll versionskW
eActualProductionActual power productionAll versionskW
eTresholdThe actual threshold ElectricityAll versionsA for v2.1, v2.2, v3.0
kW for v4.0 and v4.04
eSwitchPositionActual switch positionAll versions
ePowerFailuresNumber of power failuresv4.0 and up
eLongPowerFailuresNumber of long power failuresv4.0 and up
eNumberOfLogEntriesNumber of power failure entries in the event logv4.0 and up
eDatePowerFailureXDate of power failure (entry X)v4.0 and up
X is a value [1-10]
eDurationPowerFailureXDuration of power failure (entry X)v4.0 and up
X is a value [1-10]
seconds
eVoltageSagsL1Number of voltage sags L1v4.0 and up
eVoltageSagsL2Number of voltage sags L2v4.0 and up
eVoltageSagsL3Number of voltage sags L3v4.0 and up
eVoltageSwellsL1Number of voltage swells L1v4.0 and up
eVoltageSwellsL2Number of voltage swells L2v4.0 and up
eVoltageSwellsL3Number of voltage swells L3v4.0 and up
eTextCodeVersion information for P1 outputAll versions
eTextMessageVersion information for P1 outputAll versions
eInstantCurrentL1Instantenous current L1v4.04 and upA
eInstantCurrentL2Instantenous current L2v4.04 and upA
eInstantCurrentL3Instantenous current L3v4.04 and upA
eInstantPowerDeliveryL1Instantenous active power delivery L1v4.04 and upkW
eInstantPowerDeliveryL2Instantenous active power delivery L2v4.04 and upkW
eInstantPowerDeliveryL3Instantenous active power delivery L3v4.04 and upkW
eInstantPowerProductionL1Instantenous active power production L1v4.04 and upkW
eInstantPowerProductionL2Instantenous active power production L2v4.04 and upkW
eInstantPowerProductionL3Instantenous active power production L3v4.04 and upkW
Gas meter values
gDeviceTypeDevice Typev3.0 and up
gEquipmentIdEquipment identifierAll versions
gValueTSTimestamp of the last measurement (local time)v4.0 and up
Date & time
gNumberOfValuesNumber of values available for gValue en gValueXv3.0
gUnitUnit of the valuesv3.0
gValueDelivery of:
-Last hour (v3.0 / v4.0 and up)
-Last 24 hours (v2.1 / v2.2)
All versions2
m3
gValueXMeter reading X of the buffer (hourly period)v3.02

X is a value [2-10]
Higher values are older
m3
gProfileStatusUnknownv3.0
gRecordingPeriodDuration of a value recordingv3.0minutes
gValueCompensatedTemperature compensated delivery of the last 24 hoursv2.1 and v2.2m3
gValvePositionValve positionAll versions
Gas meter values
Thermal meter (heating) values
hDeviceTypeDevice Typev3.0 and up
hEquipmentIdEquipment identifierAll versions
hValueTSTimestamp of the last measurement (local time)v4.0 and up
Date & time
hValueLast hour deliveryAll versions
GJ
hValvePositionValve positionv3.0 and up
Thermal meter (cooling) values
cDeviceTypeDevice Typev3.0 and up
cEquipmentIdEquipment identifierAll versions
cValueTSTimestamp of the last measurement (local time)v4.0 and up
Date & time
cValueLast hour deliveryAll versions
GJ
cValvePositionValve positionv3.0 and up
Water meter values
wDeviceTypeDevice Typev3.0 and up
wEquipmentIdEquipment identifierAll versions
wValueTSTimestamp of the last measurement (local time)v4.0 and up
Date & time
wValueLast hour deliveryAll versions
m3
wValvePositionValve positionv3.0 and up
Generic meter values
genericDeviceTypeDevice Typev3.0
genericEquipmentIdEquipment identifierv3.0
genericValueLast hour deliveryv3.0
genericValvePositionValve/Switch positionv3.0
Slave electricity meter values
seDeviceTypeDevice Typev4.0 and up
seEquipmentIdEquipment identifierv4.0 and up
seValueTSTimestamp of the last measurement (local time)v4.0 and up
Date & time
seValueLast hour deliveryv4.0 and up
kWh
seSwitchPositionSwitch positionv4.0 and up
Readings currently not supported for V3.0, v4.0 and v4.04
2 Gas values for DSMR v3.0 are available in a list of max. 10 entries. The binding assumes the first value is the most recent (and thus available in gValue)

Examples

Number P1_Actual_Delivery "Huidig verbruik [%.3f kW]" {dsmr="eActualDelivery"}
Number P1_Meter_DeliveryLow "Meterstand verbruik daltarief [%.3f kWh]" {dsmr="eDeliveryTariff1"}
Number P1_Meter_DeliveryNormal "Meterstand verbruik[%.3f kWh]" {dsmr="eDeliveryTariff2"}

Test results

MeterDSMR VersionElectricityGasWaterHeatingCoolingGeneralSlave Electricity
Landys + Gyr E3503.0OKNot testedNot testedNot testedNot testedNot testedN/A
Kaifa E00034.04OK1OKNot testedNot testedNot testedN/ANot tested
1 Power Failure Log (eDatePowerFailureX, eDurationPowerFailureX) not tested

Remarks