Impossible de mettre à jour mes esp32 et esp8266

Mon problème

Impossible de mettre à jour mes esp32 - je deviens dingue :dizzy_face:

Bonjour à tous,
Je suis nouveau sur le forum. Je m’essaye depuis quelques semaines à HomeAssistant vers lequel j’ai migré. J’étais auparavant sur Jeedom.

Enfin bref :sweat_smile:, après une mise en route réussie, m’arrache les cheveux depuis quelques jours sur ESPHOME. Impossible de procéder aux installations sur les esp32. Cela fonctionnait bien auparavant.
j’ai fait plusieurs intégrations et déploiement.

Bizarrement lorsque je clique sur « Install », la mise à jour commence, mais plante aléatoirement sans jamais arriver jusqu’à la fin. Je passe par la mise à jour sans fil (wirelessly).

Parfois cela ne va pas dépasser « Linking .pioenvs/esphome-web-e0e4b0/firmware.elf » (c’est le cas actuellement, parfois cela va défiler et planter un peu n’importe où.
Cela fait plus d’une semaine que je n’arrive plus rien à passer.
Ce foutu bouton RETRY réapparait à chaque fois en cours d’installation.

J’ai supprimer tous mes ESP, nettoyé le répertoire .config/esphome, supprimer esphome, réinstallé, redémarré ma machine virtuelle (OVA sur NAS Synology - Virtual Machine Manager), redémarré NAS, ré-adoptés les ESP. J’ai fait ces opérations dans tous les sens, mais rien n’y fait.

J’avoue être un peu à cours d’idée.

J’ai remarqué que parfois l’utilisation du CPU de l’extention ESPHOME etait à 99% sans pour autant que le CPU affecté à la machine virtuelle ne dépasse les 3% - 4%

Je me suis demandé si mon WIFI n’était pas en cause et vérifié la configuration, mais pas de problème particulier de ce coté.

Ce qui me fait dire que ce n’est probablement pas un problème avec le wifi, c’est que le même phénomène se produit lorsque je compile sans envoyer la config en WIFI (Manual download).

Si l’un d’entre vous à une idée, je suis preneur :slight_smile:
Merci à vous

Ma configuration


[center]## System Information

version core-2023.10.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.5
os_name Linux
os_version 6.1.56
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4996
Installed Version 1.33.0
Stage running
Available Repositories 1304
Downloaded Repositories 6
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 11.0
update_channel stable
supervisor_version supervisor-2023.10.0
agent_version 1.6.0
docker_version 24.0.6
disk_total 30.8 GB
disk_used 8.8 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Mosquitto broker (6.3.1), Zigbee2MQTT (1.33.1-1), Studio Code Server (5.11.0), File editor (5.6.0), Terminal & SSH (9.7.1), Node-RED (14.6.1), ESPHome (2023.9.3)
Dashboards
dashboards 1
resources 3
views 4
mode storage
Recorder
oldest_recorder_run 3 octobre 2023 à 11:26
current_recorder_run 14 octobre 2023 à 11:30
estimated_db_size 52.97 MiB
database_engine sqlite
database_version 3.41.2
[/center] ___

Ah oui, petite précision, j’ai testé mes esp32 - notamment celui avec lequel je fais les essais - en passant par Arduino, voir si ce n’était pas l’ESP qui était en cause, mais non, il fonctionne parfaitement.

Pour info voici le yaml que j’essaye de passer
(disponible ici : https://github.com/NoahJst/HomeAssistant-Config/blob/main/esphome/epaper-esp32.yaml)

esphome:
  name: esphome-web-e0e4b0
  friendly_name: EPAPER
  on_boot:
  - delay: 15s
  - script.execute: update_screen

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "////////////"

ota:


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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-E0E4B0"
    password: "////////////"

captive_portal:
    
script:
  - id: update_screen
    then:
      - component.update: eink_display

time:
  - platform: sntp
    id: sntp_time
    on_time:
      # 00:00
      - seconds: 0
        minutes: 5
        hours: 0
        then:
          - script.execute: update_screen
      # 08:00 (Saturday and Sunday)
      - seconds: 0
        minutes: 0
        hours: 8
        days_of_week: SAT-SUN
        then:
          - script.execute: update_screen
      # 16:00
      - seconds: 0
        minutes: 0
        hours: 16
        then:
          - script.execute: update_screen

spi:
  clk_pin: 13
  mosi_pin: 14
    
font:
  ######### REGULAR #################
  - file: "Fonts/GothamRnd-Book.ttf"
    id: book20
    size: 20
    glyphs: &font-glyphs
      ['!', '"', '%', '(', ')', '+', '=', ',', '-', '_', '.', ':', '°', ' ',
      '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
      'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
      'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
      'é', 'à', 'è', 'ç', 'ù', 'É', 'À', 'È', 'Ç', 'Ù']
  - file: "Fonts/GothamRnd-Book.ttf"
    id: book25
    size: 25
    glyphs : *font-glyphs 
  ########## BOLD ################## 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold15
    size: 15
    glyphs : *font-glyphs 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold20
    size: 20
    glyphs : *font-glyphs 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold25
    size: 25
    glyphs : *font-glyphs 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold30
    size: 30
    glyphs : *font-glyphs 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold35
    size: 35
    glyphs : *font-glyphs 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold40
    size: 40
    glyphs : *font-glyphs 
  - file: "Fonts/GothamRnd-Bold.ttf"
    id: bold55
    size: 55
    glyphs: ['.', '°', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'C', '-']

  - file: 'Fonts/materialdesignicons-webfont.ttf'
    id: mdi120
    size: 120
    glyphs: &mdi-weather-glyphs
      - "\U000F0590" # mdi-weather-cloudy
      - "\U000F0F2F" # mdi-weather-cloudy-alert
      - "\U000F0E6E" # mdi-weather-cloudy-arrow-right
      - "\U000F0591" # mdi-weather-fog
      - "\U000F0592" # mdi-weather-hail
      - "\U000F0F30" # mdi-weather-hazy
      - "\U000F0898" # mdi-weather-hurricane
      - "\U000F0593" # mdi-weather-lightning
      - "\U000F067E" # mdi-weather-lightning-rainy
      - "\U000F0594" # mdi-weather-night
      - "\U000F0F31" # mdi-weather-night-partly-cloudy
      - "\U000F0595" # mdi-weather-partly-cloudy
      - "\U000F0F32" # mdi-weather-partly-lightning
      - "\U000F0F33" # mdi-weather-partly-rainy
      - "\U000F0F34" # mdi-weather-partly-snowy
      - "\U000F0F35" # mdi-weather-partly-snowy-rainy
      - "\U000F0596" # mdi-weather-pouring
      - "\U000F0597" # mdi-weather-rainy
      - "\U000F0598" # mdi-weather-snowy
      - "\U000F0F36" # mdi-weather-snowy-heavy
      - "\U000F067F" # mdi-weather-snowy-rainy
      - "\U000F0599" # mdi-weather-sunny
      - "\U000F0F37" # mdi-weather-sunny-alert
      - "\U000F14E4" # mdi-weather-sunny-off
      - "\U000F059A" # mdi-weather-sunset
      - "\U000F059B" # mdi-weather-sunset-down
      - "\U000F059C" # mdi-weather-sunset-up
      - "\U000F0F38" # mdi-weather-tornado
      - "\U000F059D" # mdi-weather-windy
      - "\U000F059E" # mdi-weather-windy-variant

      - "\U000F00E9" # mdi-cake
      - "\U000F0A70" # mdi-silverware-fork-knife

      - "\U000F1A74" # mdi-solar-power-variant-outline
      - "\U000F1904" # mdi-home-lightning-bolt-outline

      - "\U000F05C3" # mdi-youtube

      - "\U000F05D6" # mdi-alert-circle-outline

  - file: 'Fonts/materialdesignicons-webfont.ttf'
    id: mdi36
    size: 36
    glyphs: *mdi-weather-glyphs
  - file: 'Fonts/materialdesignicons-webfont.ttf'
    id: mdi20
    size: 20
    glyphs: *mdi-weather-glyphs

sensor:
  - platform: homeassistant
    entity_id: weather.cityname
    attribute: temperature
    id: weather_temperature
  - platform: homeassistant
    entity_id: sensor.weather_temperature_1
    id: weather_temperature_1
  - platform: homeassistant
    entity_id: sensor.weather_temperature_2
    id: weather_temperature_2
  - platform: homeassistant
    entity_id: sensor.weather_temperature_3
    id: weather_temperature_3
  - platform: homeassistant
    entity_id: sensor.weather_temperature_4
    id: weather_temperature_4
  - platform: homeassistant
    entity_id: sensor.weather_temperature_5
    id: weather_temperature_5
  - platform: homeassistant
    entity_id: sensor.weather_templow_1
    id: weather_templow_1
  - platform: homeassistant
    entity_id: sensor.weather_templow_2
    id: weather_templow_2
  - platform: homeassistant
    entity_id: sensor.weather_templow_3
    id: weather_templow_3
  - platform: homeassistant
    entity_id: sensor.weather_templow_4
    id: weather_templow_4
  - platform: homeassistant
    entity_id: sensor.weather_templow_5
    id: weather_templow_5

text_sensor: 
  - platform: homeassistant
    entity_id: sensor.date_fr_complete
    id: date_fr_complete
  - platform: homeassistant
    entity_id: weather.cityname
    id: weather_name
  - platform: homeassistant
    entity_id: sensor.weather_day_1
    id: weather_day_1
  - platform: homeassistant
    entity_id: sensor.weather_condition_1
    id: weather_condition_1
  - platform: homeassistant
    entity_id: sensor.weather_day_2
    id: weather_day_2
  - platform: homeassistant
    entity_id: sensor.weather_condition_2
    id: weather_condition_2
  - platform: homeassistant
    entity_id: sensor.weather_day_3
    id: weather_day_3
  - platform: homeassistant
    entity_id: sensor.weather_condition_3
    id: weather_condition_3
  - platform: homeassistant
    entity_id: sensor.weather_day_4
    id: weather_day_4
  - platform: homeassistant
    entity_id: sensor.weather_condition_4
    id: weather_condition_4
  - platform: homeassistant
    entity_id: sensor.weather_day_5
    id: weather_day_5
  - platform: homeassistant
    entity_id: sensor.weather_condition_5
    id: weather_condition_5
  - platform: homeassistant
    entity_id: sensor.youtube_view_count
    id: yt_view
  - platform: homeassistant
    entity_id: sensor.youtube_sub_count
    id: yt_sub
  - platform: homeassistant
    entity_id: sensor.next_bithday_date
    id: bithday_date
  - platform: homeassistant
    entity_id: sensor.next_bithday_name
    id: bithday_name

graph:
  - id: weather_temperature_graph
    sensor: weather_temperature
    duration: 24h
    width: 380
    height: 50
    min_value: 0

display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    reset_duration: 2ms
    model: 7.50inv2
    rotation: 270°
    update_interval: never
    lambda: |
     std::map<std::string, std::string> weather_icon_map
        {
          {"cloudy", "\U000F0590"},
          {"cloudy-alert", "\U000F0F2F"},
          {"cloudy-arrow-right", "\U000F0E6E"},
          {"fog", "\U000F0591"},
          {"hail", "\U000F0592"},
          {"hazy", "\U000F0F30"},
          {"hurricane", "\U000F0898"},
          {"lightning", "\U000F0593"},
          {"lightning-rainy", "\U000F067E"},
          {"night", "\U000F0594"},
          {"night-partly-cloudy", "\U000F0F31"},
          {"partlycloudy", "\U000F0595"},
          {"partly-lightning", "\U000F0F32"},
          {"partly-rainy", "\U000F0F33"},
          {"partly-snowy", "\U000F0F34"},
          {"partly-snowy-rainy", "\U000F0F35"},
          {"pouring", "\U000F0596"},
          {"rainy", "\U000F0597"},
          {"snowy", "\U000F0598"},
          {"snowy-heavy", "\U000F0F36"},
          {"snowy-rainy", "\U000F067F"},
          {"sunny", "\U000F0599"},
          {"sunny-alert", "\U000F0F37"},
          {"sunny-off", "\U000F14E4"},
          {"sunset", "\U000F059A"},
          {"sunset-down", "\U000F059B"},
          {"sunset-up", "\U000F059C"},
          {"tornado", "\U000F0F38"},
          {"windy", "\U000F059D"},
          {"windy-variant", "\U000F059E"},
        };

     std::map<std::string, std::string> weather_traduction
        {
          {"cloudy", "Nuageux"},
          {"cloudy-alert", "Alerte"},
          {"cloudy-arrow-right", "--"},
          {"fog", "Brouillard"},
          {"hail", "Grêle"},
          {"hazy", "Brume"},
          {"hurricane", "Ouragan"},
          {"lightning", "Orage"},
          {"lightning-rainy", "Orageux"},
          {"night", "Nuit"},
          {"night-partly-cloudy", "Nuageux"},
          {"partlycloudy", "Nuageux"},
          {"partly-lightning", "Orageux"},
          {"partly-rainy", "Pluvieux"},
          {"partly-snowy", "Neigeux"},
          {"partly-snowy-rainy", "Neigeux"},
          {"pouring", "À verse"},
          {"rainy", "Pluvieux"},
          {"snowy", "Neigeux"},
          {"snowy-heavy", "Neigeux"},
          {"snowy-rainy", "Neigeux"},
          {"sunny", "Ensoleillé"},
          {"sunny-alert", "Alerte"},
          {"sunny-off", "--"},
          {"sunset", "Crépuscule"},
          {"sunset-down", "Crépuscule"},
          {"sunset-up", "Aube"},
          {"tornado", "Tornade"},
          {"windy", "Venteux"},
          {"windy-variant", "Venteux"},
        };


     it.printf(240, 75, id(bold35), TextAlign::TOP_CENTER, "%s", id(date_fr_complete).state.c_str());


     it.filled_rectangle(50, 120, 380, 2);


     it.printf(105, 135, id(mdi120), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_name).state].c_str());
     it.printf(180, 145, id(bold35), TextAlign::TOP_LEFT, "%s", weather_traduction[id(weather_name).state].c_str());
     it.printf(180, 187, id(bold55), TextAlign::TOP_LEFT, "%2.1f°C", id(weather_temperature).state);

     it.printf(85, 285, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_1).state.c_str());
     it.printf(85, 315, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_1).state].c_str());
     it.printf(85, 355, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_1).state);
     it.printf(85, 375, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_1).state);

     it.printf(162, 285, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_2).state.c_str());
     it.printf(162, 315, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_2).state].c_str());
     it.printf(162, 355, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_2).state);
     it.printf(162, 375, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_2).state);

     it.printf(240, 285, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_3).state.c_str());
     it.printf(240, 315, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_3).state].c_str());
     it.printf(240, 355, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_3).state);
     it.printf(240, 375, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_3).state);

     it.printf(318, 285, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_4).state.c_str());
     it.printf(318, 315, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_4).state].c_str());
     it.printf(318, 355, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_4).state);
     it.printf(318, 375, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_4).state);

     it.printf(395, 285, id(bold25), TextAlign::TOP_CENTER, "%s", id(weather_day_5).state.c_str());
     it.printf(395, 315, id(mdi36), TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_5).state].c_str());
     it.printf(395, 355, id(bold20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_temperature_5).state);
     it.printf(395, 375, id(book20), TextAlign::TOP_CENTER, "%2.1f°C", id(weather_templow_5).state);


     it.filled_rectangle(50, 408, 380, 2);


     it.printf(50, 425, id(bold25), TextAlign::TOP_LEFT, "%s", id(bithday_date).state.c_str());
     it.print(165, 425, id(mdi20), TextAlign::TOP_LEFT, "\U000F00E9");
     it.printf(195, 425, id(book25), TextAlign::TOP_LEFT, "%s", id(bithday_name).state.c_str());
     it.print(50, 455, id(bold25), TextAlign::TOP_LEFT, "-- --.");
     it.print(165, 455, id(mdi20), TextAlign::TOP_LEFT, "\U000F05D6");
     it.print(195, 455, id(book25), TextAlign::TOP_LEFT, "--");
     it.print(50, 485, id(bold25), TextAlign::TOP_LEFT, "-- --.");
     it.print(165, 485, id(mdi20), TextAlign::TOP_LEFT, "\U000F05D6");
     it.print(195, 485, id(book25), TextAlign::TOP_LEFT, "--");


     it.filled_rectangle(50, 520, 380, 2);


     it.print(70, 540, id(mdi36), TextAlign::TOP_CENTER, "\U000F1A74");
     it.print(95, 535, id(bold30), TextAlign::TOP_LEFT, "-.-kWh");
     it.print(95, 565, id(bold15), TextAlign::TOP_LEFT, "--% consommé");
     it.filled_rectangle(235, 535, 2, 40);
     it.print(265, 535, id(mdi36), TextAlign::TOP_CENTER, "\U000F1904");
     it.print(285, 535, id(bold30), TextAlign::TOP_LEFT, "-.-kWh");
     it.print(285, 565, id(bold15), TextAlign::TOP_LEFT, "--% solaire");
     it.graph(50, 595, id(weather_temperature_graph));


     it.filled_rectangle(50, 660, 380, 2);


     it.print(68, 673, id(mdi36), TextAlign::TOP_CENTER, "\U000F05C3");
     it.printf(97, 680, id(bold25), TextAlign::TOP_LEFT, "%s", id(yt_sub).state.c_str());
     it.print(165, 680, id(book25), TextAlign::TOP_LEFT, "Abonnés");
     it.filled_rectangle(285, 680, 2, 25);
     it.printf(300, 680, id(bold25), TextAlign::TOP_LEFT, "%s", id(yt_view).state.c_str());
     it.print(370, 680, id(book25), TextAlign::TOP_LEFT, "Vues");


     it.filled_rectangle(50, 720, 380, 2);


     it.printf(250, 725, id(bold15), TextAlign::TOP_RIGHT, "Infos mises à jour : ");
     it.strftime(255, 725, id(bold15), TextAlign::TOP_LEFT, "%d-%m-%Y %H:%M", id(sntp_time).now());
     

