A Python library for DLMS/COSEM
Project description
# A Python library for DLMS/COSEM.
[![codecov](https://codecov.io/gh/pwitab/dlms-cosem/branch/master/graph/badge.svg?token=RO37L11VQJ)](https://codecov.io/gh/pwitab/dlms-cosem) ![run-tests](https://github.com/pwitab/dlms-cosem/workflows/run-tests/badge.svg) ![build-docs](https://github.com/pwitab/dlms-cosem/workflows/build-docs/badge.svg)
<img src=”dlms-logo.png” alt=”dlms_logo” width=”200”/>
# Installation We only support Python 3.6+
` pip install dlms-cosem `
# Documentation
Full documentation can be found at [www.dlms.dev](https://www.dlms.dev)
# About
dlms-cosem is designed to be a tool with a simple API for working with DLMS/COSEM enabled energy meters. It provides the lowest level function, as protocol state management, APDU encoding/decoding, APDU encryption/decryption.
The library aims to provide a [sans-io](https://sans-io.readthedocs.io/) implementation of the DLMS/COSEM protocol so that the protocol code can be reused with several different io-paradigms. As of now we provide a simple client implementation based on blocking I/O.
We have not implemented full support to be able to build a server (meter) emulator. If this is a use-case you need, consider sponsoring the development and contact us.
# Supported features
Current release:
Parsing DataNotification via UDP.
Current Work:
GET, GET.WITH_BLOCK
Simple blocking DLMS Client for HDLC and TCP/IP
GlobalCiphering
HLS-GMAC auth
Selective access for ProfileGeneric via RangeDescriptor
Parsing of ProfileGeneric buffers
# Example use:
Look at the different file in the examples folder to how to use the library.
# Supported meters
Technically we aim to support any DLMS enabled meter. The library is implementing all the low level DLMS, and you might need an abstraction layer to support everything in your meter.
DLMS/COSEM specifies many ways of performing tasks on a meter. It is customary that a meter also adheres to a companion standard. In the companion standard it is defined exactly how certain use-cases are to be performed and how data is modeled.
Examples of companion standards are: * DSMR (Netherlands) * IDIS (all Europe) * UNI/TS 11291 (Italy)
On top of it all your DSO (Distribution Service Operator) might have ordered their meters with extra functionality or reduced functionality from one of the companion standards.
We have some meters we have run tests on or know the library is used for in production
Pietro Fiorentini RSE 1,2 LA N1. Italian gas meter
Iskraemeco AM550. IDIS compliant electricity meter.
# Development
This library is developed by Palmlund Wahlgren Innovative Technology AB. We are based in Sweden and are members of the DLMS User Association.
If you find a bug pleas raise an issue on Github.
We welcome contributions of any kind.
We add features depending on our own and our clients use cases. If you need a feature implemented please contact us.
# Training / Consultancy / Commercial Support
We offer consultancy service and training services around this library and general DLMS/COSEM. If you are interested in our services just reach out to us.
If you have implemented a solution based on this library we also offer a commercial support scheme.
# Changelog All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Calendar Versioning](https://calver.org/)
## Unreleased
### Added
Better handling of TCP errors in BlockingTcpTransport
### Changed
### Deprecated
### Removed
### Fixed
### Security
## [21.1.1] - 2021-01-13
### Added
Better handling of TCP errors in BlockingTcpTransport
### Changed
It is now explicitly possible to connect and disconnect a transport in the DlmsClient instead of it being done automatically in .associate() and .release_association(). Context manager .session() works the same.
Client to server challenge of DlmsConnection is always created independent of auth method. But only used if needed.
### Removed
Removed conformance validation in DlmsConnection. It seems like meters don’t always follow it so better to leave it up to the client.
## [21.1.0] - 2021-01-12
### Added
HDLC transport implementation
TCP transport implementation
DlMS client implementation
Support for Get service including service specific block transfer
Support for selective access via range descriptor
Support for HLS authentication using HLS-GMAC.
Support for GlobalCiphering
Parsing of ProfileGeneric buffer
### Changed
Changed project versioning scheme to Calendar versioning
## v0.0.2
### Changed
UDP messages are now based WrapperProtocolDataUnit to be able to reuse WrapperHeader for TCP messages.
Parsing of DLMS APDUs
### v0.0.1
Initial implementation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dlms_cosem-21.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ace62744b3e3e3a1f3485009b2ac49ece7a92d0c70a58d2e93a6d98d65def07 |
|
MD5 | bfce7d7b6868e21f74c7df57ff32c1bb |
|
BLAKE2b-256 | e85273a280867e63b6ebbd89806abf05501d531796decb9531e43369fe9eb712 |