python-teleinfo
Read and parse teleinfo data from France EDF electricity provider
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
- RpiDom
- SolarBox_USB
- uTeleinfo USB Dongle from Charles Hallard (https://www.tindie.com/products/hallard/micro-teleinfo-v20/)
- PITinfo Raspberry PI hat from Charles Hallard (https://www.tindie.com/products/hallard/pitinfo/)
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()
Metadata
Release files for teleinfo 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| teleinfo-1.3.1.tar.gz | 5.1 kB | Without provenance | Details for teleinfo-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| teleinfo-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for teleinfo-1.3.1-py3-none-any.whl |
Total release size: 11.7 kB
Release files / teleinfo-1.3.1.tar.gz
| Download URL | teleinfo-1.3.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
623b80554443b1ef76660d3661f6347ab003adc7b5cdaeee63deac43e67a3d61
|
|
BLAKE2b-256 checksum How to use checksums |
4a1e1861916650d6f1677df080974ec564fe6166c5e2388a0b063a70a1f4ccf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / teleinfo-1.3.1-py3-none-any.whl
| Download URL | teleinfo-1.3.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66f5ac072f6e4d2eda4011aebaac56f366375f3594690eb6f2a6ee0b9b498eee
|
|
BLAKE2b-256 checksum How to use checksums |
a53978664dc62c14c660d9c464d90b7df1941413329fd333aad6f93ee04b968e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for teleinfo 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.