[Article] Cartes "Energy" et teleinformation (TIC) avec ESPHome

J’ai pu récupérer mon YAML à midi.

Par contre ou est ce que je peux récupérer mes fichiers log?
Je compile sur mon PC en ligne de commande, j’upload sur mon ESP , je ne vois donc pas mon nœud dans ESPHome

esphome:
  name: livingroom

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  level: debug
  baud_rate: 0

# Enable Home Assistant API
api:
  encryption:
    key: !secret Key_API

ota:
  password: !secret OTA

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: !secret Ap_SSID
    password: !secret AP_password

captive_portal:

uart:
  id: uart_bus
  rx_pin: 16
  baud_rate: 1200
  data_bits: 7
  stop_bits: 1
  parity: EVEN

teleinfo:
  id: esp_teleinfo
  update_interval: 60s
  historical_mode: true

binary_sensor:
  - platform: status
    id: teleinfo_status
    name: "Teleinfo Status"

sensor:
  - platform: wifi_signal
    name: "Signal wifi"
    update_interval: 60s
    unit_of_measurement: dB
    accuracy_decimals: 0
    force_update: false
    icon: mdi:wifi
    
  - platform: uptime
    id: uptime_seconds
    name: "Uptime Sensor"
    update_interval: 60s
    unit_of_measurement: s
    accuracy_decimals: 0
    force_update: false
    icon: mdi:timer
    
  - platform: teleinfo
    tag_name: "IINST"
    name: "Intensité"
    unit_of_measurement: "A"
    icon: mdi:current-ac

  - platform: teleinfo
    tag_name: "PAPP"
    name: "Puissance"
    unit_of_measurement: "VA"
    icon: mdi:flash

  - platform: teleinfo
    tag_name: "HCHC"
    id: hchc
    name: "Teleinfo index_hc_kwh"
    unit_of_measurement: "kWh"
    device_class: "energy"
    state_class: "total_increasing"
    accuracy_decimals: 3 
    filters:
      - multiply: 0.001
    icon: mdi:gauge

  - platform: teleinfo
    tag_name: "HCHP"
    id: hchp
    unit_of_measurement: "kWh"
    device_class: "energy"
    state_class: "total_increasing"
    name: "Teleinfo index_hp_kwh"
    accuracy_decimals: 3 
    filters:
      - multiply: 0.001
    icon: mdi:gauge

button:
  - platform: restart
    name: "Teleinfo Restart"

