Skip to main content

Script Python pour interroger un module Teleinfo de GCE Electronics

Project description

gce.py

Build Status pyi pyi

Script Python pour interroger un module Teleinfo de GCE Electronics.

Documentation ERDF sur la téléinformation client.

Nécessite le module Requests (voir ici pour installer facilement sur un Synology).

Installation

Avec pip

pip3 install gce

Détection

Les modules Teleinfo écoutent sur le port UDP 30303. Lorsqu'ils reçoivent une trame en broadcast contenant le texte 'Discover GCE Devices', ils envoient une réponse. C'est peut-être la même chose pour un IPX800 mais je ne peux pas tester.

La réponse est composée de trois lignes faciles à analyser:

NOM<CR><LF>
ADRESSE MAC<CR><LF>
PORT<CR><LF>

Valeurs

Les valeurs de téléinformation client sont extraites de http://ECO-DEVICES/protect/settings/teleinfo1.xml

Usage en ligne de commande

Retrouver l'adresse IP du module teleinfo:

gce find [nom du device]

Exemple d'utilisation:

curl "http://$(gce find)/api/xdevices.json?cmd=10"

Afficher tous les champs

gce

Usage dans un autre script Python

#! /usr/bin/env python3
import gce
print(gce.teleinfo())

Licence et garantie

Aucune. Vous pouvez réutiliser le script sans restriction. Il est fourni "tel quel", sans aucune garantie.

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

gce-1.0.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

gce-1.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file gce-1.0.2.tar.gz.

File metadata

  • Download URL: gce-1.0.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.6

File hashes

Hashes for gce-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a6b3cd5039a0a20d128f6e4ccc4a6e31cb7f056070edf4442038e0fa2171a841
MD5 188f01b0d451f4fe172f3125ee12921b
BLAKE2b-256 c291929fa67d2c7ad8c4f3205e219e2f62bd2b9df2f16c55507acac790db26d6

See more details on using hashes here.

File details

Details for the file gce-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: gce-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.5.6

File hashes

Hashes for gce-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d60f1967b07f204a41bc25159d1ace1d02275788c3f5aced82633fc9233b215
MD5 c533a5aa6170bca73cc517ff4cdbbc93
BLAKE2b-256 2b4543ec8a854cbe2f1f7b9199b4b4dbfa81699947e6dc4f72c326bc785f4bcd

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