What is SML?
SML (Smart Message Language) explained: the protocol of German smart meters, the optical interface, the PIN, OBIS codes and what a telegram contains.
On this page
SML (Smart Message Language) is the binary protocol German electricity meters use to report their readings. It is specified by the BSI in TR-03109-1, Annex IV, and what a basic meter must send is fixed by the FNN Lastenheft EDL. If you want to read your own meter, a heat pump's or a PV system's, this page explains what you are looking at.
Which meters send SML🔗
| Meter | German name | Speaks SML |
|---|---|---|
| Basic digital meter, no communication module | moderne Messeinrichtung (mME) | Yes, on its optical interface |
| Smart metering system: a basic meter plus a gateway | intelligentes Messsystem (iMSys) | Yes, between meter and gateway (the LMN) and on the optical interface |
| Older electronic household meter | elektronischer Haushaltszähler (eHZ, EDL21) | Usually; some older models send IEC 62056-21 text instead |
| Ferraris meter (spinning disc) | Ferraris-Zähler | No |
SML or IEC 62056-21? Some older meters send readable text such as 1-0:1.8.0*255(00012345.6*kWh), starting with a line like /ESY5Q3DA1004. That is IEC 62056-21 (often called D0), a different protocol. SML is binary; every frame starts with 1b 1b 1b 1b 01 01 01 01. The capture tool tells you which one your meter sends.
The optical interface🔗
A basic meter has an infrared interface on its front. It pushes a telegram on its own, typically every one to four seconds, at 9600 baud, 8 data bits, no parity, one stop bit (8N1). Nothing has to be sent to the meter.
To receive it you need an infrared reading head: a phototransistor in a housing with a ring magnet that holds it on the meter's interface, connected over USB or to a microcontroller's UART. Many projects sell or document one; the open-source volkszaehler.org community has built designs for years.
A second, bidirectional interface for the meter operator (the MSB interface) is usually sealed. A gateway or a service tool uses it, or the LMN, to ask the meter for parameters and profiles: see Talking to a meter.
The PIN and the data sets🔗
Out of the box, most basic meters send a reduced data set: energy in whole kilowatt-hours and no instantaneous power. The meter operator (Messstellenbetreiber, named on your bill) gives you a four-digit PIN. Enter it by flashing a torch at the meter's light sensor, then switch on the extended data set (on many meters the menu item is called InF). From then on the meter sends energy to 0.1 Wh and power in watts.
sml-kit decodes either data set exactly as sent; it cannot add precision the meter does not send.
What a telegram contains🔗
One push telegram is one transport frame holding an SML file of three messages:
OpenResponse: the meter opens the file and names itself (its server ID).GetListResponse: the readings, a list of entries.CloseResponse: the file ends.
Each message carries its own CRC, and the frame has another. A reading is a list entry:
| Field | Example | Meaning |
|---|---|---|
objName | 1-0:1.8.0*255 | What the value is: an OBIS code |
status | 0x182 | Device status bits, e.g. the energy direction |
unit | 30 | Wh, from the DLMS unit table |
scaler | -1 | The decimal exponent: × 10⁻¹ |
value | 153385557 | The raw integer |
Together: 153385557 × 10⁻¹ Wh = 15338555.7 Wh. sml-kit keeps that as an exact Quantity, never a float. The bytes behind each field are on The wire format.
OBIS codes🔗
An OBIS code (IEC 62056-61) names a value as A-B:C.D.E*F:
| Part | In 1-0:1.8.0*255 | Means |
|---|---|---|
| A | 1 | Medium: electricity |
| B | 0 | Channel |
| C | 1 | Quantity: 1 active power import (+A), 2 export (−A), 16 net active power, 32/52/72 voltage L1–L3 |
| D | 8 | Processing: 8 energy (time integral), 7 instantaneous value |
| E | 0 | Tariff: 0 total, 1 and 2 tariff registers |
| F | 255 | Unused |
So 1.8.0 is the energy you bought, 2.8.0 the energy you fed in, and 16.7.0 the power right now. The Getting started page lists the codes sml-kit names.
Signatures🔗
Some meters sign values and send a public key (OBIS 129-129:199.130.5). A CRC detects transmission errors, not forgery. sml-kit exposes signatures as bytes and does not verify them, so treat readings from a channel others can reach as untrusted.
Glossary🔗
- A+ / A−: active energy imported from / exported to the grid.
- eHZ: elektronischer Haushaltszähler, the electronic household meter form factor.
- EDL21: an eHZ with the functions of the FNN Lastenheft EDL: an INFO interface that pushes SML.
- iMSys: intelligentes Messsystem, a basic meter connected to a smart-meter gateway.
- LMN: local metrological network, the link between meters and their gateway.
- mME: moderne Messeinrichtung, the basic digital meter.
- MSB: Messstellenbetreiber, the meter operator; also the name of the operator's interface.
- OBIS: Object Identification System, the names of meter values (IEC 62056-61).
- Server ID: the meter's identity, printed on it as e.g.
1 ISK00 75126084. - SMGW: smart-meter gateway, specified by BSI TR-03109.