$npx skillfedfor your agent

dlms-cosem

A Python library for DLMS/COSEM

With conditionsPyPI Python ModulesReleased Mar 202584.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — dlms_cosem-25.1.0-py3-none-any.whl
v25.1.0 · released 2025-03-26 · Python ~=3.7 · 7 runtime deps: attrs, pyserial, cryptography, asn1crypto, python-dateutil, typing-extensions, structlog

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

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.
Same gist for agents: .md · .json

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.

With conditions

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

LicenseMIT permissive
Python supportSupports the current Python release ~=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
7 packages
attrspyserialcryptographyasn1cryptopython-dateutiltyping-extensionsstructlog
MaintenanceActively maintained 506 days since the last release
Last repo commit
First released
Downloads84,187 / month, #14,021 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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

Capabilities
dlms cosem energy meter clientsmart meter protocol librarydlms apdu encoding decodingenergy meter communicationhdlc tcp meter readingcosem protocol implementationamr metering data collection
Topics
smart-meteringprotocol-implementationenergy-data
PyPI keywords
AMRMeteringsmart metersMDMdlmscosem

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

idna Worth it
PyPI · Python Modules · released Jun 2026

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.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

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.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

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…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pysml · dsmr-parser · pydiscovergy · p1monitor · pysma · ovoenergy · openmeter · greeneye_monitor · python-homewizard-energy · pyTibber