Node not working after update

Hi, my espnode was working fine but after the update it stopped.

The code:

esphome:
  name: display001

esp8266:
  board: d1_mini_pro

# Enable logging
logger:

# Enable Home Assistant API3
api:

ota:
  password: "0b4e2b317e57ed139ebc9b1a38a28d4d"

wifi:
  ssid: "xxxx"
  password: "xxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Display001 Fallback Hotspot"
    password: "iMF5pnYxPJaY"

captive_portal:

spi:
  clk_pin: D5
  mosi_pin: D7

font:
  - file: 'arial.ttf'
    id: font1
    size: 14
 
  - file: 'materialdesignicons-webfont.ttf'
    id: icons
    size: 40
    glyphs:
      - "󰖩"# mdi:wifi
      - "󱚵"# mdi:wifi-alert
   # Weather
      - "󰖙" # mdi-weather-sunny
      - "󰖔" # mdi-weather-night
      - "󰖐" # mdi-weather-cloudy
      - "󰖖" # mdi-weather-pouring
      - "󰙿" # mdi-weather-snowy-rainy
      - "󰼶" # mdi-weather-snowy-heavy
      - "󰖞" # mdi-weather-windy-variant
      - "󰖑" # mdi-weather-fog
      - "󰖕" # mdi-weather-partly-cloudy
      - "󰼱" # mdi-weather-night-partly-cloudy
      
time:
  - platform: homeassistant
    id: esptime

sensor:
  - platform: homeassistant
    id: inside_temperature
    entity_id: sensor.atc_f07f_temperature
    
  - platform: homeassistant
    id: outside_temperature
    entity_id: sensor.outside_temperature

binary_sensor:    
  - platform: homeassistant
    id: internet_status
    entity_id: binary_sensor.internet_status
    
  - platform: homeassistant
    id: outside_status
    entity_id: binary_sensor.motion_detector_garage_2

  - platform: status
    name: "Display001 Status"
    
text_sensor:     
  - platform: homeassistant
    id: brigitte_location
    entity_id: sensor.brigitte_location
    
  - platform: homeassistant
    id: day
    entity_id: sensor.dayoftheweek
    
  - platform: homeassistant
    id: date
    entity_id: sensor.shortdate
    
  - platform: homeassistant
    id: weather
    entity_id: sensor.weather
    
color:

  - id: red
    red: 100%   
    green: 0%
    blue: 0%  
    white: 0%

  - id: green
    red: 0% 
    green: 100% 
    blue: 0%  
    white: 0%
    
  - id: blue
    red: 0% 
    green: 0%
    blue: 100%
    white: 0%
     
  - id: white
    red: 0% 
    green: 0%
    blue: 0%
    white: 100%
 
  - id: yellow
    red: 100%
    green: 100%
    blue: 0%   
    white: 100%
    
graph:
  - id: multi_temperature_graph
    duration: 2h
    x_grid: 10min
    y_grid: 1.0     # degC/div
    width: 87
    height: 51
    traces:
      - sensor: inside_temperature
        line_type: SOLID
        line_thickness: 2
        color: red
      - sensor: outside_temperature
        line_type: SOLID
        line_thickness: 2
        color: blue
        
