skillfed

dsmr-parser

Library to parse Dutch Smart Meter Requirements (DSMR)

dsmr-parser v1.11.2 82.1K downloads/30d#14,184 on PyPI129
Permissive license MIT Active released

What it is and what it does

dsmr-parser is a library for reading and parsing Dutch Smart Meter (P1 port) data. It provides both low-level parsing of raw DSMR telegram strings and high-level client implementations for reading directly from serial ports, TCP sockets, or remote serial servers. The library normalizes meter readings (electricity usage, tariffs, gas consumption, current draw) into structured Telegram objects with typed values and units.

The package supports three usage patterns: synchronous serial or socket clients (blocking, suitable for dedicated processes), a parsing module for pre-captured telegram strings, and an asyncio-based TCP client for non-blocking integration. It handles multiple DSMR protocol versions transparently, allowing you to specify the version when creating a reader or parser. Telegrams are returned as objects with named attributes for each meter value, though the legacy dictionary interface is preserved for backwards compatibility.

Use it for:

  • Read electricity and gas consumption from a Dutch smart meter connected via serial port and log or store the data.
  • Parse raw DSMR telegram strings captured from a meter or ser2net proxy into structured meter readings.
  • Build an asyncio-based home automation or monitoring service that consumes meter data from a remote TCP endpoint.
  • Extract specific meter values (current usage, tariff counters, timestamps) from parsed telegrams for real-time dashboards.
  • Support multiple DSMR protocol versions in a single application by switching telegram specifications at runtime.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses Dutch Smart Meter Requirements (DSMR) telegram data from serial ports, sockets, or raw strings, supporting DSMR versions 2, 3, 4, and 5.

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It directly solves a specific, well-defined problem (DSMR parsing) with multiple integration patterns. Install it if you need to read Dutch smart meter data; skip it if you don't have a P1 port or DSMR source.

Install

dsmr-parser on PyPI

pip

pip install dsmr-parser

uv

uv add dsmr-parser

poetry

poetry add dsmr-parser

Installing dsmr-parser

Before you install

Low friction: pure Python wheel with only three runtime dependencies (serialx, Tailer, dlms_cosem). Actively maintained with a recent release (13 days old) and steady commit history.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

from dsmr_parser import telegram_specifications
from dsmr_parser.parsers import TelegramParser

parser = TelegramParser(telegram_specifications.V4)
telegram = parser.parse(telegram_str)  # telegram_str is a raw DSMR telegram
print(telegram.electricity_used_tariff_1.value)  # access parsed meter value

Requires Python 3.10 or later. For serial client usage, a physical serial port or ser2net proxy must be available.

Verify before relying

  • Whether all three runtime dependencies (serialx, Tailer, dlms_cosem) are themselves actively maintained and secure.
  • Whether the asyncio implementation fully supports all DSMR versions or has version-specific limitations beyond what the description states.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 3 — serialx, Tailer, dlms_cosem
Maintenance actively maintained — 13 days since the last release
Last repo commit
First released
Downloads 82,110/month — #14,184 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dsmr_parser-1.11.2-py3-none-any.whl

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

DSMR telegram parserDutch smart meter dataP1 port readerelectricity meter parsingsmart meter serial clientDSMR protocol parsermeter data extraction
smart-meterdsmriot-data

More Utilities packages