Waveshare e-ink

I purchased this 4.2in e-ink display and set it up in ESPHome with a D1 mini (esp8266). I’m not able to get anything to display, but am pretty sure I’m following the guidance from here.

Here’s the yaml:

esphome:
  name: d1-mini-e-ink
  friendly_name: d1-mini-e-ink

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "W2kGSZt7vLDPJcBb6GamE8pJy8Xdt0+oz3SsBZ0nwUg="

ota:
  password: "20060e059962686a5b698c7ef18ace58"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "D1-Mini-E-Ink Fallback Hotspot"
    password: "bqqV9UqtmDpq"

captive_portal:
    
  
# Example configuration entry
font:
  - file: 'fonts/Comic Sans MS.ttf'
    id: font1
    size: 8

spi:
  clk_pin: D0
  mosi_pin: D1

display:
  - platform: waveshare_epaper
    cs_pin: D2
    dc_pin: D3
    busy_pin: D4
    reset_pin: D5
    model: 4.20in-bV2
    reset_duration: 2ms
    update_interval: 30s
    rotation: 90
    lambda: |-
      it.print(0, 0, id(font1), "Hello World!");

I am getting this in the logs:


[E][waveshare_epaper:120]: Timeout while displaying image!
[W][component:214]: Component display took a long time for an operation (3.06 s).
[W][component:215]: Components should block for at most 20-30ms.

Can anyone help me troubleshoot this?

Hi - maybe try using the hardware SPI pins and avoid using D0.

Something like:

spi:
  clk_pin: D5
  mosi_pin: D7

display:
  - platform: waveshare_epaper
    cs_pin: D8
    dc_pin: D3
    busy_pin: D4
    reset_pin: D5

You may also sometimes get issues using D3 and D4 - read the link below, but it should be fine in this instance.

Thanks for suggestion but still getting the same output:


spi:
  clk_pin: D5
  mosi_pin: D7

display:
  - platform: waveshare_epaper
    cs_pin: D8
    dc_pin: D3
    busy_pin: D4
    reset_pin: D2
    model: 4.20in
    # reset_duration: 2ms
    update_interval: 30s
    lambda: |-
      it.print(0, 0, id(font1), "Hello World!");

try:

update_interval: 1min
reset_duration: 2ms
full_update_every: 1

I’m running up against this as well - did you ever sort it out?

No - it’s sitting in drawer collecting dust

well since this thread was pretty old I threw out a new one with some more info here: Waveshare e-ink 4.2 - constant 'component display took a long time..' part of me wonders if there isn’t a new revision of the 4.2 module that esphome isn’t tracking yet? I have no idea

does yours have a V2 sticker on the back? I’m suspicious that we have a newer version

Yeah mine has a sticker. It’s possible that we have a newer version but not sure how to verify that.

I found a fix and got the display working - details here: Waveshare e-ink 4.2 - constant 'component display took a long time..' - #6 by PlinyElderATX

It definitely is a new version of the display

Wow - alright well I’ll dust this off when I’m back home. Good job really digging into this!