dlms-cosem
A Python library for DLMS/COSEM
Decision gist · record as of 2026-08-14
Yes, if you need to communicate with DLMS/COSEM meters and accept the Business Source License restrictions. The library is actively maintained, has low install friction, no known vulnerabilities, and provides a well-structured sans-io implementation. However, verify that the license permits your use case (commercial meter reading is restricted unless you contact the maintainer) and that your target meters are supported or compatible with the library's abstraction layer.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a DLMS/COSEM-enabled meter or server accessible over TCP or serial connection; blocking I/O model means synchronous operations only.
- Low friction installation with a pure-Python wheel and seven common dependencies.
- The library is actively maintained with recent releases and no known vulnerabilities, though it has been 506 days since the latest release.
License · maintenance · safety
MIT (permissive) — Licensed under Business Source License 1.1 (not fully open source), which permits internal use, non-commercial education, and research but restricts competing commercial uses. Will eventually transition to Apache License 2.0; contact the maintainer for alternative licensing.
last release 2025-03-26 (506 days) · last repo commit 2026-05-19 · 119 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 84,187 downloads/mo, #14,021 on PyPI
Alternatives
Verify before relying
pip install dlms-cosem
from dlms_cosem.client import DlmsClient
from dlms_cosem.io import BlockingTcpIO, TcpTransport
from dlms_cosem.security import NoSecurityAuthentication
tcp_io = BlockingTcpIO(host="localhost", port=4059)
transport = TcpTransport(io=tcp_io, server_logical_address=1, client_logical_address=16)
client = DlmsClient(transport=transport, authentication=NoSecurityAuthentication())- Whether the library supports all DLMS/COSEM companion standards (DSMR, IDIS, UNI/TS 11291) equally or if meter-specific quirks require custom code.
- Performance characteristics and scalability limits for concurrent meter connections or high-frequency polling.
- Current state of server/meter emulator support beyond the stated lack of full implementation.
What it is and what it does
dlms-cosem is a Python client library for the DLMS/COSEM protocol, which is the international standard for smart meter communication. It provides low-level protocol handling—APDU encoding and decoding, encryption/decryption, and session state management—so you can read and write data on energy meters. The library implements a sans-io design, meaning the protocol logic is separate from I/O, but ships with a blocking client for serial (HDLC) and TCP transports. It supports authentication methods including HLS-GMAC, LLS, and HLS-Common, as well as global ciphering for encrypted communication.
You use it by composing a transport (TCP or serial), an authentication method, and a DlmsClient, then call methods like get(), set(), and action() to interact with meter attributes. The library is designed for reading invocation counters, energy consumption data, and other meter-specific attributes defined by OBIS codes. It has been tested on several real meters (Iskraemeco AM550, Itron SL7000, Hexing HXF300, and others) and is actively maintained, though it does not yet support building a full meter emulator.
Use it for
- Read energy consumption data from smart meters in production networks using IDIS or DSMR standards.
- Implement automated meter reading (AMR) systems that poll multiple meters over TCP or serial connections.
- Develop meter integration layers for distribution service operators (DSOs) with manufacturer-specific meter configurations.
- Test and debug DLMS/COSEM protocol communication with meters or test servers in development environments.
- Build non-commercial research or educational tools for studying smart meter protocols and data models.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to communicate with DLMS/COSEM meters and accept the Business Source License restrictions.
The library is actively maintained, has low install friction, no known vulnerabilities, and provides a well-structured sans-io implementation. However, verify that the license permits your use case (commercial meter reading is restricted unless you contact the maintainer) and that your target meters are supported or compatible with the library's abstraction layer.
Install
dlms-cosem on PyPI
Before you install
Low friction installation with a pure-Python wheel and seven common dependencies. The library is actively maintained with recent releases and no known vulnerabilities, though it has been 506 days since the latest release.
Requires a DLMS/COSEM-enabled meter or server accessible over TCP or serial connection; blocking I/O model means synchronous operations only.
License in practice
Licensed under Business Source License 1.1 (not fully open source), which permits internal use, non-commercial education, and research but restricts competing commercial uses. Will eventually transition to Apache License 2.0; contact the maintainer for alternative licensing.
Quickstart
pip install dlms-cosem
from dlms_cosem.client import DlmsClient
from dlms_cosem.io import BlockingTcpIO, TcpTransport
from dlms_cosem.security import NoSecurityAuthentication
tcp_io = BlockingTcpIO(host="localhost", port=4059)
transport = TcpTransport(io=tcp_io, server_logical_address=1, client_logical_address=16)
client = DlmsClient(transport=transport, authentication=NoSecurityAuthentication())
Verify before relying
- Whether the library supports all DLMS/COSEM companion standards (DSMR, IDIS, UNI/TS 11291) equally or if meter-specific quirks require custom code.
- Performance characteristics and scalability limits for concurrent meter connections or high-frequency polling.
- Current state of server/meter emulator support beyond the stated lack of full implementation.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release ~=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesattrspyserialcryptographyasn1cryptopython-dateutiltyping-extensionsstructlog |
| Maintenance | Actively maintained 506 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,187 / month, #14,021 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: Other/Proprietary LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: CommunicationsTopic :: Software Development :: Libraries :: Python Modules |
Evidence: dlms_cosem-25.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dlms cosem energy meter client”
- dlms-cosemA Python library for implementing DLMS/COSEM protocol clients to read…
- ovoenergyA Python client library for querying energy consumption and account…
- p1monitorAsynchronous Python client library for reading smart meter and water…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pysml · dsmr-parser · pydiscovergy · p1monitor · pysma · ovoenergy · openmeter · greeneye_monitor · python-homewizard-energy · pyTibber