display:
  - platform: st7735
    model: "INITR_18BLACKTAB"
    reset_pin: D3
    id: TFT
    cs_pin: D2
    dc_pin: D4
    rotation: 0
    device_width: 128
    device_height: 160
    col_start: 0
    row_start: 0
    eight_bit_color: true
    update_interval: 5s
    lambda: |-

      // Print "Temperature" in top center.
      it.printf(64, 0, id(font1), blue,  TextAlign::TOP_CENTER, "Temperature");
      
      // Print time in HH:MM format
      it.strftime(0, 62, id(font1), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());
      it.line(0, 63, 41, 63);

      // Print inside temperature (from homeassistant sensor)
      it.printf(128, 12, id(font1), TextAlign::TOP_RIGHT , "%.1f°", id(inside_temperature).state);
      if (id(inside_temperature).state < 8) {
      it.printf(128, 12, id(font1), blue, TextAlign::TOP_RIGHT, "%.1f°", id(inside_temperature).state);
      } 
      if (id(inside_temperature).state > 25) {
      it.printf(128, 12, id(font1), red, TextAlign::TOP_RIGHT, "%.1f°", id(inside_temperature).state);
      } 
      
      // Print outside temperature (from homeassistant sensor)
      it.printf(128, 37, id(font1), TextAlign::BASELINE_RIGHT , "%.1f°", id(outside_temperature).state);
      if (id(outside_temperature).state < 8) {
      it.printf(128, 12, id(font1), blue, TextAlign::TOP_RIGHT, "%.1f°", id(outside_temperature).state);
      } 
      if (id(outside_temperature).state > 25) {
      it.printf(128, 12, id(font1), red, TextAlign::TOP_RIGHT, "%.1f°", id(outside_temperature).state);
      } 
      
      it.line(0, 38, 128, 38);
      
      // Print Inside temperature.
      it.printf(0, 24, id(font1), yellow, TextAlign::BASELINE_LEFT, "Inside");
      
      // Print outside temperature.
      it.printf(0, 37, id(font1), yellow, TextAlign::BASELINE_LEFT, "Outside");
      
      // Print "Time" in top center.
      it.printf(0, 37, id(font1), blue, TextAlign::TOP_LEFT, "Time");
      
      // Draw the graph at position.
      it.graph(41, 38, id(multi_temperature_graph));
      
      // Print wifi status.
      it.printf(0, 62, id(font1), blue, "Wifi");
      it.printf(0, 74, id(font1), "%s", id(internet_status).state ? "Online" : "Offline");
      it.line(0, 88, 40, 88);
      
      // Print motion detector status.
      it.printf(0, 87, id(font1), blue, "Motion");
      it.printf(0, 99, id(font1), yellow, "%s", id(outside_status).state ? "Detected" : "Clear");
      it.line(0, 113, 128, 113);
      // Print vertical line.
      it.line(57, 113, 57, 88);
      
      // Print date status.
      it.printf(58, 87, id(font1), blue, "Date");
      it.printf(58, 99, id(font1), red, "%s", id(day).state.c_str());
      it.printf(83, 99, id(font1), yellow, "%s", id(date).state.c_str());

      // Print person status.   
      it.printf(0, 112, id(font1), blue, "Brigitte");
      it.printf(0, 125, id(font1), yellow, "%s", id(brigitte_location).state.c_str());
      
      //test
      if (id(weather).has_state()) {
          std::map<std::string, std::string> weather_state {
              { "sunny", "󰖙" },             // mdi:weather-sunny
              { "night", "󰖔" },           // mdi:weather-night
              { "cloudy", "󰖐" },                // mdi:weather-cloudy
              { "rain", "󰖖" },                  // mdi:weather-pouring
              { "sleet", "󰙿" },                 // mdi:weather-snowy-rainy
              { "snow", "󰼶" },                  // mdi:weather-snowy-heavy
              { "wind", "󰖞" },                  // mdi:weather-windy-variant
              { "fog", "󰖑" },                   // mdi:weather-fog
              { "partlycloudy", "󰖕" },          // mdi:weather-partly-cloudy
              { "partlycloudynight", "󰼱" },   // mdi:weather-night-partly-cloudy
            };
            it.printf(88, 110, id(icons), weather_state[id(weather).state.c_str()].c_str());
         }

When i connect it directly to my laptop the logs show the following:

