Waveshare epaper 4.2 not displaying

Before I return this as faulty, I thought I’d ask here for some help to see if I’ve missed anything obvious.

I’ve set up a test esp32 to try and figure the problem.

The logs show:

[10:48:31][C][spi:082]:   CLK Pin: GPIO17 (Mode: OUTPUT)
[10:48:31][C][spi:084]:   MOSI Pin: GPIO32 (Mode: OUTPUT)
[10:48:31][C][spi:085]:   Using HW SPI: YES
[10:48:32][C][logger:193]: Logger:
[10:48:32][C][logger:194]:   Level: DEBUG
[10:48:32][C][logger:195]:   Log Baud Rate: 115200
[10:48:32][C][logger:196]:   Hardware UART: UART0
[10:48:32][C][waveshare_epaper:788]: Waveshare E-Paper
[10:48:32][C][waveshare_epaper:788]:   Rotations: 0 °
[10:48:32][C][waveshare_epaper:788]:   Dimensions: 400px x 300px
[10:48:32][C][waveshare_epaper:789]:   Model: 4.2in
[10:48:32][C][waveshare_epaper:791]:   DC Pin: GPIO13 (Mode: OUTPUT)
[10:48:32][C][waveshare_epaper:793]:   Update Interval: 1.0s
[10:48:32][C][captive_portal:148]: Captive Portal:
[10:48:32][C][ota:029]: Over-The-Air Updates:

Which, to my mind suggests it’s all configured correctly.

My testing yaml is:

spi: #for e-paper display
  clk_pin: 17
  mosi_pin: 32


font:
  - file: "fonts/Arial.ttf"
    id: arial
    size: 12 
  

display:

  - platform: waveshare_epaper
    cs_pin: 14
    dc_pin: 13
    #busy_pin: 
    #reset_pin: 
    model: 4.20in
    #full_update_every: 30 
    id: epaper_display
    lambda: |-
      it.print(0, 0, id(arial), "Hello World!");

I have 3V3 across the GND and Vcc pins on the display.

I have checked with a 'scope and am getting signals on DIN, CLK, CS and DC pins.

What is the obvious thing I’m missing?

Just make sure you have the correct version.

  • 4.20in
  • 4.20in-bV2 (B/W rendering only)

I have a 2.9, though the device was not marked I had to change the version, from 2.90in to 2.90inv2

  • 2.90in
  • 2.90inv2
  • 2.90in-b (B/W rendering only)

Thanks for the reply.

I’ve just given that a try and same result.

Other than that, does it all look good to you?

I’ve ordered another display that’ll be here tomorrow. I’ll give that a try.

Coding looks fine.
I had problems with the screen refresh so I removed it.

New display has arrived.

Same issue.

Clearly, something is wrong with the setup.

Where do I start with the fault finding?

Connections all seem correct, as does the config.

I have data signals showing up on the 'scope for all pins.

I just know this is something trivial and probably obvious but I’m out of ideas now.

I have the same screen connected to nodemcuv2 board.
Works fine here.
Only difference in config is that I use and connect busy_pin and reset_pin

Would you mind sharing the whole config (at least the part that’s relevant to the display)?

I’ve set it up using an ESP8266 D1 mini and have the same issue - nothing displays on either display.

So, having eliminated the display and the ESP32/ESP82666 all I’m left with is the config or the compilation as the causes.

Here you go.
It’s a busy screen…

esphome:
  name: 42-e-paper
  platform: ESP8266
  board: nodemcuv2
time:
  - platform: homeassistant
    id: esptime
    on_time:
      - seconds: 0
        then:
          - if:
              condition:
                - binary_sensor.is_on: display_activation
              then:
                - component.update: epaper

