Compilation ESP Home pour avoir la TIC sur cet ESP
-
Bonjour.
Je viens de recevoir ma carte Denky D4 et je n'arrive pas à compiler un fichier YAML pour Home Assistant
J'ai cette erreur :
INFO ESPHome 2024.6.6 INFO Reading configuration /config/esphome/esphome-web-f5bfa8.yaml... Failed config uart: [source /config/esphome/esphome-web-f5bfa8.yaml:77] - id: uart_bus This pin cannot be used on ESP32s and is already used by the flash interface (function: Flash Data 1). rx_pin: GPIO8 baud_rate: 1200 parity: EVEN data_bits: 7
Et voici mon code YAML :
substitutions: name: esp-tic-feyree friendly_name: esp-tic-feyree device_description: Infos TIC Recharge VE esphome: name: ${name} friendly_name: ${friendly_name} comment: ${device_description} min_version: 2024.6.0 name_add_mac_suffix: false project: name: esphome.web version: '1.0' esp32: # board: adafruit_qtpy_esp32 board: denky_d4 framework: type: esp-idf # Enable logging logger: # Enable Home Assistant API api: # Allow Over-The-Air updates ota: - platform: esphome # Allow provisioning Wi-Fi via serial improv_serial: wifi: # Set up a wifi access point ap: {} # In combination with the `ap` this allows the user # to provision wifi credentials to the device via WiFi AP. captive_portal: dashboard_import: package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main import_full_config: true # Sets up Bluetooth LE (Only on ESP32) to allow the user # to provision wifi credentials to the device. esp32_improv: authorizer: none # To have a "next url" for improv serial 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: "Sagem Status" # Restart Button: https://esphome.io/components/button/restart.html button: - platform: restart name: "Sagem Restart" # https://esphome.io/custom/uart.html uart: id: uart_bus rx_pin: GPIO8 # Pin Rx2 baud_rate: 1200 parity: EVEN data_bits: 7 #rx_buffer_size: 512 # https://esphome.io/components/sensor/teleinfo.html teleinfo: update_interval: 60s historical_mode: true # https://esphome.io/components/sensor/index.html sensor: # WiFi - platform: wifi_signal name: "WiFi Signal Sensor" update_interval: 60s unit_of_measurement: dB accuracy_decimals: 0 force_update: false icon: mdi:wifi # Uptime - platform: uptime id: uptime_seconds name: "Uptime Sensor" update_interval: 60s unit_of_measurement: s accuracy_decimals: 0 force_update: false icon: mdi:clock-start # Production - platform: teleinfo tag_name: "BASE" name: "Recharge VE" unit_of_measurement: kWh device_class: energy state_class: total_increasing icon: mdi:flash accuracy_decimals: 2 filters: - multiply: 0.001 - filter_out: 0 text_sensor: - 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() }; }
Quand j'ai initialisé la carte avec ESPHome, elle était vu comme :
esp32: board: esp32dev framework: type: arduino
Mais même avec cette définition, la compilation donne la même erreur.
-
La solution doit se trouver dans ce post https://github.com/esphome/issues/issues/5932 (no testé de mon coté) mais ça devrait fonctionner
esphome: name: linky friendly_name: Linky esp32: board: denky_d4 framework: type: esp-idf uart: rx_pin: GPIO8 ignore_pin_validation_error: true baud_rate: 9600 parity: EVEN data_bits: 7 stop_bits: 1
-
@Charles Merci, je vais tester ça ce WE
-
Je confirme, ça marche nickel !!
Mon YAML au complet :
substitutions: devicename: esp-tic-feyree friendly_name: esp-tic-feyree device_description: Infos TIC chargeur VE esphome: name: $devicename friendly_name: $friendly_name comment: ${device_description} min_version: 2024.6.0 name_add_mac_suffix: false project: name: esphome.web version: '1.0' esp32: board: denky_d4 framework: type: arduino # Enable logging logger: baud_rate: 0 level: INFO #esp8266_store_log_strings_in_flash: False # Enable Home Assistant API api: ota: platform: esphome password: "472f4e3996e22b5cc959fefe4f46d54e" wifi: #ssid: !secret wifi_ssid #password: !secret wifi_password # Enable fallback hotspot (captive portal) in case wifi connection fails ap: {} # 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 captive_portal: # Status Binary Sensor: https://esphome.io/components/binary_sensor/status.html binary_sensor: - platform: status name: "Sagem EV Status" # Restart Button: https://esphome.io/components/button/restart.html button: - platform: restart name: "Sagem EV Restart" # https://esphome.io/custom/uart.html uart: rx_pin: number: GPIO8 # Pin Rx2 ignore_pin_validation_error: true baud_rate: 1200 parity: EVEN data_bits: 7 #rx_buffer_size: 512 # https://esphome.io/components/sensor/teleinfo.html teleinfo: update_interval: 60s historical_mode: true # https://esphome.io/components/sensor/index.html sensor: # WiFi - platform: wifi_signal name: "WiFi Signal Sensor" update_interval: 60s unit_of_measurement: dB accuracy_decimals: 0 force_update: false icon: mdi:wifi # Uptime - platform: uptime id: uptime_seconds name: "Uptime Sensor" update_interval: 60s unit_of_measurement: s accuracy_decimals: 0 force_update: false icon: mdi:clock-start # Production - platform: teleinfo tag_name: "BASE" name: "Recharge VE" unit_of_measurement: kWh device_class: energy state_class: total_increasing icon: mdi:flash accuracy_decimals: 2 filters: - multiply: 0.001 - filter_out: 0 text_sensor: - 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() }; }
-
@Charles Du coup, je garde la carte et je trouverai bien une utilité pour le PiTInfo que j'ai commandé
-
@mikebzh44 je peux annuler ta commande du Pitinfo si tu veux ?
-
@ch_2i Si tu peux le faire, je veux bien, merci.
-
@mikebzh44 C'est fait
-
@Charles Top, merci !