Skip to content

Instantly share code, notes, and snippets.

@mathieucarbou
Last active October 6, 2024 23:35
Show Gist options
  • Save mathieucarbou/886d2a6f5c0b51bb261d6a1329beb08d to your computer and use it in GitHub Desktop.
Save mathieucarbou/886d2a6f5c0b51bb261d6a1329beb08d to your computer and use it in GitHub Desktop.
Linky Teleinformation (TIC) + ESPHome + Home Assistant
esphome:
name: linky
# https://esphome.io/components/esp8266.html
esp8266:
board: d1_mini
# https://esphome.io/components/esp32.html
#esp32:
# board: lolin_s2_mini
# variant: esp32s2
# WiFi Component: https://esphome.io/components/wifi.html
wifi:
ssid: !secret esphome_wifi_ssid
password: !secret esphome_wifi_password
manual_ip:
static_ip: 192.168.125.84
gateway: 192.168.125.1
subnet: 255.255.255.0
dns1: 192.168.125.1
ap:
ssid: Linky
password: !secret esphome_wifi_password
# OTA Update Component: https://esphome.io/components/ota.html
ota:
password: !secret esphome_ota_password
# Logger Component: https://esphome.io/components/logger.html
logger:
baud_rate: 0 # disable logging via UART, help to avoid numerous crash with ESP_LOGD
hardware_uart : UART1
level: info
esp8266_store_log_strings_in_flash: false
# Native API Component: https://esphome.io/components/api.html
api:
encryption:
key: imB+N0VsxE6Ape4RhsxuyDLjCkeDIHl0GNyj1Gm3ylU=
# Captive Portal: https://esphome.io/components/captive_portal.html
captive_portal:
# Web Server: https://esphome.io/components/web_server.html
web_server:
local: true
port: 80
auth:
username: !secret esphome_web_server_username
password: !secret esphome_web_server_password
# Time: https://esphome.io/components/time.html
time:
- platform: homeassistant
timezone: "Europe/Paris"
id: homeassistant_time
# Status Binary Sensor: https://esphome.io/components/binary_sensor/status.html
binary_sensor:
- platform: status
name: "Linky Status"
# Restart Button: https://esphome.io/components/button/restart.html
button:
- platform: restart
name: "Linky Restart"
# https://esphome.io/custom/uart.html
uart:
id: uart_bus
rx_pin: GPIO3
baud_rate: 9600 # 9600 == mode standard, 1200 == mode historique
parity: EVEN
data_bits: 7
stop_bits: 1
# https://esphome.io/components/sensor/teleinfo.html
teleinfo:
update_interval: 5s
historical_mode: false # false == mode standard, true == mode historique
# https://esphome.io/components/sensor/index.html
sensor:
# WiFi
- platform: wifi_signal
name: "Linky WiFi Signal"
unit_of_measurement: dB
device_class: signal_strength
accuracy_decimals: 0
update_interval: 60s
# Uptime
- platform: uptime
name: "Linky Uptime"
unit_of_measurement: s
device_class: duration
accuracy_decimals: 0
update_interval: 60s
#--------------
# MODE STANDARD
#--------------
# Énergie active soutirée totale
- platform: teleinfo
tag_name: "EAST"
name: "Linky Energie Soutirée"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# Energie active soutirée Fournisseur, index 01
- platform: teleinfo
tag_name: "EASF01"
name: "Linky Energie Soutirée Tempo Bleu HC"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# Energie active soutirée Fournisseur, index 02
- platform: teleinfo
tag_name: "EASF02"
name: "Linky Energie Soutirée Tempo Bleu HP"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# Energie active soutirée Fournisseur, index 03
- platform: teleinfo
tag_name: "EASF03"
name: "Linky Energie Soutirée Tempo Blanc HC"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# Energie active soutirée Fournisseur, index 04
- platform: teleinfo
tag_name: "EASF04"
name: "Linky Energie Soutirée Tempo Blanc HP"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# Energie active soutirée Fournisseur, index 05
- platform: teleinfo
tag_name: "EASF05"
name: "Linky Energie Soutirée Tempo Rouge HC"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# Energie active soutirée Fournisseur, index 06
- platform: teleinfo
tag_name: "EASF06"
name: "Linky Energie Soutirée Tempo Rouge HP"
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
accuracy_decimals: 3
filters:
- multiply: 0.001
# # Energie active soutirée Fournisseur, index 07
# - platform: teleinfo
# tag_name: "EASF07"
# name: "Linky Energie Soutirée F07"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Fournisseur, index 08
# - platform: teleinfo
# tag_name: "EASF08"
# name: "Linky Energie Soutirée F08"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Fournisseur, index 09
# - platform: teleinfo
# tag_name: "EASF09"
# name: "Linky Energie Soutirée F09"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Fournisseur, index 10
# - platform: teleinfo
# tag_name: "EASF10"
# name: "Linky Energie Soutirée F10"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Distributeur, index 01
# - platform: teleinfo
# tag_name: "EASD01"
# name: "Linky Energie Soutirée D01"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Distributeur, index 02
# - platform: teleinfo
# tag_name: "EASD02"
# name: "Linky Energie Soutirée D02"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Distributeur, index 03
# - platform: teleinfo
# tag_name: "EASD03"
# name: "Linky Energie Soutirée D03"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Energie active soutirée Distributeur, index 04
# - platform: teleinfo
# tag_name: "EASD04"
# name: "Linky Energie Soutirée D04"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# Courant Efficace, phase 1
- platform: teleinfo
tag_name: "IRMS1"
name: "Linky Courant Efficace"
unit_of_measurement: A
device_class: current
state_class: measurement
# Tension Efficace, phase 1
- platform: teleinfo
tag_name: "URMS1"
name: "Linky Tension Efficace"
unit_of_measurement: V
device_class: voltage
state_class: measurement
# Puissance app. de référence
# - platform: teleinfo
# tag_name: "PREF"
# name: "Linky Puissance Apparente Référence"
# state_class: measurement
# device_class: apparent_power
# unit_of_measurement: VA
# filters:
# - multiply: 1000
# Puissance app. de coupure
- platform: teleinfo
tag_name: "PCOUP"
name: "Linky Puissance Apparente Coupure"
state_class: measurement
device_class: apparent_power
unit_of_measurement: VA
filters:
- multiply: 1000
# Puissance app. Instantanée Soutirée
- platform: teleinfo
tag_name: "SINSTS"
name: "Linky Puissance Apparente Instantanée Soutirée"
unit_of_measurement: VA
state_class: measurement
device_class: apparent_power
# Puissance app. max. soutirée
# - platform: teleinfo
# tag_name: "SMAXSN"
# name: "Linky Puissance Apparente Maximale Soutirée"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# Point n de la courbe de charge active soutirée
- platform: teleinfo
tag_name: "CCASN"
name: "Linky Puissance Active Soutirée"
unit_of_measurement: W
state_class: measurement
device_class: power
# Point n-1 de la courbe de charge active soutirée
- platform: teleinfo
tag_name: "CCASN-1"
name: "Linky Puissance Active Soutirée N-1"
unit_of_measurement: W
state_class: measurement
device_class: power
# Tension Moyenne, phase 1
# - platform: teleinfo
# tag_name: "UMOY1"
# name: "Linky Tension Moyenne"
# unit_of_measurement: V
# device_class: voltage
# state_class: measurement
#-------------------------
# MODE STANDARD - TRIPHASÉ
#-------------------------
# # Courant Efficace, phase 2
# - platform: teleinfo
# tag_name: "IRMS2"
# name: "Linky Courant Efficace Phase 2"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Courant Efficace, phase 3
# - platform: teleinfo
# tag_name: "IRMS3"
# name: "Linky Courant Efficace Phase 3"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Tension Efficace, phase 2
# - platform: teleinfo
# tag_name: "URMS2"
# name: "Linky Tension Efficace Phase 2"
# unit_of_measurement: V
# device_class: voltage
# state_class: measurement
# # Tension Efficace, phase 3
# - platform: teleinfo
# tag_name: "URMS3"
# name: "Linky Tension Efficace Phase 3"
# unit_of_measurement: V
# device_class: voltage
# state_class: measurement
# # Puissance app. Instantanée Soutirée, phase 1
# - platform: teleinfo
# tag_name: "SINSTS1"
# name: "Linky Puissance Apparente Instantanée Soutirée Phase 1"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Puissance app. Instantanée Soutirée, phase 2
# - platform: teleinfo
# tag_name: "SINSTS2"
# name: "Linky Puissance Apparente Instantanée Soutirée Phase 2"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Puissance app. Instantanée Soutirée, phase 3
# - platform: teleinfo
# tag_name: "SINSTS3"
# name: "Linky Puissance Apparente Instantanée Soutirée Phase 3"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Puissance app. max. Soutirée, phase 1
# - platform: teleinfo
# tag_name: "SMAXSN1"
# name: "Linky Puissance Apparente Maximale Soutirée Phase 1"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Puissance app. max. Soutirée, phase 2
# - platform: teleinfo
# tag_name: "SMAXSN2"
# name: "Linky Puissance Apparente Maximale Soutirée Phase 2"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Puissance app. max. Soutirée, phase 3
# - platform: teleinfo
# tag_name: "SMAXSN3"
# name: "Linky Puissance Apparente Maximale Soutirée Phase 3"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Tension Moyenne, phase 2
# - platform: teleinfo
# tag_name: "UMOY2"
# name: "Linky Tension Moyenne Phase 2"
# unit_of_measurement: V
# device_class: voltage
# state_class: measurement
# # Tension Moyenne, phase 3
# - platform: teleinfo
# tag_name: "UMOY3"
# name: "Linky Tension Moyenne Phase 3"
# unit_of_measurement: V
# device_class: voltage
# state_class: measurement
#----------------------------
# MODE STANDARD - PRODUCTEURS
#----------------------------
# # Energie active injectée totale
# - platform: teleinfo
# tag_name: "EAIT"
# name: "Linky Energie Injectée"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Puissance app. Instantanée Injectée
# - platform: teleinfo
# tag_name: "SINSTI"
# name: "Linky Puissance Apparente Instantanée Injectée"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Puissance app. Maximale Injectée
# - platform: teleinfo
# tag_name: "SMAXIN"
# name: "Linky Puissance Apparente Maximale Injectée"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
# # Point n de la courbe de charge active injectée
# - platform: teleinfo
# tag_name: "CCAIN"
# name: "Linky Puissance Active Injectée"
# unit_of_measurement: W
# state_class: measurement
# device_class: power
# # Point n-1 de la courbe de charge active injectée
# - platform: teleinfo
# tag_name: "CCAIN-1"
# name: "Linky Puissance Active Injectée N-1"
# unit_of_measurement: W
# state_class: measurement
# device_class: power
#----------------
# MODE HISTORIQUE
#----------------
# # Intensité souscrite
# - platform: teleinfo
# tag_name: "ISOUSC"
# name: "Linky Intensité souscrite"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Index option Base
# - platform: teleinfo
# tag_name: "BASE"
# name: "Linky Index Base"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Index option HP/HC
# - platform: teleinfo
# tag_name: "HCHC"
# name: "Linky Index HC"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "HCHP"
# name: "Linky Index HP"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Index option EJP
# - platform: teleinfo
# tag_name: "EJPHN"
# name: "Linky Index EJP Normal"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "EJPHPM"
# name: "Linky Index EJP Pointe"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Index option Tempo
# - platform: teleinfo
# tag_name: "BBRHCJB"
# name: "Linky Index Tempo Bleu HC"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "BBRHPJB"
# name: "Linky Index Tempo Bleu HP"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "BBRHCJW"
# name: "Linky Index Tempo Blanc HC"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "BBRHPJW"
# name: "Linky Index Tempo Blanc HP"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "BBRHCJR"
# name: "Linky Index Tempo Rouge HC"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# - platform: teleinfo
# tag_name: "BBRHPJR"
# name: "Linky Index Tempo Rouge HP"
# unit_of_measurement: kWh
# device_class: energy
# state_class: total_increasing
# accuracy_decimals: 3
# filters:
# - multiply: 0.001
# # Intensité Instantanée (monophasé)
# - platform: teleinfo
# tag_name: "IINST"
# name: "Linky Intensité Instantanée"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Avertissement de Dépassement De Puissance Souscrite
# - platform: teleinfo
# tag_name: "ADPS"
# name: "Linky Intensité Instantanée Dépassement"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Intensité maximale appelée (monophasé)
# - platform: teleinfo
# tag_name: "IMAX"
# name: "Linky Intensité Maximale"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Puissance apparente
# - platform: teleinfo
# tag_name: "PAPP"
# name: "Linky Puissance Apparente"
# unit_of_measurement: VA
# state_class: measurement
# device_class: apparent_power
#---------------------------
# MODE HISTORIQUE - TRIPHASÉ
#---------------------------
# # Intensité Instantanée, phase 1
# - platform: teleinfo
# tag_name: "IINST1"
# name: "Linky Intensité Instantanée Phase 1"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Intensité Instantanée, phase 2
# - platform: teleinfo
# tag_name: "IINST2"
# name: "Linky Intensité Instantanée Phase 2"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Intensité Instantanée, phase 3
# - platform: teleinfo
# tag_name: "IINST3"
# name: "Linky Intensité Instantanée Phase 3"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Intensité maximale appelée, phase 1
# - platform: teleinfo
# tag_name: "IMAX1"
# name: "Linky Intensité Maximale Phase 1"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Intensité maximale appelée, phase 2
# - platform: teleinfo
# tag_name: "IMAX2"
# name: "Linky Intensité Maximale Phase 2"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Intensité maximale appelée, phase 3
# - platform: teleinfo
# tag_name: "IMAX3"
# name: "Linky Intensité Maximale Phase 3"
# unit_of_measurement: A
# device_class: current
# state_class: measurement
# # Puissance maximale atteinte
# - platform: teleinfo
# tag_name: "PMAX"
# name: "Linky Puissance Maximale"
# unit_of_measurement: W
# state_class: measurement
# device_class: power
# https://esphome.io/components/text_sensor/index.html
text_sensor:
- platform: wifi_info
ip_address:
name: Linky IP Address
mac_address:
name: Linky Wifi Mac Address
ssid:
name: Linky Wifi SSID
bssid:
name: Linky Wifi BSSID
#--------------
# MODE STANDARD
#--------------
# # Adresse Secondaire du Compteur
# - platform: teleinfo
# tag_name: "ADSC"
# name: "Linky Adresse Secondaire"
# Nom du calendrier tarifaire fournisseur
- platform: teleinfo
tag_name: "NGTF"
name: "Linky Calendrier Tarifaire"
icon: mdi:information
# Libellé tarif fournisseur en cours
- platform: teleinfo
tag_name: "LTARF"
name: "Linky Tarif Actuel"
icon: mdi:information
# Registre de Statuts
# - platform: teleinfo
# tag_name: "STGE"
# name: "Linky Registre de Statuts"
# icon: mdi:information
# # Message court
# - platform: teleinfo
# tag_name: "MSG1"
# name: "Linky Message court"
# # Message Ultra court
# - platform: teleinfo
# tag_name: "MSG2"
# name: "Linky Message Ultra court"
# # PRM
# - platform: teleinfo
# tag_name: "PRM"
# name: "Linky PRM"
# # Relais
# - platform: teleinfo
# tag_name: "RELAIS"
# name: "Linky Relais"
#----------------
# MODE HISTORIQUE
#----------------
# # Adresse du compteur
# - platform: teleinfo
# tag_name: "ADCO"
# name: "Linky Adresse"
# # Option tarifaire choisie
# - platform: teleinfo
# tag_name: "OPTARIF"
# name: "Linky Option Tarifaire"
# # Préavis Début EJP (30 min)
# - platform: teleinfo
# tag_name: "PEJP"
# name: "Linky Préavis EJP"
# # Période Tarifaire en cours
# - platform: teleinfo
# tag_name: "PTEC"
# name: "Linky Période Tarifaire"
# # Couleur du lendemain
# - platform: teleinfo
# tag_name: "DEMAIN"
# name: "Linky Couleur Demain"
# # Horaire Heures Pleines Heures Creuses
# - platform: teleinfo
# tag_name: "HHPHC"
# name: "Linky Horaire HP/HC"
# # Mot d'état du compteur
# - platform: teleinfo
# tag_name: "MOTDETAT"
# name: "Linky Mot d'état"
# # Présence des potentiels
# - platform: teleinfo
# tag_name: "PPOT"
# name: "Linky Présence Potentiels"
@ArnieO
Copy link

ArnieO commented Aug 8, 2024

Ça fait des années que des pros s'y collent ;-)

Je te crois!

Regarde le graphe que ça donne.

Effectivement, c'est vraiment décevant - et pas utile du tout quand le résolution est 1A.
Le Linky ne cesse pas de surprendre de façon négatif.
Il y a une multitude de bons compteurs sur le marché - et Enedis a choisi ça.

@mathieucarbou
Copy link
Author

Comme tu dis...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment