Skip to main content

Package for communicate with iec62056-21 Meters

Project description

Python IEC62056 Meter Tools

How to use ?

Install

pip install py-iec62056

Create SerialClient

client = SerialClient(
    baudrate=19200,
    port="COM3",
    transport="serial",
    parity="E",
    bytesize=7,
    stopbits=1
)

Read A meter identification

This return an identification message from the meter. You must set the ack_stop to True if you don't want to meter to give the default table.

result = client.read_tariff_identification("5987893", ack_stop=True)

Read Table dataset

This will return a list of DataSet instance. Raise error if Timeout.

result = client.request(meter_address="5987893", table=7, timeout=30)
assert isinstance(result, TariffResponse)
for dataset in result.data:
    logging.info(f"{dataset}")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iec62056-protocol-1.0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

iec62056_protocol-1.0.1-py3-none-any.whl (2.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page