last failed alloc caller: 0x40210057

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v000971b0
~ld
[I][logger:243]: Log initialized
[C][ota:465]: There have been 3 suspected unsuccessful boot attempts.
[I][app:029]: Running through setup()...
[C][spi:023]: Setting up SPI bus...
[D][binary_sensor:034]: 'Display001 Status': Sending initial state OFF
[I][graph:053]: Init trace for sensor inside_temperature
[I][graph:053]: Init trace for sensor outside_temperature
[C][st7735:236]: Setting up ST7735...
[D][st7735:248]:   START
[C][st7735:376]: ST7735
[C][st7735:376]:   Rotations: 0 °
[C][st7735:376]:   Dimensions: 128px x 160px
[C][st7735:377]:   Model: ST7735 BLACKTAB
[C][st7735:378]:   CS Pin: GPIO4
[C][st7735:379]:   DC Pin: GPIO2
[C][st7735:380]:   Reset Pin: GPIO0
[D][st7735:381]:   Buffer Size: 20480
[D][st7735:382]:   Height: 160
[D][st7735:383]:   Width: 128
[D][st7735:384]:   ColStart: 0
[D][st7735:385]:   RowStart: 0
[C][st7735:386]:   Update Interval: 5.0s
[D][st7735:250]:   END
[C][wifi:037]: Setting up WiFi...
[D][wifi:384]: Starting scan...

User exception (panic/abort/assert)

and after that one this shows:

last failed alloc caller: 0x40210057

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 3460, room 16 
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4 
tail 4
chksum 0xc9
csum 0xc9
v000971b0
~ld
[I][logger:243]: Log initialized
[C][ota:465]: There have been 10 suspected unsuccessful boot attempts.
[E][ota:472]: Boot loop detected. Proceeding to safe mode.
[I][app:029]: Running through setup()...
[C][wifi:037]: Setting up WiFi...
[D][wifi:384]: Starting scan...
[D][wifi:399]: Found networks:
[I][wifi:442]: - 'Xtraxtra' [redacted]▂▄▆█
[D][wifi:444]:     Channel: 6
[D][wifi:445]:     RSSI: -36 dB
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[D][wifi:447]: - [redacted] [redacted]▂▄▆█
[I][wifi:255]: WiFi Connecting to 'Xtraxtra'...
[I][wifi:516]: WiFi Connected!
[C][wifi:360]:   Local MAC: 94:B9:7E:18:06:D8
[C][wifi:361]:   SSID: [redacted]
[C][wifi:362]:   IP Address: 10.0.0.219
[C][wifi:363]:   BSSID: [redacted]
[C][wifi:365]:   Hostname: 'display001'
[C][wifi:367]:   Signal strength: -44 dB ▂▄▆█
[C][wifi:371]:   Channel: 6
[C][wifi:372]:   Subnet: 255.255.255.0
[C][wifi:373]:   Gateway: 10.0.0.1
[C][wifi:374]:   DNS1: 64.71.255.204
[C][wifi:375]:   DNS2: 64.71.255.198
[D][wifi:525]: Disabling AP...
[C][ota:089]: Over-The-Air Updates:
[C][ota:090]:   Address: display001.local:8266
[C][ota:093]:   Using Password.
[W][ota:098]: Last Boot was an unhandled reset, will proceed to safe mode in 0 restarts
[I][app:062]: setup() finished successfully!
[I][ota:484]: Waiting for OTA attempt.
[I][app:102]: ESPHome version 2022.9.1 compiled on Sep 28 2022, 12:46:17
[C][wifi:502]: WiFi:
[C][wifi:360]:   Local MAC: 94:B9:7E:18:06:D8
[C][wifi:361]:   SSID: [redacted]
[C][wifi:362]:   IP Address: 10.0.0.219
[C][wifi:363]:   BSSID: [redacted]
[C][wifi:365]:   Hostname: 'display001'
[C][wifi:367]:   Signal strength: -45 dB ▂▄▆█
[C][wifi:371]:   Channel: 6
[C][wifi:372]:   Subnet: 255.255.255.0
[C][wifi:373]:   Gateway: 10.0.0.1
[C][wifi:374]:   DNS1: 64.71.255.204
[C][wifi:375]:   DNS2: 64.71.255.198
[C][logger:275]: Logger:
[C][logger:276]:   Level: DEBUG
[C][logger:277]:   Log Baud Rate: 115200
[C][logger:278]:   Hardware UART: UART0
[C][captive_portal:088]: Captive Portal:
[C][mdns:094]: mDNS:
[C][mdns:095]:   Hostname: display001
[C][ota:089]: Over-The-Air Updates:
[C][ota:090]:   Address: display001.local:8266
[C][ota:093]:   Using Password.
[W][ota:098]: Last Boot was an unhandled reset, will proceed to safe mode in 0 restarts

