You are offline. The tools work from the copy saved in this browser; pages you have not opened yet need a connection.
P1 Telegram Decoder
Paste a telegram from the P1 port of a Dutch (DSMR) or Belgian smart meter. You get the CRC check, the power right now, the meter readings and every OBIS code explained.
Telegram
ExamplePaste everything from the line starting with / to the line with ! and the CRC, for example from a serial terminal, ser2net or a log. Line breaks and indentation added by copying do not matter.
Result
| CRC | |
|---|---|
| Standard | |
| Meter (header) | |
| Meter time | |
| Energy from the grid | |
| Energy to the grid | |
| Active tariff | |
| Serial port | |
| Home Assistant |
Per phase
| Phase | V | A | Import W | Export W |
|---|
Gas and water meters (M-Bus)
| Channel | Device | Last reading |
|---|
All values
| OBIS · Meaning | Value |
|---|
Runs entirely in your browser. Nothing you enter is sent to a server.
P1 OBIS codes
Data objects of the Dutch DSMR 5.0.2 P1 standard (Netbeheer Nederland) and the Belgian e-MUCS P1 2.1 (Fluvius). n is the M-Bus channel 1–4 of the gas or water meter. Units as the meter sends them. NL = Netherlands (DSMR), BE = Belgium (e-MUCS).
| OBIS | Meaning |
|---|---|
| 1-3:0.2.8 | DSMR version of the telegramNL |
| 0-0:96.1.4 | Version (DSMR P1 + e-MUCS)BE |
| 0-0:1.0.0 | Date and time of the telegramNL, BE |
| 0-0:96.1.1 | Meter serial numberNL, BE |
| 0-0:96.1.2 | EAN code of the connectionBE |
| 1-0:1.8.1 | Energy from the grid, tariff 1kWh · NL, BE |
| 1-0:1.8.2 | Energy from the grid, tariff 2kWh · NL, BE |
| 1-0:2.8.1 | Energy to the grid, tariff 1kWh · NL, BE |
| 1-0:2.8.2 | Energy to the grid, tariff 2kWh · NL, BE |
| 0-0:96.14.0 | Active tariffNL, BE |
| 1-0:1.7.0 | Power from the grid nowkW · NL, BE |
| 1-0:2.7.0 | Power to the grid nowkW · NL, BE |
| 1-0:1.4.0 | Average power, current quarter hourkW · BE |
| 1-0:1.6.0 | Highest quarter-hour power this monthkW · BE |
| 0-0:98.1.0 | Monthly peaks, last 13 monthskW · BE |
| 1-0:32.7.0 | Voltage L1V · NL, BE |
| 1-0:52.7.0 | Voltage L2V · NL, BE |
| 1-0:72.7.0 | Voltage L3V · NL, BE |
| 1-0:31.7.0 | Current L1A · NL, BE |
| 1-0:51.7.0 | Current L2A · NL, BE |
| 1-0:71.7.0 | Current L3A · NL, BE |
| 1-0:21.7.0 | Power from the grid L1kW · NL, BE |
| 1-0:41.7.0 | Power from the grid L2kW · NL, BE |
| 1-0:61.7.0 | Power from the grid L3kW · NL, BE |
| 1-0:22.7.0 | Power to the grid L1kW · NL, BE |
| 1-0:42.7.0 | Power to the grid L2kW · NL, BE |
| 1-0:62.7.0 | Power to the grid L3kW · NL, BE |
| 0-0:96.7.21 | Power failures (any phase)NL |
| 0-0:96.7.9 | Long power failures (any phase)NL |
| 1-0:99.97.0 | Long power failure log (end, duration)s · NL |
| 1-0:32.32.0 | Voltage sags L1NL |
| 1-0:52.32.0 | Voltage sags L2NL |
| 1-0:72.32.0 | Voltage sags L3NL |
| 1-0:32.36.0 | Voltage swells L1NL |
| 1-0:52.36.0 | Voltage swells L2NL |
| 1-0:72.36.0 | Voltage swells L3NL |
| 1-0:94.32.1 | Grid connection (230 = 3×230 V, 400 = 3N 400 V)V · BE |
| 0-0:96.3.10 | Main breaker stateBE |
| 0-0:17.0.0 | Power limiter thresholdkW · BE |
| 1-0:31.4.0 | Fuse supervision thresholdA · BE |
| 0-n:96.3.10 | Virtual relay stateBE |
| 0-0:96.13.0 | Text messageNL, BE |
| 0-0:96.13.1 | Message codeNL |
| 0-n:24.1.0 | M-Bus device typeNL, BE |
| 0-n:96.1.0 | M-Bus device serial numberNL |
| 0-n:96.1.1 | M-Bus device serial numberBE |
| 0-n:96.1.2 | EAN code of the sub-meterBE |
| 0-n:24.2.1 | Last reading of the sub-meter (with time)m³, GJ · NL, BE |
| 0-n:24.2.3 | Last reading of the sub-meter (with time)m³ · BE |
| 0-n:24.4.0 | Gas valve stateBE |
The P1 port
RJ12 socket on the meter. The meter sends while Data Request (pin 2) is held at 4.0–5.5 V. DSMR 4 and 5 use 115200 baud 8N1; DSMR 5 sends every second, DSMR 4 every ten seconds. The data line is an open collector behind an optocoupler and logically inverted, so the receiver needs a pull-up resistor and an inverted input.
| Pin | Signal |
|---|---|
| 1 | +5 V supply (DSMR 5: up to 250 mA) |
| 2 | Data Request (input) |
| 3 | Data GND |
| 4 | not connected |
| 5 | Data (output, open collector) |
| 6 | Power GND |
What the P1 port sends
Smart electricity meters in the Netherlands and Belgium, and many in Luxembourg, Switzerland and Hungary, have a P1 port for your own devices. A DSMR 5 meter sends a telegram every second: a header line starting with /, an empty line, one line per value and a last line with ! and a CRC. Every value line starts with an OBIS code and has the value in brackets, with the unit after *: 1-0:1.8.1(004512.347*kWh) is 4512.347 kWh taken from the grid at tariff 1. The order of the lines is not fixed, so software has to find values by their code, not by position.
Reading the OBIS codes
The code has the form A-B:C.D.E. In P1 telegrams A is 1 for electrical values and 0 for general data and the sub-meters. B is the channel: 0 is the electricity meter itself, 1 to 4 are gas or water meters connected over M-Bus, in the order they were installed. That is why the gas reading is 0-1:24.2.1 on one house and 0-2:24.2.1 on another. C says what is measured (1 = from the grid, 2 = to the grid, 32/52/72 = voltage L1/L2/L3, 31/51/71 = current), D how (7 = value right now, 8 = energy register) and E the tariff.
Common mistakes
- Nothing arrives. The meter only sends while Data Request (pin 2) is held at 5 V. A cable that leaves pin 2 open gets nothing.
- Garbage characters. The data line is inverted and needs a pull-up. A plain USB serial adapter reads nonsense. Also check the speed: 115200 8N1 for DSMR 4 and 5, 9600 7E1 for old DSMR 2.2 and 3 meters.
- Tariffs swapped. Tariff 1 is the low tariff in the Netherlands but the high/normal tariff in Belgium.
- The gas reading seems stuck. Sub-meter values come with their own timestamp: every five minutes on DSMR 5 and Belgian meters, once an hour on DSMR 4.
- CRC errors after copying. The CRC covers every character, including line endings. This page rebuilds the CR LF line endings, so a pasted telegram that still fails was changed or cut off.
Home Assistant
The built-in DSMR Smart Meter integration reads the port directly and asks for the DSMR version. The decoder suggests it from the telegram. If a value in Home Assistant looks wrong, copy one telegram from ser2net or a serial terminal and paste it here to see what the meter really sends.
Questions from practice
What CRC does a P1 telegram use?
CRC-16 with the polynomial x16+x15+x2+1, least significant bit first, without XOR at the start or end. That is the algorithm usually called CRC-16/ARC. It covers every character from / up to and including !, the CR LF line endings too, and is written after ! as four hex digits. DSMR 2.2 and 3 telegrams have no CRC. You can also check it in the CRC calculator.
Why do I get nothing or only garbage from the P1 port?
Three usual causes. Data Request (pin 2) must be held at 5 V, otherwise the meter stays silent. The data line is an open collector and inverted, so it needs a pull-up resistor and an inverted input; ready-made P1 cables do this, a plain USB serial adapter does not. And the speed must match: 115200 baud 8N1 for DSMR 4 and 5, 9600 baud 7E1 for DSMR 2.2 and 3.
Is tariff 1 the low or the high tariff?
It depends on the country. Dutch meters (DSMR) use 1 for low and 2 for normal. Belgian meters (e-MUCS) use 1 for high/normal and 2 for low. The line 0-0:96.14.0 shows which tariff is running now. For the total consumption add both registers, 1-0:1.8.1 and 1-0:1.8.2.
Which DSMR version do I choose in Home Assistant?
For Dutch meters 2.2, 4 or 5 by the version line 1-3:0.2.8 (50 means 5.0, 42 means 4.2). Telegrams without a version line and without a CRC are old DSMR 2.2 or 3. Belgian meters use 5B, Luxembourg 5L, Sweden 5S and the EasyMeter Q3D its own option. The decoder fills in the suggestion under Home Assistant.
What are 1-0:1.4.0 and 1-0:1.6.0 on a Belgian meter?
They belong to the capacity tariff in Flanders, where part of the grid fee depends on the highest quarter-hour average power of each month. 1-0:1.4.0 is the average power of the quarter hour in progress, 1-0:1.6.0 this month's peak with its time, and 0-0:98.1.0 the peaks of the last 13 months. Fluvius bills at least 2.5 kW even if the peak is lower.
Related tools
- 4–20 mA ScalingRaw values to engineering units, 0–10 V and 4–20 mA with fault detection.
- IEEE 754 ConverterFloat32 and Float64 to hex and back, bit by bit, with registers for every byte order.
- CRC-8 / CRC-16 / CRC-32 CalculatorAny CRC from 3 to 82 bits: 113 named algorithms, your own parameters, and finding which CRC a device uses.
- S5TIME / DT / DTL ConverterSiemens S7 time formats: S5TIME, TIME, DATE, TOD, DATE_AND_TIME and DTL to raw hex and Modbus registers and back.
- Pt100 / Pt1000 CalculatorResistance to temperature and back per IEC 60751, with 2-wire lead error and tolerance classes.
- Thermocouple CalculatormV to °C and back for types K, J, T, E, N, R, S and B, with cold junction compensation.
- Register DecoderFloat32, Int32, UInt16 and bits in every byte order, plus Find my value.
- Address Converter40001 ↔ offset 0, 4x/3x/0x/1x notation, 5- and 6-digit addresses.
- Value EncoderTurn a value like 230.5 into registers for every byte order.
- CRC-16 CalculatorModbus RTU checksum in wire order, plus a full frame check.
- Frame DecoderRead RTU and TCP frames from Wireshark or a serial log.
- Request GeneratorRead and write requests in RTU, TCP and ASCII, plus a check of the reply.
- Frame ConverterThe same Modbus frame as RTU, TCP and ASCII, with CRC, header and LRC recalculated.
- Function & Exception CodesWhat each code means and the usual cause in practice.
- Status Word DecoderName each bit of a 16- or 32-bit status register.
- Modbus RTU Timing CalculatorCharacter time, t1.5 and t3.5, frame length, shortest timeout and how many reads per second fit on the line.
- Register mapsReady-made register maps for meters, inverters and batteries.