{"id":23907649,"url":"https://github.com/jbdesbas/micropython-teleinfo","last_synced_at":"2026-06-14T18:34:38.117Z","repository":{"id":77083690,"uuid":"489671202","full_name":"jbdesbas/micropython-teleinfo","owner":"jbdesbas","description":"Read teleinfo from france EDF electricty provider","archived":false,"fork":false,"pushed_at":"2022-05-07T13:39:51.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T14:43:33.165Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jbdesbas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-07T12:46:14.000Z","updated_at":"2022-11-12T18:09:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"4025611d-b096-43c9-b18e-682958e9b6f7","html_url":"https://github.com/jbdesbas/micropython-teleinfo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jbdesbas/micropython-teleinfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbdesbas%2Fmicropython-teleinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbdesbas%2Fmicropython-teleinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbdesbas%2Fmicropython-teleinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbdesbas%2Fmicropython-teleinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jbdesbas","download_url":"https://codeload.github.com/jbdesbas/micropython-teleinfo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jbdesbas%2Fmicropython-teleinfo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34333806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-05T03:13:38.415Z","updated_at":"2026-06-14T18:34:38.112Z","avatar_url":"https://github.com/jbdesbas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# microPython Teleinfo\nRead teleinfo from France EDF 🇫🇷 electricty provider. 🔌\n\nA lib used to read _teleinformation_ from electric meter. Basically, the I1 and I2 port provide a serial signal with some usefull informations.\nTested only with ESP8266, but should work with other boards using [MicroPython](http://micropython.org).\n\n⚠️ Since ESP8266 has only 1 UART (https://docs.micropython.org/en/latest/esp8266/quickref.html#uart-serial-bus), we need to detach Python REPL in order to record provider's data.\nOn the exemple below, the UART is detached from REPL, configured for telemetry, then reconfired with defaults parameters.\nYou can leave UART detached from REPL, but be aware that you will no longer be able to use it for debug or put files, and maybe need to reflash the board. (But you can style use webREPL if configured).\n\nYou can below find an exemple with UART immediatly reconfigured and re-attached to REPL after data record. \n\nExemple on ESP8266:\n\n```python\nfrom utime import sleep\nfrom machine import UART\nfrom teleinfo import Teleinfo\n\nti_uart = UART(0) # Some board have many UART, use UART0 for ESP8266\ntelei = Teleinfo(ti_uart)\n\n try : \n      print('Detach REPL, see you soon')\n      sleep(3)\n      dupterm(None, 1) #  Detach REPL from UART\n      t = telei.get_next_trame() #  Configure REPL for telemetry and record data\n  finally : #  make sure that REPL is re-attached if something would go wrong\n      ti_uart.init(baudrate=115200, parity=None, bits=8, stop=1) #reinit uart with default value\n      dupterm(ti_uart, 1) #  Re-attach REPL\n      print('REPL reattached')\n\nprint(t.infos_dict['BASE']) # Print index\n\n```\nif you don't care about REPL :\n\n\n```python\nfrom utime import sleep\nfrom machine import UART\nfrom teleinfo import Teleinfo\n\nti_uart = UART(0) # Some board have many UART, use UART 0 for ESP8266\ntelei = Teleinfo(ti_uart)\n\nwhile True:\n  trame = telei.get_next_trame()\n\n  for k, v in t.infos_dict.items():\n     # to some stuff, like MQTT post\n   \n  sleep(30)\n```\n\n\nNot tested with ESP32, should be work with UART1 or UART2 \n\nSee https://www.magdiblog.fr/gpio/teleinfo-edf-suivi-conso-de-votre-compteur-electrique/ for all labels definition\n\n\n## Hardware\n![image](https://user-images.githubusercontent.com/6163107/167256147-e408ef1a-be4b-4785-8748-59fffaf949ca.png)\n\nSchema from : http://hallard.me/pitinfov12/\n\nℹ️ With _linky_ meter, I had to **change the value of R1 resistor** 4,7kΩ --\u003e 1kΩ to make it work.\n\n## TODO \n🚧 Add checksum control\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbdesbas%2Fmicropython-teleinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjbdesbas%2Fmicropython-teleinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjbdesbas%2Fmicropython-teleinfo/lists"}