Skip to main content

IEC 62056-21

CircleCI Coverage Status

A Python library for IEC 62056-21, Direct Local Data Exchange of Energy Meters. Former IEC 61107 or IEC 1107

Installation

We only support python 3.6+

Install via pip:

pip install iec62056-21_dzg

About IEC 62056-21

IEC 62056-21 (earlier IEC 61107 or sometimes just IEC 1107, is an international standard for a computer protocol to read utility meters. It is designed to operate over any media, including the Internet. A meter sends ASCII (in modes A..D) or HDLC (mode E) data to a nearby hand-held unit (HHU) using a serial port. The physical media are usually either modulated light, sent with an LED and received with a photodiode, or a pair of wires, usually modulated by a 20mA current loop. The protocol is usually half-duplex.

This version was enhanced by the password creation for DZG meters.

Limitations of this library.

  • At the moment we only support Mode C.
  • We assume that only protocol mode Normal is used.

Example usage:

Reading a meter using a optical usb probe via the D0-interface.

from iec62056_21.client import Iec6205621Client

client = Iec6205621Client.with_serial_transport(port='/dev/tty_something')

password_challange = client.access_programming_mode()

client.send_password('00000000')  # Common standard password

data_answer = client.read_value('1.8.0')
from iec62056_21.client import Iec6205621Client

client = Iec6205621Client.with_tcp_transport(address=('192.168.0.1', 8000), device_address='12345678', password='00000000')

password_challange = client.access_programming_mode()

client.send_password('00000000')  # Common standard password

data_answer = client.read_value('1.8.0')

Derivative protocols

Some manufacturer are using a derivative protocol to IEC 62056-21. They comply with most things but might for example not use the access request features according to standard or they have a slightly different flow in command execution

This library can be used with some of them. You just need to be aware of the differences. We provide special handlers for some unique parts that is included in this library. They might be split into separate libraries in the future.

LIS-200

A protocol for Elster devices. Main difference is that they have the concept of locks instead of password and instead of answering the password request you need to write the password to a certain register.

Development

This library is developed by Palmlund Wahlgren Innovative Technology AB in Sweden and is used in our multi utility AMR solution: Utilitarian

Contributing

  • Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  • Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  • Write a test which shows that the bug was fixed or that the feature works as expected.
  • Send a pull request and bug the maintainer until it gets merged and published.

Metadata

Release files for iec62056-21-dzg 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iec62056-21-dzg 0.0.4
File Size Uploaded
iec62056_21_dzg-0.0.4.tar.gz 21.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iec62056-21-dzg 0.0.4
File Interpreter ABI Platform
iec62056_21_dzg-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 40.1 kB

Release files / iec62056_21_dzg-0.0.4.tar.gz

Download URL iec62056_21_dzg-0.0.4.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8afdffafcad9d0d87d17d6099e9073f73058e1b1431d4387fc99f0b95f01bd1a
BLAKE2b-256 checksum
How to use checksums
bc25b7bacbb751b33d9ec88c663afeb9d937fe017d02465a3f07096e4dd91b4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / iec62056_21_dzg-0.0.4-py3-none-any.whl

Download URL iec62056_21_dzg-0.0.4-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9724e015e1365b81b84c32057a1ef404888679c384e5f1dc91c48187a68ee129
BLAKE2b-256 checksum
How to use checksums
3fbcbc49126f7bcc9e4ae529c8b06831edad49d1eb03731255660d9feaf25b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page