sensor:
  - platform: homeassistant
    entity_id: sensor.netatmo_home_weather_station_outdoor_module_temperature
    internal: true
    id: outdoor_temperature
    unit_of_measurement: "°"
  - platform: homeassistant
    entity_id: sensor.philips_airpurifier_temperature
    internal: true
    id: bedroom_temperature
    unit_of_measurement: "°"
  - platform: homeassistant
    entity_id: sensor.netatmo_home_weather_station_outdoor_module_humidity
    internal: true
    id: outdoor_humidity
    unit_of_measurement: "%"
  - platform: homeassistant
    entity_id: sensor.philips_airpurifier_humidity
    internal: true
    id: bedroom_humidity
    unit_of_measurement: "%"
  - platform: homeassistant
    entity_id: sensor.philips_airpurifier_indoor_allergen_index
    internal: true
    id: bedroom_indoor_allergen_index
  - platform: homeassistant
    entity_id: sensor.philips_airpurifier_pm25
    internal: true
    id: bedroom_pm25
    unit_of_measurement: "µg/m³"
  - platform: homeassistant
    entity_id: sensor.bedroom_absolutehumidity
    id: bedroom_absolutehumidity
    internal: true
    unit_of_measurement: "g/m³"
  - platform: homeassistant
    entity_id: sensor.outdoor_absolutehumidity
    id: outdoor_absolutehumidity
    internal: true
    unit_of_measurement: "g/m³"
  - platform: wifi_signal
    name: "WiFi Signal 4.2 e-paper"
    id: wifi_signal_epaper_4_2
    update_interval: 600s
  - platform: mhz19
    co2:
      name: "MH-Z19 CO2 Value"
      id: co2_epaper_4_2
    temperature:
      name: "MH-Z19 Temperature"
      id: temperature_epaper_4_2
      device_class: "temperature"
    update_interval: 300s
    id: mhz19_epaper_4_2
    automatic_baseline_calibration: false

binary_sensor:
  - platform: homeassistant
    name: "e-paper display activation"
    entity_id: group.e_paper_display_activation
    id: display_activation
    internal: true

switch:
  - platform: template
    name: "MH-Z19 ABC"
    optimistic: true
    on_turn_on:
      mhz19.abc_enable: mhz19_epaper_4_2
    on_turn_off:
      mhz19.abc_disable: mhz19_epaper_4_2

uart:
  rx_pin: D7
  tx_pin: D8
  baud_rate: 9600

