Skip to main content

Teleinfo python library

Project description

pyticcom - EDF teléinformation Python library

PyPI version

This library allows you to retrieve teleinfo using serial port device (USBTICLCV2).

Example

import asyncio

from pyticcom import Teleinfo, Mode
from scanner import ComScanner

scanner = ComScanner()
serials = scanner.scan()
for serial in serials:
    print(serial.device)

async def main():
    with Teleinfo('/dev/USB0', mode=Mode.HISTORY) as teleinfo:
        while True:
            frame = await teleinfo.read_frame()
            print("{} groups found".format(len(frame.groups)))
            for group in frame.groups:
                print(group)
            await asyncio.sleep(1)


loop = asyncio.get_event_loop()
result = loop.run_until_complete(main())

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

pyticcom-1.2.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

pyticcom-1.2-py3-none-any.whl (11.5 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