Essayé par l’USB et chrome

Salut,

tu n’as pas précisé les autres cas ou ça plante, mais si ça reste bloqué à la phase Linking, c’est que la conpilation n’a pas encore fini. DOnc chercher du côté du Wifi, de l’Usb ou de l’ESP en lui même ne sert à rien du tout.
Tu le vois par toi même quand tu dis que c’est la même chose en faisant un « Manual Download ».

Sur quel type de machine / processeur est-tu et combien de ressources sont disponibles?
En compilation ça joue un rôle énorme.

Merci pour vos retours,

Concernant le NAS où est hébergée la VM, c’est un DS1515+
(Atom C2538 (quatre cœurs à 2,4 GHz))

La VM est configurée avec 2 vCPU et 3GB de RAM

Je vais faire un test en augmentant la conf

Je viens de relancer une compilation apres avoir augmenter les composants VM (4 vCPU + 6G Ram)

Voici l’endroit ou cela s’est arrêté (Je n’avais pas encore eu ça :sweat_smile:) :

Bonjour,
as tu essayer de faire un clean build file?
Retenter une compilation après.

Chez moi, quand ca compile, sa download des dépendances, tu vois la compilation de tout les fichiers, puis le linking du firmware et le succès avec une ligne verte pour dire que c’est OK.

Chez toi, dans les logs on vois le download des dépendences, la compilation d’un fichier et le linking du firmware :frowning:

Merci pour ton retour,

J’ai fait un Clean Build Files. Ça démarre bien, mais ça fini par planter à nouveau.

Après avoir relancé une nouvelle fois :

Et nouvelle fois :

Ce peux t-il qu’il y ai une corruption au niveau des sources ou bien un problème lors de la phase de préparation de d’adoption ?

Ce warning est pas génant ?

warning gpio15 is a strapping pin and should be avoided

Je vais regarder de ce coté également.

Par contre, j’ai peut-être une piste.
Je viens de couper mon antivirus (kaspersky) et j’ai procédé à deux installations successives réussies.
Coïncidences / coups de bol ?

Je vais le réactiver et faire un nouveau test.

Ah oui c’est possible que ca soit l’antivirus et surtout si c’est avast.
Javais eu des soucis de flash d’une psp a l’époque a cause d’avast :stuck_out_tongue:

Effectivement, sans antivirus cela fonctionne correctement.
Enfin presque, mais je vais ouvrir un autre post pour ça (pb de code) :thinking: :sweat_smile:

Il faut que je trouve comment faire une exception sur cette page.

En tout cas, merci à vous

2 « J'aime »