dsmr-parser
Library to parse Dutch Smart Meter Requirements (DSMR)
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-parseruv
uv add dsmr-parserpoetry
poetry add dsmr-parserInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pysmlReads and parses Smart Message Language (SML)…
permissive · top 15,000 on PyPI
dlms-cosemA Python library for implementing DLMS/COSEM…
permissive · top 15,000 on PyPI
p1monitorAsynchronous Python client library for reading…
permissive · top 15,000 on PyPI
pydiscovergyAsynchronous Python client for querying…
permissive · top 15,000 on PyPI
HATasmotaParses and constructs Tasmota MQTT messages,…
permissive · top 15,000 on PyPI
PyCampbellCR1000Communicates with Campbell CR1000-type…
copyleft · top 15,000 on PyPI
pyemvuePyEmVue reads energy usage data from Emporia…
permissive · top 15,000 on PyPI
python-homewizard-energyAsyncio client library for communicating with…
permissive · top 15,000 on PyPI
telegramify-markdownConverts Markdown to Telegram plain text with…
permissive · top 15,000 on PyPI
pymysensorsPython API for communicating with MySensors…
permissive · top 15,000 on PyPI