font:
  - file: 'fonts/Kanit-Medium.ttf'
    id: font_medium_20
    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/Kanit-Regular.ttf'
    id: font_regular_65
    size: 65
    glyphs: 
      ['!', ',', '.', '"', '%', '-', '_', ':', '°', '/',
       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' ']
  - file: 'fonts/Google_Sans_Medium.ttf'
    id: font_regular_30
    size: 30
    glyphs: 
      ['!', ',', '.', '"', '%', '-', '_', ':', '°', '/', 'm', 'p', 'g', '³', "\U000000B5",
       '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ' ']
  - file: 'fonts/materialdesignicons-webfont.ttf'
    id: icon_font_40
    size: 40
    glyphs: [
      "\U000F050F", # mdi-thermometer
      "\U000F058E", # mdi-water-percent
      "\U000F07E4", # mdi-molecule-co2
      "\U000F0D08", # mdi-flower-poppy
      "\U000F020F", # mdi-factory
      ] 

# Display 400px x 300px
spi:
  clk_pin: D5
  mosi_pin: D6

display:
  - platform: waveshare_epaper
    id: epaper
    cs_pin: D4
    dc_pin: D3
    busy_pin: D1
    reset_pin: D2
    model: 4.20in
    rotation: 90°
    update_interval: never
    lambda: |-
      it.print(5, 15, id(font_medium_20), TextAlign::BASELINE_LEFT, "Bedroom");
      it.line(94, 14, 293, 14);
      it.print(44, 80, id(icon_font_40), TextAlign::BASELINE_RIGHT, "\U000F050F"); 
      if (id(bedroom_temperature).has_state()) {
          it.printf(45, 82, id(font_regular_65), TextAlign::BASELINE_LEFT, "%2.0f°", id(bedroom_temperature).state);
      }
      it.print(157, 80, id(icon_font_40), TextAlign::BASELINE_LEFT, "\U000F058E"); 
      if (id(bedroom_humidity).has_state()) {
          it.printf(265, 82, id(font_regular_65), TextAlign::BASELINE_RIGHT, "%2.0f", id(bedroom_humidity).state);
          it.print(270, 82, id(font_regular_30), TextAlign::BASELINE_LEFT, "%");
      }
      if (id(bedroom_absolutehumidity).state > id(outdoor_absolutehumidity).state) {
          it.line(159, 82, 193, 82);
          it.line(159, 83, 193, 83);
          it.line(159, 84, 193, 84);
      } else {
          it.line(159, 321, 193, 321);
          it.line(159, 322, 193, 322);
          it.line(159, 323, 193, 323);
      }
      it.print(5, 150, id(icon_font_40), TextAlign::BASELINE_LEFT, "\U000F07E4"); 
      if (id(co2_epaper_4_2).has_state()) {
          it.printf(185, 152, id(font_regular_65), TextAlign::BASELINE_RIGHT, "%4.0f", id(co2_epaper_4_2).state);
          it.print(190, 150, id(font_regular_30), TextAlign::BASELINE_LEFT, "ppm");
      }
      it.print(5, 220, id(icon_font_40), TextAlign::BASELINE_LEFT, "\U000F020F"); 
      if (id(bedroom_pm25).has_state()) {
          it.printf(100, 220, id(font_regular_65), TextAlign::BASELINE_RIGHT, "%2.0f", id(bedroom_pm25).state);
          it.print(105, 220, id(font_regular_30), TextAlign::BASELINE_LEFT, "\U000000B5g/m³");
      }
      it.print(200, 220, id(icon_font_40), TextAlign::BASELINE_LEFT, "\U000F0D08"); 
      if (id(bedroom_indoor_allergen_index).has_state()) {
          it.printf(220, 220, id(font_regular_65), TextAlign::BASELINE_LEFT, "%2.0f", id(bedroom_indoor_allergen_index).state);
      }
      it.print(5, 250, id(font_medium_20), TextAlign::BASELINE_LEFT, "Outside");
      it.line(85, 249, 293, 249);
      it.print(44, 315, id(icon_font_40), TextAlign::BASELINE_RIGHT, "\U000F050F"); 
      if (id(outdoor_temperature).has_state()) {
          it.printf(45, 317, id(font_regular_65), TextAlign::BASELINE_LEFT, "%.1f°", id(outdoor_temperature).state);
      }
      it.print(157, 319, id(icon_font_40), TextAlign::BASELINE_LEFT, "\U000F058E"); 
      if (id(outdoor_humidity).has_state()) {
          it.printf(265, 317, id(font_regular_65), TextAlign::BASELINE_RIGHT, "%2.0f", id(outdoor_humidity).state);
          it.print(270, 317, id(font_regular_30), TextAlign::BASELINE_LEFT, "%");
      }
      it.line(5, 336, 295, 336);
      it.line(5, 337, 295, 337);
      it.strftime(7, 363, id(font_medium_20), TextAlign::BASELINE_LEFT, "%A", id(esptime).now());
      it.strftime(7, 393, id(font_medium_20), TextAlign::BASELINE_LEFT, "%d %b. %y", id(esptime).now());
      it.strftime(290, 393, id(font_regular_65), TextAlign::BASELINE_RIGHT, "%H:%M", id(esptime).now());
1 Like

Thank you.

Are you powering ESP8266 with 5V0 and using the 3V3 for the display from the ESP8266 or separately?

ESP8266 is powered with usb port (5v) and the display board is powered by 3V3 on the ESP8266 board

Hi, i have some issue with my board:

sphome:
name: displayweather1

esp8266:
board: nodemcuv2

when a try tto see the log, i have the following error?

if i would like to have basic info and see how it work, what will be the code to upload?

can you share just a basic code you have unstead of the full one?

i’m not able to have the screen display at the momen

i’m realy new to HA and ESPhome, lurning every day.

thanks for your help. we can go also in MP.

regards

Hi,

it is working now, my screen was 4.20in-bV2 not a 4.200in.

now it is showing. can you sahre your screen? would like to see what is look like.

regards

Hi,
i have the same problem with 4.2 inch waveshare epaper display. I’m using waveshare esp32 e-ink diver board and after many test my setup is driver boar and e-paper only. I think, we have problem with drivers/modules in esphome. When i change the model of display from 4.20.in to 2,90inbv2 (1,54in)i see on screen something, when model is set correctly the display is not working.
Half year a go this display was working well with esp8266 driver board and esphome.