Connecting wirelessly it gives the following:

INFO Reading configuration /config/esphome/display001.yaml...
INFO Detected timezone 'America/Toronto'
INFO Starting log output from display001.local using esphome API
WARNING Can't connect to ESPHome API for display001.local: Error connecting to ('10.0.0.219', 6053): [Errno 111] Connect call failed ('10.0.0.219', 6053)
INFO Trying to reconnect to display001.local in the background

So far i have:

  • removed the device, re-added it.
  • re-flash the device with a different name
  • restarted router
  • restarted home assistant

Failure on starting WiFi is often a power issue. How are you powering this? When you say “updated”, did you change the code or do you mean you compiled under a new ESPhome version?

Thnx for the reply. I’m powering it with a wall adapter, 5v 2amp. I updated the code before, didnt work, after that reflashed it on a new fresh node.

Hmm ok. Only other thing I can suggest is to not use pins D3 and D4. Have a read of this:

it worked flawless before so im not sure if its just the update that changed somehow.
Thank you for thinking along though :slight_smile:

i tried some more stuff, when i put just the wifi credentials and delete all of the code it connects fine to the wifi. But when i put the code back in it refuses to connect.
so im not sure what is preventing it to connect in the code?

I also ran into a problem after updating to 2022.9.2 but probably with a different issue. My code that was working before the update:

esphome:
  name: meter01
  platform: ESP32
  board: esp32-poe
  includes:
    - ./esphome-dlms-meter

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0
  power_pin: GPIO12
  domain: .lan

# Enable logging
logger:
  level: INFO
#  tx_buffer_size: 2048 # Only needed when logging large packets

# Enable Home Assistant API if not using MQTT
api:
  password: "..."
  reboot_timeout: 0s

ota:
  password: "..."

#web_server:
#  port: 80

uart:
  tx_pin: GPIO4
  rx_pin: GPIO36
  baud_rate: 2400
  rx_buffer_size: 1024 # Needed to receive the large packets send by the smart meter
  id: mbus

sensor:
  - platform: template
    id: meter01_voltage_l1
    name: meter01_voltage_l1
    unit_of_measurement: V
    accuracy_decimals: 1
    device_class: "voltage"
    state_class: "measurement"
  - platform: template
    id: meter01_voltage_l2
    name: meter01_voltage_l2
    unit_of_measurement: V
    accuracy_decimals: 1
    device_class: "voltage"
    state_class: "measurement"
  - platform: template
    id: meter01_voltage_l3
    name: meter01_voltage_l3
    unit_of_measurement: V
    accuracy_decimals: 1
    device_class: "voltage"
    state_class: "measurement"

  - platform: template
    id: meter01_current_l1
    name: meter01_current_l1
    unit_of_measurement: A
    accuracy_decimals: 2
    device_class: "current"
    state_class: "measurement"
  - platform: template
    id: meter01_current_l2
    name: meter01_current_l2
    unit_of_measurement: A
    accuracy_decimals: 2
    device_class: "current"
    state_class: "measurement"
  - platform: template
    id: meter01_current_l3
    name: meter01_current_l3
    unit_of_measurement: A
    accuracy_decimals: 2
    device_class: "current"
    state_class: "measurement"

  - platform: template
    id: meter01_active_power_plus
    name: meter01_active_power_plus
    unit_of_measurement: W
    accuracy_decimals: 0
    device_class: "power"
    state_class: "measurement"
  - platform: template
    id: meter01_active_power_minus
    name: meter01_active_power_minus
    unit_of_measurement: W
    accuracy_decimals: 0
    device_class: "power"
    state_class: "measurement"
  - platform: template
    id: meter01_power_factor
    name: meter01_power_factor
    unit_of_measurement: " "
    accuracy_decimals: 3
    device_class: "power_factor"
    state_class: "measurement"

  - platform: template
    id: meter01_active_energy_plus
    name: meter01_active_energy_plus
    unit_of_measurement: Wh
    accuracy_decimals: 0
    device_class: "energy"
    state_class: "total_increasing"
  - platform: template
    id: meter01_active_energy_minus
    name: meter01_active_energy_minus
    unit_of_measurement: Wh
    accuracy_decimals: 0
    device_class: "energy"
    state_class: "total_increasing"

  - platform: template
    id: meter01_reactive_energy_plus
    name: meter01_reactive_energy_plus
    unit_of_measurement: Wh
    accuracy_decimals: 0
    device_class: "energy"
    state_class: "total_increasing"
  - platform: template
    id: meter01_reactive_energy_minus
    name: meter01_reactive_energy_minus
    unit_of_measurement: Wh
    accuracy_decimals: 0
    device_class: "energy"
    state_class: "total_increasing"

