iec62056-protocol


Nameiec62056-protocol JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryPackage for communicate with iec62056-21 Meters
upload_time2024-03-21 21:16:42
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords python iiot protocols
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python IEC62056 Meter Tools

## How to use ?

### Install

```shell
pip install py-iec62056
```

### Create SerialClient

```python
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.

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

### Read Table dataset

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

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "iec62056-protocol",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "python, iiot, protocols",
    "author": null,
    "author_email": "Adrien Delhaye <adrien.delhaye@memoco.eu>",
    "download_url": "https://files.pythonhosted.org/packages/8c/be/dd0dda8cd79ff04dac983a1fac628a7e37f60a03917d02f1f00ff88cf66f/iec62056-protocol-1.0.1.tar.gz",
    "platform": null,
    "description": "# Python IEC62056 Meter Tools\r\n\r\n## How to use ?\r\n\r\n### Install\r\n\r\n```shell\r\npip install py-iec62056\r\n```\r\n\r\n### Create SerialClient\r\n\r\n```python\r\nclient = SerialClient(\r\n    baudrate=19200,\r\n    port=\"COM3\",\r\n    transport=\"serial\",\r\n    parity=\"E\",\r\n    bytesize=7,\r\n    stopbits=1\r\n)\r\n```\r\n\r\n### Read A meter identification\r\n\r\nThis return an identification message from the meter.\r\nYou must set the ack_stop to True if you don't want to meter to give the default table.\r\n\r\n```python\r\nresult = client.read_tariff_identification(\"5987893\", ack_stop=True)\r\n```\r\n\r\n### Read Table dataset\r\n\r\nThis will return a list of DataSet instance.\r\nRaise error if Timeout.\r\n\r\n```python\r\nresult = client.request(meter_address=\"5987893\", table=7, timeout=30)\r\nassert isinstance(result, TariffResponse)\r\nfor dataset in result.data:\r\n    logging.info(f\"{dataset}\")\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Package for communicate with iec62056-21 Meters",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://pypi.org/manage/project/iot-protocols"
    },
    "split_keywords": [
        "python",
        " iiot",
        " protocols"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16000645e88f0f5e6cb8548a23496ae4a612bfe9a9f72c3787762eb381ef3d21",
                "md5": "891ad573fd77708083dc4fcfcb0b6b14",
                "sha256": "c69918f32c0dc3d1e67180ebd3705ac74ae1664854d647adfe0e235095005133"
            },
            "downloads": -1,
            "filename": "iec62056_protocol-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "891ad573fd77708083dc4fcfcb0b6b14",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2632,
            "upload_time": "2024-03-21T21:16:41",
            "upload_time_iso_8601": "2024-03-21T21:16:41.079339Z",
            "url": "https://files.pythonhosted.org/packages/16/00/0645e88f0f5e6cb8548a23496ae4a612bfe9a9f72c3787762eb381ef3d21/iec62056_protocol-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8cbedd0dda8cd79ff04dac983a1fac628a7e37f60a03917d02f1f00ff88cf66f",
                "md5": "afcfa1d4bd529c64c7b728afac0d7e22",
                "sha256": "3c89ef9295c0ceb537ab69621aad1d4f6fc8acbcc6c2ec74f182c5c601aea6a4"
            },
            "downloads": -1,
            "filename": "iec62056-protocol-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "afcfa1d4bd529c64c7b728afac0d7e22",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2504,
            "upload_time": "2024-03-21T21:16:42",
            "upload_time_iso_8601": "2024-03-21T21:16:42.659480Z",
            "url": "https://files.pythonhosted.org/packages/8c/be/dd0dda8cd79ff04dac983a1fac628a7e37f60a03917d02f1f00ff88cf66f/iec62056-protocol-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-21 21:16:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "iec62056-protocol"
}
        
Elapsed time: 0.41141s