Skip to main content

EDF Teleinfo frame acquisition

Project description

python-teleinfo

Read and parse teleinfo data from France EDF electricity provider

  • Build: CircleCI
  • Unit tests: codecov
  • package: PyPI version

Lors de l'installation, un outil CLI est installé : bin/teleinfo_json

Usage

Usage du module :

  from teleinfo import Parser
  from teleinfo.hw_vendors import RpiDom
  ti = Parser(RpiDom())
  print ti.get_frame()

Le parseur supporte aussi l'itération :

  from teleinfo import Parser
  from teleinfo.hw_vendors import RpiDom
  for frame in Parser(RpiDom()):
      do_something_with(frame)

Supported Devices

Example

>>> import teleinfo
>>> from teleinfo import Parser
>>> from teleinfo.hw_vendors import UTInfo2
>>> ti = Parser(UTInfo2())
>>> ti.get_frame()

{'PPOT': '00', 'MOTDETAT': '000000', 'OPTARIF': 'HC..', 'IMAX3': '060', 'IMAX1': '060', 'ADCO': '021876647540', 'HCHC': '002234766', 'PAPP': '08490', 'HHPHC': 'A', 'IINST1': '010', 'IMAX2': '060', 'IINST3': '016', 'IINST2': '008', 'PTEC': 'HP..', 'ISOUSC': '20', 'PMAX': '11690', 'HCHP': '011085557'}

>>> for frame in Parser(UTInfo2()):
...     print frame
...

Appel avec changement de port (ici /dev/ttyUSB0) pour un module Micro Teleinfo

#!/usr/bin/env python
from teleinfo import Parser
from teleinfo.hw_vendors import UTInfo2
ti = Parser(UTInfo2(port="/dev/ttyUSB0"))
print ti.get_frame()

Script avec changement de vitesse (ici 9600) pour un module PITInfo en mode standard sur un Linky

#!/usr/bin/env python
from teleinfo import Parser
from teleinfo.hw_vendors import PITInfo
ti = Parser(PITInfo(baudrate=9600))
print ti.get_frame()

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

teleinfo-1.3.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teleinfo-1.3.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file teleinfo-1.3.1.tar.gz.

File metadata

  • Download URL: teleinfo-1.3.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for teleinfo-1.3.1.tar.gz
Algorithm Hash digest
SHA256 623b80554443b1ef76660d3661f6347ab003adc7b5cdaeee63deac43e67a3d61
MD5 8a3043e3331cfba915f7e028ddebbcef
BLAKE2b-256 4a1e1861916650d6f1677df080974ec564fe6166c5e2388a0b063a70a1f4ccf3

See more details on using hashes here.

File details

Details for the file teleinfo-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: teleinfo-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15

File hashes

Hashes for teleinfo-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 66f5ac072f6e4d2eda4011aebaac56f366375f3594690eb6f2a6ee0b9b498eee
MD5 401ff1b9e5a521045b18e9ab2243813b
BLAKE2b-256 a53978664dc62c14c660d9c464d90b7df1941413329fd333aad6f93ee04b968e

See more details on using hashes here.

Supported by

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