text_sensor:
  - platform: template
    id: meter01_timestamp
    name: meter01_timestamp
  - platform: template
    id: meter01_meternumber
    name: meter01_meternumber

mqtt:
   broker: ''
   id: mqtt_broker

custom_component:
  - lambda: |-
      auto dlms_meter = new esphome::espdm::DlmsMeter(id(mbus));
      byte key[] = {...};
      dlms_meter->set_key(key, 16); // Pass your decryption key and key length here
      dlms_meter->set_voltage_sensors(id(meter01_voltage_l1), id(meter01_voltage_l2), id(meter01_voltage_l3)); // Set sensors to use for voltage (optional)
      dlms_meter->set_current_sensors(id(meter01_current_l1), id(meter01_current_l2), id(meter01_current_l3)); // Set sensors to use for current (optional)
      dlms_meter->set_active_power_sensors(id(meter01_active_power_plus), id(meter01_active_power_minus), id(meter01_power_factor)); // Set sensors to use for active power (optional)
      dlms_meter->set_active_energy_sensors(id(meter01_active_energy_plus), id(meter01_active_energy_minus)); // Set sensors to use for active energy (optional)
      dlms_meter->set_reactive_energy_sensors(id(meter01_reactive_energy_plus), id(meter01_reactive_energy_minus)); // Set sensors to use for reactive energy (optional)
      dlms_meter->set_timestamp_sensor(id(meter01_timestamp)); // Set sensor to use for timestamp (optional)
      dlms_meter->set_meternumber_sensor(id(meter01_meternumber)); // Set sensor to use for meterNumber (optional)
      dlms_meter->enable_mqtt(id(mqtt_broker), "meter01/data"); // Enable grouped together MQTT report, useful to get exact time with each data for storing results in InfluxDB
      return {dlms_meter};

And that’s the error I now have:

[22:48:07][W][mqtt:141]: Couldn't resolve IP address for ''!
[22:48:07][W][mqtt:126]: Error resolving MQTT broker IP address: -16

its good to hear it’s not only me. i’m guessing something broke in this update

Just a quick update from my side: since it is not possible to install older versions or revert to them, I tried to restore backups from previous versions. So far 2022.9.1, 2022.9.0 and 2022.8.3 now also give me the same error - although they have been working without problems before. Maybe there are some depedencies that have changed or other things influence the communication/working of the node now. As I can’t change that, I will try to find a way to use a ‘correct’ configuration so my node is working again…

Did you got a solution for your issue? I’m having the same errors since last upgrade of ESPHome. I have a bunch of ESP32 working for months flawlessly, but now I’m unable to create a new device, it is always in a boot loop.

Had a similar issue recently, had to “clean up” a bit: