Teleinfo python library
Project description
pyticcom - EDF teléinformation Python library
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
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
pyticcom-1.2.tar.gz
(4.4 kB
view hashes)
Built Distribution
pyticcom-1.2-py3-none-any.whl
(11.5 kB
view hashes)