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
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
Close
Hashes for iec62056_protocol-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c69918f32c0dc3d1e67180ebd3705ac74ae1664854d647adfe0e235095005133 |
|
MD5 | 891ad573fd77708083dc4fcfcb0b6b14 |
|
BLAKE2b-256 | 16000645e88f0f5e6cb8548a23496ae4a612bfe9a9f72c3787762eb381ef3d21 |