esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

ESP8266 resets or does not receive sensor data from HA after updating from 1.18 #2176

Closed TheStork239 closed 3 years ago

TheStork239 commented 3 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.):

Hass.io

ESP (ESP32/ESP8266, Board/Sonoff):

ESP8266, Wemos D1 Mini

ESPHome version (latest production, beta, dev branch)

1.19.2 (issue started after upgrading from 1.18, worked fine there)

Affected component:

Waveshare e-ink display https://esphome.io/components/display/waveshare_epaper.html

Description of problem: The code for my waveshare 4.2in e-ink display worked perfectly in ESPHome 1.18, but after upgrading to 1.19.1 and 1.19.2 the same yaml configuration causes the ESP to either reset (sometimes repeatedly) or become unresponsive to Home Assistant. Quite often the ESP will fetch only one of the HA sensor values to be displayed, and become unresponsive after that, as is the case in the example log file below. (In 1.18 it fetches and displays values from several different sensors and updates them on the display every 600 seconds).

I have the previous bin file created in 1.18, and have tried compiling the same yaml configuration in 1.19.2 (and before then in 1.19.1). The bin file compiled with the 1.19.x versions have this issue, while the bin file created with 1.18 using the same yaml config file works fine without any resets or becoming unresponsive.

Problem-relevant YAML-configuration entries:

esphome:
  name: epaper-display
  platform: ESP8266
  board: esp01_1m
  on_boot:
    priority: -10
    then:
      - delay: 10s
      - component.update: epaperdisplay

wifi:
  ssid: "removed"
  password: "removed"

logger:

# Enable Home Assistant API
api:

ota:
  password: "removed"

font:

  - file: 'fonts/Roboto-Medium.ttf'
    id: roboto_med_30
    size: 30
  - file: 'fonts/Roboto-Regular.ttf'
    id: footer_font
    size: 15
    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/Roboto-Regular.ttf'
    id: main_sensor_unit
    size: 20
    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/Roboto-Medium.ttf'
    id: sub_sensor_font
    size: 30
    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/Roboto-Bold.ttf'
    id: main_sensor_font
    size: 54

  - file: 'fonts/materialdesignicons-webfont.ttf'
    id:  mdi_small
    size: 31
    glyphs: [
      # Wifi
      '󰤫', # mdi-wifi-strength-alert-outline
      '󰤟', # mdi-wifi-strength-1
      '󰤢', # mdi-wifi-strength-2
      '󰤥', # mdi-wifi-strength-3
      '󰤨', # mdi-wifi-strength-4
      '󰔏', # mdi-themometer
      '󰖎', # mdi-water-percent
      '󰖗', # mdi-weather-rainy
      '󰖝', # mdi-weather-windy
      '󰟤', # mdi-periodic-table-co2
      '󰻺' # mdi-home-flood
      ]

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

  - file: 'fonts/materialdesignicons-webfont.ttf'
    id:  mdi_wifi
    size: 20
    glyphs: [
      # Wifi
      '󰤫', # mdi-wifi-strength-alert-outline
      '󰤟', # mdi-wifi-strength-1
      '󰤢', # mdi-wifi-strength-2
      '󰤥', # mdi-wifi-strength-3
      '󰤨'  # mdi-wifi-strength-4

      ]

  - file: 'fonts/materialdesignicons-webfont.ttf'
    id:  mdi_med
    size: 33
    glyphs: [
      # Wifi
      '󰤫', # mdi-wifi-strength-alert-outline
      '󰤟', # mdi-wifi-strength-1
      '󰤢', # mdi-wifi-strength-2
      '󰤥', # mdi-wifi-strength-3
      '󰤨', # mdi-wifi-strength-4
      '󰀦' # mdi-alert
      ]
time:
  - platform: homeassistant
    id: homeassistant_time

sensor:
  - platform: homeassistant
    entity_id: sensor.awair_element_air_quality_humidity  #room humidity
    id: humid_indoor

  - platform: homeassistant
    entity_id: sensor.awair_element_air_quality_temperature  #room temp
    id: temp_indoor

  - platform: homeassistant
    entity_id: sensor.awair_element_air_quality_carbon_dioxide  #room CO2
    id: co2_indoor

  - platform: homeassistant
    entity_id: sensor.temperature_24
    id: temp_outdoor

  - platform: homeassistant
    entity_id: sensor.woking_probability_of_precipitation
    id: prob_rain

  - platform: homeassistant
    entity_id: sensor.woking_wind_gust
    id: wind_gust

  - platform: homeassistant
    entity_id: sensor.woking_south_water_level_stage
    id: river_level

  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    id: wifisignal
    update_interval: 60s

text_sensor:
  - platform: homeassistant
    entity_id: sensor.woking_wind_direction
    id: wind_dir

  - platform: homeassistant
    entity_id: weather.met_office_woking
    id: weather_status

spi:
  clk_pin: 14
  mosi_pin: 13  #DIN

display:
  - platform: waveshare_epaper
    id: epaperdisplay
    cs_pin: 15
    dc_pin: 12
    update_interval: 600s
    busy_pin: 16
    reset_pin: 4
    model: 4.20in
    lambda: |-

      int temp_out_thres = 3;
      int temp_in_thres = 18;

      float outdoor_temp = id(temp_outdoor).state;
      int gust_wind = int(id(wind_gust).state * 1609 / 3600);
      int rain_prob = int(id(prob_rain).state);
      float indoor_temp = id(temp_indoor).state;
      int indoor_humid = int(id(humid_indoor).state);
      int indoor_co2 = int(id(co2_indoor).state);
      float level_river = id(river_level).state;
      std::string dir_wind = id(wind_dir).state;

      /* OUTSIDE */
      it.print(10, 10, id(main_sensor_unit), "OUTSIDE");
      it.filled_rectangle(98, 21, 285, 3);
      it.print(375, 65,  id(mdi_small), TextAlign::BASELINE_CENTER, "󰖗"); //weather-rainy
      it.print(375, 105, id(mdi_small), TextAlign::BASELINE_CENTER, "󰖝"); //weather-windy
      it.print(375, 145, id(mdi_small), TextAlign::BASELINE_CENTER, "󰻺"); //home-flood

      if(rain_prob >= 0 && rain_prob <= 100){
        it.printf(357, 65, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , "%3d%%", rain_prob);
      }else{
        it.print(357, 65, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , " - %");
      }

      if(gust_wind >=0 && gust_wind <= 100){
        it.printf(357, 105, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , "%2dm/s %s", gust_wind, dir_wind.c_str());
      }else{
        it.print(357, 105, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , " -  m/s");
      }

      if(level_river >=0 && level_river <= 1000){
        it.printf(357, 145, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , "%2.2fm", level_river);
      }else{
        it.print(357, 145, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , " -  m");
      }

      if(outdoor_temp < 100 && outdoor_temp >=-60){    //Has valid value
          it.printf(170, 104, id(main_sensor_font), TextAlign::BASELINE_RIGHT , "%2.1f", outdoor_temp);
          it.print(175, 104, id(main_sensor_unit),TextAlign::BASELINE_LEFT, "ºc");

        if(outdoor_temp <= temp_out_thres){
          it.print(32, 67, id(mdi_med), TextAlign::BASELINE_CENTER, "󰀦"); //warning
        }
      }
      else{                             //Invalid or error value
        it.print(170, 104, id(main_sensor_font), TextAlign::BASELINE_RIGHT , "- ");
        it.print(175, 104, id(main_sensor_unit),TextAlign::BASELINE_LEFT, "ºc");
      }

      if(id(weather_status).has_state()) {
        std::map<std::string, std::string> weather_state {
          {"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"},
        };
        it.print(32, 104, id(mdi_weather_logos), TextAlign::BASELINE_CENTER, weather_state[id(weather_status).state.c_str()].c_str());
      }else{
        it.print(32, 104, id(mdi_weather_logos), TextAlign::BASELINE_CENTER, "\U000F002A"); // error - no weather state
      }

      if(rain_prob >= 25){
        it.print(32, 141, id(mdi_weather_logos), TextAlign::BASELINE_CENTER , "\U000F054A");
      }

      /* INSIDE */

      int offsetY = 137;
      it.print(10, 10 + offsetY, id(main_sensor_unit), "INSIDE");
      it.filled_rectangle(78, 21 + offsetY, 305, 3);
      it.print(375, 65 + offsetY,  id(mdi_small), TextAlign::BASELINE_CENTER, "󰖎"); //water-percent
      it.print(375, 105 + offsetY, id(mdi_small), TextAlign::BASELINE_CENTER, "󰟤"); //CO2

      if(indoor_humid >= 0 && indoor_humid <= 100){
        it.printf(357, 65 + offsetY, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , "%3d%%", indoor_humid);
      }else{
        it.print(357, 65 + offsetY, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , " - %");
      }

      if(indoor_co2 >=0 && indoor_co2 <= 10000){
        it.printf(357, 105 + offsetY, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , "%4dppm", indoor_co2);
      }else{
        it.print(357, 105 + offsetY, id(sub_sensor_font), TextAlign::BASELINE_RIGHT , " -  ppm");
      }

      if(indoor_temp < 255 && indoor_temp >=0){
          it.printf(170, 104 + offsetY, id(main_sensor_font), TextAlign::BASELINE_RIGHT , "%2.1f", indoor_temp);
          it.print(175, 104 + offsetY, id(main_sensor_unit),TextAlign::BASELINE_LEFT, "ºc");

        if(indoor_temp <= temp_in_thres){
          it.print(32, 67 + offsetY, id(mdi_med), TextAlign::BASELINE_CENTER, "󰀦"); //warning
        }

      }
      else{
        it.print(170, 104 + offsetY, id(main_sensor_font), TextAlign::BASELINE_RIGHT , "- ");
        it.print(175, 104 + offsetY, id(main_sensor_unit),TextAlign::BASELINE_LEFT, "ºc");
      }

      /* FOOTERT */
      it.strftime(355, 295 , id(footer_font), TextAlign::BASELINE_RIGHT , "Updated at %d/%b/%Y %H:%M", id(homeassistant_time).now());

      /* WiFi Signal Strenght */
      if(id(wifisignal).has_state()) {
        int x = 375;
        int y = 295;
        if (id(wifisignal).state >= -50) {
            //Excellent
            it.print(x, y, id(mdi_wifi), TextAlign::BASELINE_CENTER, "󰤨");
            ESP_LOGI("WiFi", "Exellent");
        } else if (id(wifisignal).state  >= -60) {
            //Good
            it.print(x, y, id(mdi_wifi), TextAlign::BASELINE_CENTER, "󰤥");
            ESP_LOGI("WiFi", "Good");
        } else if (id(wifisignal).state  >= -75) {
            //Fair
            it.print(x, y, id(mdi_wifi), TextAlign::BASELINE_CENTER, "󰤢");
            ESP_LOGI("WiFi", "Fair");
        } else if (id(wifisignal).state  >= -100) {
            //Weak
            it.print(x, y, id(mdi_wifi), TextAlign::BASELINE_CENTER, "󰤟");
            ESP_LOGI("WiFi", "Weak");
        } else {
            //Unlikely working signal
            it.print(x, y, id(mdi_wifi), TextAlign::BASELINE_CENTER, "󰤫");
            ESP_LOGI("WiFi", "Unlikely");
        }
      }

Logs (if applicable):

Using '/dev/cu.usbserial-1430' as serial port.
Showing logs:

[17:26:17]---- T HER OXCPIN ER--------
Serial port closed!
[17:26:17]---- T HER OXCPIN ER--------
[17:26:17]
[17:26:17]Exception (29):
[17:26:17]epc1=0x4022778c epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000
[17:26:17]
[17:26:17]>>>stack>>>
[17:26:17]
[17:26:17]ctx: cont
[17:26:17]sp: 3ffffaf0 end: 3fffffc0 offset: 0190
[17:26:17]3ffffc80:  3fffbfdc 4020f4f5 00000020 40100f6e  
[17:26:17]3ffffc90:  3ffffe18 3fffbefc 00000004 40227ef0  
[17:26:17]3ffffca0:  3fff56a8 3ffffe10 00000018 00000000  
[17:26:17]3ffffcb0:  3fffbfdc 3ffffe10 3ffffdb8 4020f522  
[17:26:17]3ffffcc0:  00000000 3fffbfdc 00000012 00000005  
[17:26:17]3ffffcd0:  3ffffe14 00000000 3ffffe10 40227fd6  
[17:26:17]3ffffce0:  3ffffe10 00000000 00000020 00000005  
[17:26:17]3ffffcf0:  3ffffe14 3ffffe10 3fff662c 4020fbc1  
[17:26:17]3ffffd00:  a0000000 40311999 40102ce2 00000100  
[17:26:17]3ffffd10:  3ffee500 7fffffff 00002200 00000001  
[17:26:17]3ffffd20:  3fffb050 3fffb068 3fffb1d8 3fffb1f8  
[17:26:17]3ffffd30:  3fffae28 3fffae50 3fffb508 3fffb520  
[17:26:17]3ffffd40:  3fffb538 3fffb550 3fffb568 3fffb580  
[17:26:17]3ffffd50:  3fffb598 3fffb5b8 3fffb5d0 3fffb5f0  
[17:26:17]3ffffd60:  3fffb900 3fffb920 3fffb938 3fffb950  
[17:26:17]3ffffd70:  3fffb968 3fffb990 3fffb9a8 3fffb9c8  
[17:26:17]3ffffd80:  3fffb9e0 3fffba08 3fffba20 3fffba40  
[17:26:17]3ffffd90:  3fffba58 3fffba78 3fffba90 3fffbab8  
[17:26:17]3ffffda0:  3fffbad0 3fffbae8 3fffbb00 3fffbb18  
[17:26:17]3ffffdb0:  3fffbb30 3fffbb48 3fffbb60 3fffbb80  
[17:26:17]3ffffdc0:  3fffbb98 3fffbbb8 3fffbbd0 3fffbbe8  
[17:26:17]3ffffdd0:  3fffbc00 3fffbc20 3fffbc38 3fffbc58  
[17:26:17]3ffffde0:  3fffbc70 3fffbc88 3fffbca0 3fffbcc0  
[17:26:17]3ffffdf0:  3fffbcd8 3fffbcf8 3fffbd10 3fffbd28  
[17:26:17]3ffffe00:  3fffbd40 3fffbd58 3fffbd70 3fffbd90  
[17:26:17]3ffffe10:  00006c68 00000000 3fffbe7c 3fffbd9c  
[17:26:17]3ffffe20:  3fffbfdc 00000013 3fff3854 00000001  
[17:26:17]3ffffe30:  3fffaf48 00000000 00000020 40100f37  
[17:26:17]3ffffe40:  41b00000 00000009 00000035 000002cf  
[17:26:17]3ffffe50:  00000000 3ffffe08 87ef9db2 4021bd44  
[17:26:17]3ffffe60:  000000ff 3fff661c 00003a98 00000000  
[17:26:17]3ffffe70:  3fffaadc 3fffaa7c 3fff661c 4020fff8  
[17:26:17]3ffffe80:  00000000 3fffa20f 00000000 401000e1  
[17:26:17]3ffffe90:  00000000 4bc6a7f0 ac083126 40205d6e  
[17:26:17]3ffffea0:  3fff662c 00000000 4bc6a7f0 00000000  
[17:26:17]3ffffeb0:  00000000 00000000 401007b4 40208243  
[17:26:17]3ffffec0:  00000000 4bc6a7f0 3fff65e4 4020e294  
[17:26:17]3ffffed0:  00519be6 3fff46b4 3fff65e4 4020e21b  
[17:26:17]3ffffee0:  00000000 4bc6a7f0 3fff36c8 4021bf89  
[17:26:17]3ffffef0:  3fffdad0 00000000 3fff36c8 4021c00f  
[17:26:17]3fffff00:  3fffdad0 00000000 3fff36c8 40100404  
[17:26:17]3fffff10:  40105745 0055fc61 401007b4 00004694  
[17:26:17]3fffff20:  00000000 3fff3aa8 00000009 3fff4e0c  
[17:26:17]3fffff30:  00004694 3fffaa8c 00000009 40219674  
[17:26:17]3fffff40:  40219ccd 00000009 3fff4e0c 3fff3a48  
[17:26:17]3fffff50:  3fffdad0 00000000 3fff36c8 4020b949  
[17:26:17]3fffff60:  007a1200 b7b25e1b 3fff5e00 3fff5d24  
[17:26:17]3fffff70:  00000000 feefeffe feefeffe feefeffe  
[17:26:17]3fffff80:  00000000 00000000 00000001 3fff3a48  
[17:26:17]3fffff90:  3fffdad0 00000000 3fff3a08 4020e488  
[17:26:17]3fffffa0:  3fffdad0 00000000 3fff3a08 4021978c  
[17:26:17]3fffffb0:  feefeffe feefeffe 3ffe8574 40100621  
[17:26:17]<<<stack<<<
[17:26:17]
[17:26:17]last failed alloc call: 4020F4F5(24)
[17:26:17]
[17:26:17]--------------- CUT HERE FOR EXCEPTION DECODER ---------------
[17:26:17]
[17:26:17] ets Jan  8 2013,rst cause:2, boot mode:(3,6)
[17:26:17]
[17:26:17]load 0x4010f000, len 3584, room 16 
[17:26:17]tail 0
[17:26:17]chksum 0xb0
[17:26:17]csum 0xb0
[17:26:17]v2843a5ac
[17:26:17]~ld
[17:26:17][I][logger:170]: Log initialized
[17:26:17][C][ota:366]: There have been 3 suspected unsuccessful boot attempts.
[17:26:17][I][app:029]: Running through setup()...
[17:26:17][C][spi:022]: Setting up SPI bus...
[17:26:18][C][wifi:037]: Setting up WiFi...
[17:26:18][D][wifi:365]: Starting scan...
[17:26:24][D][wifi:380]: Found networks:
[17:26:24][I][wifi:426]: - 'REDACTED' ('MAC-REDACTED') ▂▄▆█
[17:26:24][D][wifi:427]:     Channel: 5
[17:26:24][D][wifi:428]:     RSSI: -56 dB
[17:26:24][I][wifi:235]: WiFi Connecting to 'REDACTED'...
[17:26:25][I][wifi:498]: WiFi Connected!
[17:26:25][C][wifi:344]:   SSID: 'REDACTED'
[17:26:25][C][wifi:345]:   IP Address: XXX.XXX.XXX.XXX (redacted)
[17:26:25][C][wifi:347]:   BSSID: (redacted)
[17:26:25][C][wifi:348]:   Hostname: 'epaper-display'
[17:26:25][C][wifi:352]:   Signal strength: -58 dB ▂▄▆█
[17:26:25][C][wifi:356]:   Channel: 5
[17:26:25][C][wifi:357]:   Subnet: 255.255.255.0
[17:26:25][C][wifi:358]:   Gateway: XXX.XXX.XXX.XXX (redacted)
[17:26:25][C][wifi:359]:   DNS1: XXX.XXX.XXX.XXX (redacted)
[17:26:25][C][wifi:360]:   DNS2: (IP unset)
[17:26:25][C][ota:029]: Over-The-Air Updates:
[17:26:25][C][ota:030]:   Address: epaper-display.local:8266
[17:26:25][C][ota:032]:   Using Password.
[17:26:25][W][ota:036]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[17:26:25][C][api:022]: Setting up Home Assistant API server...
[17:26:25][I][app:059]: setup() finished successfully!
[17:26:25][D][sensor:117]: 'WiFi Signal Sensor': Sending state -58.00000 dBm with 0 decimals of accuracy
[17:26:25][I][app:105]: ESPHome version 1.19.2 compiled on Jun 22 2021, 17:23:29
[17:26:25][C][wifi:484]: WiFi:
[17:26:25][C][wifi:344]:   SSID: 'REDACTED'
[17:26:25][C][wifi:345]:   IP Address: XXX.XXX.XXX.XXX (redacted)
[17:26:25][C][wifi:347]:   BSSID: (redacted)
[17:26:25][C][wifi:348]:   Hostname: 'epaper-display'
[17:26:25][C][wifi:352]:   Signal strength: -59 dB ▂▄▆█
[17:26:25][C][wifi:356]:   Channel: 5
[17:26:25][C][wifi:357]:   Subnet: 255.255.255.0
[17:26:25][C][wifi:358]:   Gateway: XXX.XXX.XXX.XXX (redacted)
[17:26:25][C][wifi:359]:   DNS1: XXX.XXX.XXX.XXX (redacted)
[17:26:25][C][wifi:360]:   DNS2: (IP unset)
[17:26:25][C][spi:081]: SPI bus:
[17:26:25][C][spi:082]:   CLK Pin: GPIO14 (Mode: OUTPUT)
[17:26:25][C][spi:084]:   MOSI Pin: GPIO13 (Mode: OUTPUT)
[17:26:25][C][spi:085]:   Using HW SPI: YES
[17:26:25][C][logger:189]: Logger:
[17:26:25][C][logger:190]:   Level: DEBUG
[17:26:25][C][logger:191]:   Log Baud Rate: 115200
[17:26:25][C][logger:192]:   Hardware UART: UART0
[17:26:25][C][homeassistant.time:010]: Home Assistant Time:
[17:26:25][C][homeassistant.time:011]:   Timezone: 'GMT0BST-1,M3.4.0/1,M10.5.0/2'
[17:26:25][C][waveshare_epaper:760]: Waveshare E-Paper
[17:26:25][C][waveshare_epaper:760]:   Rotations: 0 °
[17:26:25][C][waveshare_epaper:760]:   Dimensions: 400px x 300px
[17:26:25][C][waveshare_epaper:761]:   Model: 4.2in
[17:26:25][C][waveshare_epaper:762]:   Reset Pin: GPIO4 (Mode: OUTPUT)
[17:26:25][C][waveshare_epaper:763]:   DC Pin: GPIO12 (Mode: OUTPUT)
[17:26:25][C][waveshare_epaper:764]:   Busy Pin: GPIO16 (Mode: INPUT)
[17:26:25][C][waveshare_epaper:765]:   Update Interval: 600.0s
[17:26:25][C][ota:029]: Over-The-Air Updates:
[17:26:25][C][ota:030]:   Address: epaper-display.local:8266
[17:26:25][C][ota:032]:   Using Password.
[17:26:25][W][ota:036]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[17:26:25][C][api:095]: API Server:
[17:26:25][C][api:096]:   Address: epaper-display.local:6053
[17:26:25][D][api.connection:644]: Client 'Home Assistant 2021.6.6 (XXX.XXX.XXX.XXX)' connected successfully!
[17:26:25][C][wifi_signal.sensor:009]: WiFi Signal 'WiFi Signal Sensor'
[17:26:25][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[17:26:25][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[17:26:25][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[17:26:25][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[17:26:25][D][time:040]: Synchronized time: Tue Jun 22 17:26:25 2021
[17:26:25][C][homeassistant.sensor:029]: Homeassistant Sensor 'humid_indoor'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.awair_element_air_quality_humidity'
[17:26:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'temp_indoor'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.awair_element_air_quality_temperature'
[17:26:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'co2_indoor'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.awair_element_air_quality_carbon_dioxide'
[17:26:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'temp_outdoor'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.temperature_24'
[17:26:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'prob_rain'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.woking_probability_of_precipitation'
[17:26:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'wind_gust'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.woking_wind_gust'
[17:26:26][C][homeassistant.sensor:029]: Homeassistant Sensor 'river_level'
[17:26:26][C][homeassistant.sensor:029]:   State Class: ''
[17:26:26][C][homeassistant.sensor:029]:   Unit of Measurement: ''
[17:26:26][C][homeassistant.sensor:029]:   Accuracy Decimals: 1
[17:26:26][C][homeassistant.sensor:030]:   Entity ID: 'sensor.woking_south_water_level_stage'
[17:26:26][C][homeassistant.text_sensor:022]: Homeassistant Text Sensor 'wind_dir'
[17:26:26][C][homeassistant.text_sensor:023]:   Entity ID: 'sensor.woking_wind_direction'
[17:26:26][C][homeassistant.text_sensor:022]: Homeassistant Text Sensor 'weather_status'
[17:26:26][C][homeassistant.text_sensor:023]:   Entity ID: 'weather.met_office_woking'
[17:26:26][D][homeassistant.sensor:023]: 'sensor.awair_element_air_quality_humidity': Got state 53.94
[17:26:26][D][sensor:117]: 'humid_indoor': Sending state 53.94000  with 1 decimals of accuracy
[17:26:35][I][WiFi:374]: Good

Additional information and things you've tried: The bin file created in 1.18 works fine, while the same yaml configuration compiled in 1.19.2 (and before then in 1.19.1) have this issue of resets and broken fetching of sensor data.

OttoWinter commented 3 years ago

last failed alloc call: 4020F4F5(24)

your device is running out of memory - this could be because your last config was just close to the limit, and changes in 1.19 just bumped it over the edge.

It may help to go into the fonts glyphs (for example in Roboto-bold) and manually enabled just the glyphs you really need (the default is the whole ASCII latin set, so quite a few characters).

TheStork239 commented 3 years ago

Thanks @OttoWinter, I think you are right. I reduced the number of fonts / glyphs and that got it working again. Interestingly it wasn't shown as high RAM usage at time of compiling, and the fact that it had worked with a previous ESPHome version really threw me, as I incorrectly assumed it was not my code causing it.