text_sensor:
  - platform: teleinfo
    tag_name: "PTEC"
    name: "Tarif actuel"
    icon: mdi:clock-time-nine-outline
  - platform: template
    name: Uptime
    update_interval: 60s
    icon: mdi:clock-start
    lambda: |-
      int seconds = (id(uptime_seconds).state);
      int days = seconds / (24 * 3600);
      seconds = seconds % (24 * 3600);
      int hours = seconds / 3600;
      seconds = seconds % 3600;
      int minutes = seconds /  60;
      seconds = seconds % 60;
      if ( days ) {
        return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else if ( hours ) {
        return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else if ( minutes ) {
        return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else {
        return { (String(seconds) +"s").c_str() };
      } i

je serais toi je n’utiliserais pas de liaison chiffrée entre ton ESP et ton HA
donc je supprimerais la partie encryption

réessaye avec cela

esphome:
  name: livingroom

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:
  level: debug
  baud_rate: 0

# Enable Home Assistant API
api:
#  encryption:
#    key: !secret Key_API

ota:
#  password: !secret OTA

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: !secret Ap_SSID
    password: !secret AP_password

captive_portal:

uart:
  id: uart_bus
  rx_pin: 16
  baud_rate: 1200
  data_bits: 7
  stop_bits: 1
  parity: EVEN

teleinfo:
  id: esp_teleinfo
  update_interval: 60s
  historical_mode: true

binary_sensor:
  - platform: status
    id: teleinfo_status
    name: "Teleinfo Status"

sensor:
  - platform: wifi_signal
    name: "Signal wifi"
    update_interval: 60s
    unit_of_measurement: dB
    accuracy_decimals: 0
    force_update: false
    icon: mdi:wifi
    
  - platform: uptime
    id: uptime_seconds
    name: "Uptime Sensor"
    update_interval: 60s
    unit_of_measurement: s
    accuracy_decimals: 0
    force_update: false
    icon: mdi:timer
    
  - platform: teleinfo
    tag_name: "IINST"
    name: "Intensité"
    unit_of_measurement: "A"
    icon: mdi:current-ac

  - platform: teleinfo
    tag_name: "PAPP"
    name: "Puissance"
    unit_of_measurement: "VA"
    icon: mdi:flash

  - platform: teleinfo
    tag_name: "HCHC"
    id: hchc
    name: "Teleinfo index_hc_kwh"
    unit_of_measurement: "kWh"
    device_class: "energy"
    state_class: "total_increasing"
    accuracy_decimals: 3 
    filters:
      - multiply: 0.001
    icon: mdi:gauge

  - platform: teleinfo
    tag_name: "HCHP"
    id: hchp
    unit_of_measurement: "kWh"
    device_class: "energy"
    state_class: "total_increasing"
    name: "Teleinfo index_hp_kwh"
    accuracy_decimals: 3 
    filters:
      - multiply: 0.001
    icon: mdi:gauge

button:
  - platform: restart
    name: "Teleinfo Restart"

text_sensor:
  - platform: teleinfo
    tag_name: "PTEC"
    name: "Tarif actuel"
    icon: mdi:clock-time-nine-outline
  - platform: template
    name: Uptime
    update_interval: 60s
    icon: mdi:clock-start
    lambda: |-
      int seconds = (id(uptime_seconds).state);
      int days = seconds / (24 * 3600);
      seconds = seconds % (24 * 3600);
      int hours = seconds / 3600;
      seconds = seconds % 3600;
      int minutes = seconds /  60;
      seconds = seconds % 60;
      if ( days ) {
        return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else if ( hours ) {
        return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else if ( minutes ) {
        return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
      } else {
        return { (String(seconds) +"s").c_str() };
      } i

Tu peux créer un composant dans ESPHome et y recopier ton fichier YAML, puis faire une mise à jour OTA. De la, tu pourra avoir les logs.

Ci joint mon premier log

INFO ESPHome 2024.3.2
INFO Reading configuration /config/esphome/livingroom.yaml...
INFO Starting log output from 192.168.0.24 using esphome API
INFO Successfully connected to livingroom @ 192.168.0.24 in 0.122s
INFO Successful handshake with livingroom @ 192.168.0.24 in 0.339s
[18:01:26][I][app:102]: ESPHome version 2024.3.1 compiled on Apr  8 2024, 13:07:53
[18:01:26][C][wifi:580]: WiFi:
[18:01:26][C][wifi:408]:   Local MAC: 08:F9:E0:BA:C4:BC
[18:01:26][C][wifi:413]:   SSID: ''[redacted]
[18:01:26][C][wifi:416]:   IP Address: 192.168.0.24
[18:01:26][C][wifi:420]:   BSSID: 34:27:92:B4:51:18[redacted]
[18:01:26][C][wifi:421]:   Hostname: 'livingroom'
[18:01:26][C][wifi:423]:   Signal strength: -32 dB ▂▄▆█
[18:01:26][C][wifi:427]:   Channel: 6
[18:01:26][C][wifi:428]:   Subnet: 255.255.255.0
[18:01:26][C][wifi:429]:   Gateway: 192.168.0.254
[18:01:26][C][wifi:430]:   DNS1: 1.1.1.1
[18:01:26][C][wifi:431]:   DNS2: 192.168.0.254
[18:01:26][C][logger:166]: Logger:
[18:01:26][C][logger:167]:   Level: DEBUG
[18:01:26][C][logger:169]:   Log Baud Rate: 0
[18:01:26][C][logger:170]:   Hardware UART: UART0
[18:01:26][C][uart.arduino_esp32:137]: UART Bus 0:
[18:01:26][C][uart.arduino_esp32:139]:   RX Pin: GPIO16
[18:01:26][C][uart.arduino_esp32:141]:   RX Buffer Size: 256
[18:01:26][C][uart.arduino_esp32:143]:   Baud Rate: 1200 baud
[18:01:26][C][uart.arduino_esp32:144]:   Data Bits: 7
[18:01:26][C][uart.arduino_esp32:145]:   Parity: EVEN
[18:01:26][C][uart.arduino_esp32:146]:   Stop bits: 1
[18:01:26][C][uptime.sensor:031]: Uptime Sensor 'Uptime Sensor'
[18:01:26][C][uptime.sensor:031]:   Device Class: 'duration'
[18:01:26][C][uptime.sensor:031]:   State Class: 'total_increasing'
[18:01:26][C][uptime.sensor:031]:   Unit of Measurement: 's'
[18:01:26][C][uptime.sensor:031]:   Accuracy Decimals: 0
[18:01:26][C][uptime.sensor:031]:   Icon: 'mdi:timer'
[18:01:26][C][template.text_sensor:020]: Template Sensor 'Uptime'
[18:01:26][C][template.text_sensor:020]:   Icon: 'mdi:clock-start'
[18:01:26][C][teleinfo:189]: TeleInfo:
[18:01:26][C][status:034]: Status Binary Sensor 'Teleinfo Status'
[18:01:26][C][status:034]:   Device Class: 'connectivity'
[18:01:26][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Intensité'
[18:01:26][C][teleinfo_sensor:012]:     State Class: ''
[18:01:26][C][teleinfo_sensor:012]:     Unit of Measurement: 'A'
[18:01:26][C][teleinfo_sensor:012]:     Accuracy Decimals: 0
[18:01:26][C][teleinfo_sensor:012]:     Icon: 'mdi:current-ac'
[18:01:26][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Puissance'
[18:01:26][C][teleinfo_sensor:012]:     State Class: ''
[18:01:26][C][teleinfo_sensor:012]:     Unit of Measurement: 'VA'
[18:01:26][C][teleinfo_sensor:012]:     Accuracy Decimals: 0
[18:01:26][C][teleinfo_sensor:012]:     Icon: 'mdi:flash'
[18:01:26][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Teleinfo index_hc_kwh'
[18:01:26][C][teleinfo_sensor:012]:     Device Class: 'energy'
[18:01:26][C][teleinfo_sensor:012]:     State Class: 'total_increasing'
[18:01:26][C][teleinfo_sensor:012]:     Unit of Measurement: 'kWh'
[18:01:26][C][teleinfo_sensor:012]:     Accuracy Decimals: 3
[18:01:26][C][teleinfo_sensor:012]:     Icon: 'mdi:gauge'
[18:01:26][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Teleinfo index_hp_kwh'
[18:01:26][C][teleinfo_sensor:012]:     Device Class: 'energy'
[18:01:26][C][teleinfo_sensor:012]:     State Class: 'total_increasing'
[18:01:26][C][teleinfo_sensor:012]:     Unit of Measurement: 'kWh'
[18:01:26][C][teleinfo_sensor:012]:     Accuracy Decimals: 3
[18:01:26][C][teleinfo_sensor:012]:     Icon: 'mdi:gauge'
[18:01:26][C][restart.button:017]: Restart Button 'Teleinfo Restart'
[18:01:26][C][teleinfo_text_sensor:009]:   Teleinfo Text Sensor 'Tarif actuel'
[18:01:26][C][teleinfo_text_sensor:009]:     Icon: 'mdi:clock-time-nine-outline'
[18:01:26][C][captive_portal:088]: Captive Portal:
[18:01:26][C][mdns:115]: mDNS:
[18:01:26][C][mdns:116]:   Hostname: livingroom
[18:01:26][C][ota:096]: Over-The-Air Updates:
[18:01:26][C][ota:097]:   Address: livingroom.local:3232
[18:01:26][C][ota:100]:   Using Password.
[18:01:26][C][ota:103]:   OTA version: 2.
[18:01:26][C][api:139]: API Server:
[18:01:26][C][api:140]:   Address: livingroom.local:6053
[18:01:26][C][api:142]:   Using noise encryption: YES
[18:01:26][C][wifi_signal.sensor:009]: WiFi Signal 'Signal wifi'
[18:01:26][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[18:01:27][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[18:01:27][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dB'
[18:01:27][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[18:01:27][C][wifi_signal.sensor:009]:   Icon: 'mdi:wifi'
[18:01:43][D][sensor:094]: 'Uptime Sensor': Sending state 17612.75000 s with 0 decimals of accuracy
[18:01:47][D][text_sensor:064]: 'Uptime': Sending state '4h 53m 32s'
[18:02:01][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:02:42][D][sensor:094]: 'Uptime Sensor': Sending state 17672.75586 s with 0 decimals of accuracy
[18:02:47][D][text_sensor:064]: 'Uptime': Sending state '4h 54m 32s'
[18:03:00][D][sensor:094]: 'Signal wifi': Sending state -31.00000 dB with 0 decimals of accuracy
[18:03:43][D][sensor:094]: 'Uptime Sensor': Sending state 17732.75000 s with 0 decimals of accuracy
[18:03:48][D][text_sensor:064]: 'Uptime': Sending state '4h 55m 32s'
[18:04:00][D][sensor:094]: 'Signal wifi': Sending state -31.00000 dB with 0 decimals of accuracy
[18:04:43][D][sensor:094]: 'Uptime Sensor': Sending state 17792.75000 s with 0 decimals of accuracy
[18:04:48][D][text_sensor:064]: 'Uptime': Sending state '4h 56m 32s'
[18:05:01][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:05:42][D][sensor:094]: 'Uptime Sensor': Sending state 17852.75586 s with 0 decimals of accuracy
[18:05:46][D][text_sensor:064]: 'Uptime': Sending state '4h 57m 32s'
[18:06:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:06:44][D][sensor:094]: 'Uptime Sensor': Sending state 17912.75586 s with 0 decimals of accuracy
[18:06:48][D][text_sensor:064]: 'Uptime': Sending state '4h 58m 32s'
[18:07:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:07:43][D][sensor:094]: 'Uptime Sensor': Sending state 17972.75000 s with 0 decimals of accuracy
[18:07:48][D][text_sensor:064]: 'Uptime': Sending state '4h 59m 32s'
[18:08:00][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:08:44][D][sensor:094]: 'Uptime Sensor': Sending state 18032.75000 s with 0 decimals of accuracy
[18:08:48][D][text_sensor:064]: 'Uptime': Sending state '5h 0m 32s'
[18:09:01][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:09:44][D][sensor:094]: 'Uptime Sensor': Sending state 18092.75000 s with 0 decimals of accuracy
[18:09:47][D][text_sensor:064]: 'Uptime': Sending state '5h 1m 32s'
[18:10:01][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:10:44][D][sensor:094]: 'Uptime Sensor': Sending state 18152.75000 s with 0 decimals of accuracy
[18:10:48][D][text_sensor:064]: 'Uptime': Sending state '5h 2m 32s'
[18:11:01][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:11:44][D][sensor:094]: 'Uptime Sensor': Sending state 18212.75000 s with 0 decimals of accuracy
[18:11:49][D][text_sensor:064]: 'Uptime': Sending state '5h 3m 32s'
[18:12:01][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:12:42][D][sensor:094]: 'Uptime Sensor': Sending state 18272.75391 s with 0 decimals of accuracy
[18:12:48][D][text_sensor:064]: 'Uptime': Sending state '5h 4m 32s'
[18:13:01][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:13:42][D][sensor:094]: 'Uptime Sensor': Sending state 18332.75000 s with 0 decimals of accuracy
[18:13:47][D][text_sensor:064]: 'Uptime': Sending state '5h 5m 32s'
[18:14:01][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:14:42][D][sensor:094]: 'Uptime Sensor': Sending state 18392.75000 s with 0 decimals of accuracy
[18:14:46][D][text_sensor:064]: 'Uptime': Sending state '5h 6m 32s'
[18:15:00][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:15:42][D][sensor:094]: 'Uptime Sensor': Sending state 18452.75000 s with 0 decimals of accuracy
[18:15:46][D][text_sensor:064]: 'Uptime': Sending state '5h 7m 32s'
[18:16:00][D][sensor:094]: 'Signal wifi': Sending state -34.00000 dB with 0 decimals of accuracy
[18:16:42][D][sensor:094]: 'Uptime Sensor': Sending state 18512.74805 s with 0 decimals of accuracy
[18:16:46][D][text_sensor:064]: 'Uptime': Sending state '5h 8m 32s'
[18:17:01][D][sensor:094]: 'Signal wifi': Sending state -34.00000 dB with 0 decimals of accuracy
[18:17:42][D][sensor:094]: 'Uptime Sensor': Sending state 18572.75000 s with 0 decimals of accuracy
[18:17:46][D][text_sensor:064]: 'Uptime': Sending state '5h 9m 32s'
[18:18:00][D][sensor:094]: 'Signal wifi': Sending state -31.00000 dB with 0 decimals of accuracy
[18:18:42][D][sensor:094]: 'Uptime Sensor': Sending state 18632.75000 s with 0 decimals of accuracy
[18:18:46][D][text_sensor:064]: 'Uptime': Sending state '5h 10m 32s'
[18:19:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:19:42][D][sensor:094]: 'Uptime Sensor': Sending state 18692.75586 s with 0 decimals of accuracy
[18:19:46][D][text_sensor:064]: 'Uptime': Sending state '5h 11m 32s'
[18:20:00][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:20:42][D][sensor:094]: 'Uptime Sensor': Sending state 18752.75000 s with 0 decimals of accuracy
[18:20:47][D][text_sensor:064]: 'Uptime': Sending state '5h 12m 32s'
[18:21:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:21:42][D][sensor:094]: 'Uptime Sensor': Sending state 18812.75000 s with 0 decimals of accuracy
[18:21:46][D][text_sensor:064]: 'Uptime': Sending state '5h 13m 32s'
[18:22:00][D][sensor:094]: 'Signal wifi': Sending state -34.00000 dB with 0 decimals of accuracy
[18:22:42][D][sensor:094]: 'Uptime Sensor': Sending state 18872.75781 s with 0 decimals of accuracy
[18:22:46][D][text_sensor:064]: 'Uptime': Sending state '5h 14m 32s'
[18:23:01][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:23:43][D][sensor:094]: 'Uptime Sensor': Sending state 18932.75000 s with 0 decimals of accuracy
[18:23:46][D][text_sensor:064]: 'Uptime': Sending state '5h 15m 32s'
[18:24:00][D][sensor:094]: 'Signal wifi': Sending state -33.00000 dB with 0 decimals of accuracy
[18:24:42][D][sensor:094]: 'Uptime Sensor': Sending state 18992.75000 s with 0 decimals of accuracy
[18:24:46][D][text_sensor:064]: 'Uptime': Sending state '5h 16m 32s'
[18:25:00][D][sensor:094]: 'Signal wifi': Sending state -34.00000 dB with 0 decimals of accuracy
[18:25:42][D][sensor:094]: 'Uptime Sensor': Sending state 19052.75781 s with 0 decimals of accuracy
[18:25:46][D][text_sensor:064]: 'Uptime': Sending state '5h 17m 32s'
[18:26:00][D][sensor:094]: 'Signal wifi': Sending state -34.00000 dB with 0 decimals of accuracy
[18:26:42][D][sensor:094]: 'Uptime Sensor': Sending state 19112.75000 s with 0 decimals of accuracy
[18:26:46][D][text_sensor:064]: 'Uptime': Sending state '5h 18m 32s'
[18:27:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:27:42][D][sensor:094]: 'Uptime Sensor': Sending state 19172.75000 s with 0 decimals of accuracy
[18:27:47][D][text_sensor:064]: 'Uptime': Sending state '5h 19m 32s'
[18:28:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:28:42][D][sensor:094]: 'Uptime Sensor': Sending state 19232.75000 s with 0 decimals of accuracy
[18:28:46][D][text_sensor:064]: 'Uptime': Sending state '5h 20m 32s'
[18:29:00][D][sensor:094]: 'Signal wifi': Sending state -32.00000 dB with 0 decimals of accuracy
[18:29:42][D][sensor:094]: 'Uptime Sensor': Sending state 19292.75000 s with 0 decimals of accuracy
[18:29:46][D][text_sensor:064]: 'Uptime': Sending state '5h 21m 32s'

Ok, parfait. Malheureusement cela confirme qu’il n’y a pas de signal capté sur l’UART2. Je crains qu’il ne faille tester si les trames en liaison série arrivent bien avec un convertisseur TTL USB, et valider par la même occasion les paramètres série à utiliser pour ton compteur.

Es tu sûr que le signal TIC est activé ? Il arrive que ce ne soit pas fait par défaut sur certains anciens compteurs et qu’il faille le demander au fournisseur d’électricité…. Tu peux peut-être avoir l’info dans le menu de l’appareil.

Bonjour.
J’ai vérifié avec un convertisseur ttl usb et effectivement je n’ai aucune trame qui arrive.

J’ai appelé mon fournisseur d’énergie, qui viendra remplacer mon compteur par un linky, et je pense qu’au final ce sera plus simple.

Reste à savoir si je reste en mode standard ou si je demande le mode historique (je suis en train de chercher les différences).

En tout cas merci pour votre aide je reviendrai vous embêter quand j’aurais Linky :grin: :grin: :grin:

1 « J'aime »

Salut
la grosse différence c’est surtout la fréquence de rafraichissement de la donnée
et je crois que tu as des paramètres en plus.
donc qui peut le plus peut le moins.

Si tu penses faire installer du photovoltaïque, il me semble que c’est un prérequis

quoiqu’il en soit je crois que c’est a ENEDIS de faire la modif ( histo → standard ) en télémaintenance ( bien entendu c’est pas gratuit) et non a ton fournisseur.

ps c’est le contraire :wink:

C’est comme ça que c’était dans ma tête, mais j’ai écrit l’inverse.
Les panneaux solaire sont à l’étude donc je demanderai un mode standard.

Bonjour,
Super Article !
J’ai tout de même le même problème que Bobby.

Citation

INFO ESPHome 2024.4.2
INFO Reading configuration /config/esphome/esp32-38pin.yaml...
WARNING 'esp_linky': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Starting log output from 192.168.1.116 using esphome API
INFO Successfully connected to esp_linky @ 192.168.1.116 in 0.059s
INFO Successful handshake with esp_linky @ 192.168.1.116 in 0.109s
[17:15:58][I][app:100]: ESPHome version 2024.4.2 compiled on May  3 2024, 17:07:36
[17:15:58][C][wifi:580]: WiFi:
[17:15:58][C][wifi:408]:   Local MAC: E4:65:B8:48:3F:98
[17:15:58][C][wifi:413]:   SSID: [redacted]
[17:15:58][C][wifi:416]:   IP Address: 192.168.1.116
[17:15:58][C][wifi:420]:   BSSID: [redacted]
[17:15:58][C][wifi:421]:   Hostname: 'esp_linky'
[17:15:58][C][wifi:423]:   Signal strength: -84 dB ▂▄▆█
[17:15:58][C][wifi:427]:   Channel: 3
[17:15:58][C][wifi:428]:   Subnet: 255.255.255.0
[17:15:58][C][wifi:429]:   Gateway: 192.168.1.1
[17:15:58][C][wifi:430]:   DNS1: 0.0.0.0
[17:15:58][C][wifi:431]:   DNS2: 0.0.0.0
[17:15:58][C][logger:166]: Logger:
[17:15:58][C][logger:167]:   Level: DEBUG
[17:15:58][C][logger:169]:   Log Baud Rate: 0
[17:15:58][C][logger:170]:   Hardware UART: UART0
[17:15:58][C][uart.arduino_esp32:137]: UART Bus 0:
[17:15:58][C][uart.arduino_esp32:139]:   RX Pin: GPIO3
[17:15:58][C][uart.arduino_esp32:141]:   RX Buffer Size: 256
[17:15:58][C][uart.arduino_esp32:143]:   Baud Rate: 1200 baud
[17:15:58][C][uart.arduino_esp32:144]:   Data Bits: 7
[17:15:58][C][uart.arduino_esp32:145]:   Parity: EVEN
[17:15:58][C][uart.arduino_esp32:146]:   Stop bits: 1
[17:15:58][C][uptime.sensor:031]: Uptime Sensor 'Uptime Sensor'
[17:15:58][C][uptime.sensor:031]:   Device Class: 'duration'
[17:15:58][C][uptime.sensor:031]:   State Class: 'total_increasing'
[17:15:58][C][uptime.sensor:031]:   Unit of Measurement: 's'
[17:15:58][C][uptime.sensor:031]:   Accuracy Decimals: 0
[17:15:58][C][uptime.sensor:031]:   Icon: 'mdi:timer'
[17:15:58][C][template.text_sensor:020]: Template Sensor 'Uptime'
[17:15:58][C][template.text_sensor:020]:   Icon: 'mdi:clock-start'
[17:15:58][C][teleinfo:189]: TeleInfo:
[17:15:58][C][status:034]: Status Binary Sensor 'Teleinfo Status'
[17:15:58][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Intensité'
[17:15:58][C][teleinfo_sensor:012]:     State Class: ''
[17:15:58][C][teleinfo_sensor:012]:     Unit of Measurement: 'A'
[17:15:58][C][teleinfo_sensor:012]:     Accuracy Decimals: 0
[17:15:58][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Teleinfo index_hc_kwh'
[17:15:58][C][teleinfo_sensor:012]:     Device Class: 'energy'
[17:15:58][C][teleinfo_sensor:012]:     State Class: 'total_increasing'
[17:15:58][C][teleinfo_sensor:012]:     Unit of Measurement: 'kWh'
[17:15:58][C][teleinfo_sensor:012]:     Accuracy Decimals: 3
[17:15:58][C][teleinfo_sensor:012]:     Icon: 'mdi:gauge'
[17:15:58][C][teleinfo_sensor:012]:   Teleinfo Sensor 'Teleinfo index_hp_kwh'
[17:15:58][C][teleinfo_sensor:012]:     Device Class: 'energy'
[17:15:58][C][teleinfo_sensor:012]:     State Class: 'total_increasing'
[17:15:58][C][teleinfo_sensor:012]:     Unit of Measurement: 'kWh'
[17:15:59][C][teleinfo_sensor:012]:     Accuracy Decimals: 3
[17:15:59][C][teleinfo_sensor:012]:     Icon: 'mdi:gauge'
[17:15:59][C][restart.button:017]: Restart Button 'Teleinfo Restart'
[17:15:59][C][teleinfo_text_sensor:009]:   Teleinfo Text Sensor 'Tarif actuel'
[17:15:59][C][teleinfo_text_sensor:009]:     Icon: 'mdi:clock-time-nine-outline'
[17:15:59][C][mdns:115]: mDNS:
[17:15:59][C][mdns:116]:   Hostname: esp_linky
[17:15:59][C][ota:096]: Over-The-Air Updates:
[17:15:59][C][ota:097]:   Address: 192.168.1.116:3232
[17:15:59][C][ota:100]:   Using Password.
[17:15:59][C][ota:103]:   OTA version: 2.
[17:15:59][C][api:139]: API Server:
[17:15:59][C][api:140]:   Address: 192.168.1.116:6053
[17:15:59][C][api:142]:   Using noise encryption: YES
[17:15:59][C][wifi_signal.sensor:009]: WiFi Signal 'Signal wifi'
[17:15:59][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[17:15:59][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[17:15:59][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dB'
[17:15:59][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[17:15:59][C][wifi_signal.sensor:009]:   Icon: 'mdi:wifi'
[17:16:18][D][sensor:094]: 'Uptime Sensor': Sending state 450.13699 s with 0 decimals of accuracy
[17:16:18][D][text_sensor:064]: 'Uptime': Sending state '7m 30s'
[17:16:25][D][sensor:094]: 'Signal wifi': Sending state -84.00000 dB with 0 decimals of accuracy
[17:17:18][D][sensor:094]: 'Uptime Sensor': Sending state 510.13699 s with 0 decimals of accuracy
[17:17:18][D][text_sensor:064]: 'Uptime': Sending state '8m 30s'
[17:17:25][D][sensor:094]: 'Signal wifi': Sending state -82.00000 dB with 0 decimals of accuracy

Mon Code :

esphome:
name: esp_linky
friendly_name: ESP32 Linky

esp32:
board: esp32dev
framework:
type: arduino

logger:
level: debug
baud_rate: 0

ota:
password: « 65267b9358a6ddcf9501f1d8a14a8f0d »

wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.116
gateway: 192.168.1.1
subnet: 255.255.255.0

api:
encryption:
key: « kAkw7gAQ0ZUadC3k4sAPaqXokC6fs4lRtibJxT5aS34= »

uart:
id: uart_bus
rx_pin: GPIO3

rx_pin: GPIO16 si UART2 utilisée

tx_pin: GPIO1

baud_rate: 1200
parity: EVEN
data_bits: 7

teleinfo:
id: esp_teleinfo
update_interval: 60s
historical_mode: true

binary_sensor:

  • platform: status
    id: teleinfo_status
    name: « Teleinfo Status »

sensor:

  • platform: wifi_signal
    name: « Signal wifi »
    update_interval: 60s
    unit_of_measurement: dB
    accuracy_decimals: 0
    force_update: false
    icon: mdi:wifi

  • platform: uptime
    id: uptime_seconds
    name: « Uptime Sensor »
    update_interval: 60s
    unit_of_measurement: s
    accuracy_decimals: 0
    force_update: false
    icon: mdi:timer

  • platform: teleinfo
    tag_name: « IINST »
    name: « Intensité »
    unit_of_measurement: « A »
    icon: mdi:current-ac

  • platform: teleinfo
    tag_name: « PAPP »
    name: « Puissance »
    unit_of_measurement: « VA »
    icon: mdi:flash

  • platform: teleinfo
    tag_name: « HCHC »
    id: hchc
    name: « Teleinfo index_hc_kwh »
    unit_of_measurement: « kWh »
    device_class: « energy »
    state_class: « total_increasing »
    accuracy_decimals: 3
    filters:

    • multiply: 0.001
      icon: mdi:gauge
  • platform: teleinfo
    tag_name: « HCHP »
    id: hchp
    unit_of_measurement: « kWh »
    device_class: « energy »
    state_class: « total_increasing »
    name: « Teleinfo index_hp_kwh »
    accuracy_decimals: 3
    filters:

    • multiply: 0.001
      icon: mdi:gauge

button:

  • platform: restart
    name: « Teleinfo Restart »

text_sensor:

  • platform: teleinfo
    tag_name: « PTEC »
    name: « Tarif actuel »
    icon: mdi:clock-time-nine-outline
  • platform: template
    name: Uptime
    update_interval: 60s
    icon: mdi:clock-start
    lambda: |-
    int seconds = (id(uptime_seconds).state);
    int days = seconds / (24 * 3600);
    seconds = seconds % (24 * 3600);
    int hours = seconds / 3600;
    seconds = seconds % 3600;
    int minutes = seconds / 60;
    seconds = seconds % 60;
    if ( days ) {
    return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +« s »).c_str() };
    } else if ( hours ) {
    return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +« s »).c_str() };
    } else if ( minutes ) {
    return { (String(minutes) +"m "+ String(seconds) +« s »).c_str() };
    } else {
    return { (String(seconds) +« s »).c_str() };
    }

Une idée ?

Salut,
Merci. Le code a l’air bon.
Je crains qu’il ne faille aussi vérifier si tu reçois bien les trames sur ton compteur. Cela ne peut se faire qu’avec un convertisseur USB-TTL que l’on peut trouver pour quelques euros.
A vérifier aussi si tu es en mode historique ou standard.
@+

Merci de cette réponse si rapide :wink:
Je viens de changer et de passer en GPIO16 et soudant en Borne 8 de ma carte.
Pareil…

uart:
  id: uart_bus
#  rx_pin: GPIO3
  rx_pin: GPIO16 #si UART2 utilisée  
#  tx_pin: GPI17
  baud_rate: 1200
  parity: EVEN
  data_bits: 7

Du coup, je viens d’acheter le module… Wait and see…

1 « J'aime »

Bonjour.
J’ai le technicien Enedis qui est passé la semaine dernière pour m’installer linky, je n’ai pas encore essayé.
La téléinformation ne fonctionnait pas sur mon ancien compteur CBE.

On verra ce que ça donne

Bonjour,
Je viens d’essayer avec le boitier TTL reçu. Rien de mieux.
J’ai également essayer avec une autre approche
Celle-ci : https://f1atb.fr/fr/affichage-linky-en-temps-reel/comment-page-2/#comment-31399

Et là ça fonctionne… Je pense donc qu’il y a un problème dans mon montage… :confused:

Bizarre car plusieurs personnes ont testé mon montage avec succès. La seule questions était de bien utiliser l’UART2 : gpio16 soit RX2. Le mofset amplifie le signal, donc ce devrait être meilleur avec et plus stable.
Question : quel pin et quelle UART utilises tu pour que cela marche ? Je soupçonne que le brochage de ton esp32 soit différent de celui du tuto…

As tu ce brochage ?

Sur le lien, ils utilisent le pin26 et cela ne correspond pas à une liaison série sur un brochage normal…

Autre hypothèse : un mofset défectueux… il faudrait en tester un autre…

Salut,
j’utilise bien la Pin 16. J’ai essayé avec 2 ESP32 différents et montage avec tout de différent…

Par contre, comment etre sur que je suis bien sur un UART 2 ?
Je viens en effet de voir que dans l’autre programme et cablage j’utilise la GPIO26.
Dois-je changer ?

Si tu utilises le GPIO16 et que ton esp est un Wroom, c’est bien l’uart2. Le pb ne vient pas de l’esp.

Donc ça marche sans mofset (schéma de l’autre tuto), et pas avec, c’est bien cela ? Si oui, mofset défectueux ? Pb de branchement ?
Au pire garde l’autre branchement si ça marche….

bon il faut que j’adapte ton code en mettant GPIO26 ?

uart:
  id: uart_bus
  rx_pin: GPIO26 
#  tx_pin: GPI27
  baud_rate: 1200
  parity: EVEN
  data_bits: 7

Pour moi, le GPIO26 ne correspond pas à une entrée série (UART). Sauf si le brochage du modèle de ton ESP dit le contraire… En standard, c’est le GPIO16.
Mais je n’ai pas compris : tu as réussi à faire marcher au final ? Tu reçois des trames ?

Re,
ça a l’aire de fonctionner.
Il me reste donc a trouver comment savoir ce que mes panneaux solaires produisent.
ôte moi d’un doute, avec seulement cela, on ne peut pas savoir ?