esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 34 forks source link

Wavshare ePaper 2.9" Rev2.1 - Timeout while displaying image! on full refresh #4307

Open AlSa-Her opened 1 year ago

AlSa-Her commented 1 year ago

The problem

I have one of the newer 2.9 inch V2 e-ink devices (v2 sticker with rev2.1) and I'm trying to make it work with ESPHome. Partial update works fine (with slight haze, as to be expected), but full update of the display leaves it blinking 6 times over 5+ second. I have been searching github for similar problems but have found none with the exact same. The only similar issue I found is: https://github.com/esphome/issues/issues/1462 (however, my display basically works - just with an annoying full refresh)

A video of the problem with the example code below can be found here (I am not sure how to add photos or videos inline): https://youtu.be/9u1JvJrIwWs

Which version of ESPHome has the issue?

Version: 2023.2.4

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

currently not connected

What platform are you using?

ESP32

Board

az-delivery-devkit-v4

Component causing the issue

Waveshare 2.90inv2

Example YAML snippet

esphome:
  name: xbo-controller
  friendly_name: xbo-controller

esp32:
  board: az-delivery-devkit-v4
  framework:
    type: arduino

font:
  - file: 'fonts/GoogleSans-Bold.ttf'
    id: font_googlesans_bold_50
    size: 50

spi:
  clk_pin: 33
  mosi_pin: 32

display:
  - platform: waveshare_epaper
    dc_pin: 26
    cs_pin: 25
    #busy_pin: 14
    reset_pin: 27
    model: 2.90inV2
    reset_duration: 200ms
    update_interval: 2 sec
    full_update_every: 10
    pages:
      - id: boot
        lambda: |-
          it.line(0, 0, 50, 50);
          it.print(148, 64, id(font_googlesans_bold_50), TextAlign::CENTER, "Booting...");
      - id: running
        lambda: |-
          it.line(0, 0, 50, 50);
          it.print(148, 64, id(font_googlesans_bold_50), TextAlign::CENTER, "Running...");

Anything in the logs that might be useful for us?

13:25:15 | [E] | [waveshare_epaper:119] | Timeout while displaying image!

Additional information

Things tried (among others):

Setting update_interval and full_update_every very high and only refreshing with component_update postpones the problem but leaves shadows and is only a very annoying workaround.... I am not sure if I am just missing something stupid but would be very thankful for any help!

Kaibob2 commented 1 year ago

Edited for spelling reasons ;)

As far as I can see I have the same display and it works fine for me with the external components installed locally and, from ESPhome 2023.6.0 onwards, this additional fix: https://github.com/esphome/issues/issues/2334#issuecomment-1602484333

These are my display settings on an ESP32:

spi:
  clk_pin: 13
  mosi_pin: 14

display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    model: 2.90inv2
    reset_duration: 2ms
    full_update_every: 200
    update_interval: 30s
    rotation: 90

Maybe this helps :)

mischief commented 1 year ago

i unfortunately cannot get my epaper display to work under esphome. i believe the module OP refers to is the same one i have: https://www.waveshare.com/product/displays/e-paper/epaper-2/2.9inch-e-paper-module.htm which also apparently uses the UC8151D controller.

i have found that https://github.com/ZinggJM/GxEPD2 works fine with this display under platformio with a wemos d1 mini clone, but i can't make it work in esphome.

here is my code for each test case:

the wiring for both configurations is the same; the epaper module is directly connected to my d1 mini and uses 3.3v for module vcc.

additionally, i found setting the busy pin will produce a timeout under esphome as in #1462, but not under GxEPD2.

with GxEPD2 the display shows hello world, and with esphome does not.

Kaibob2 commented 1 year ago

@mischief You have to use a custom_component to make this module work. Please read this thread here: https://github.com/esphome/issues/issues/2334 for further information

The snippet below worked until ESPhome 2023.6.0, afterwards it's gets a little tricky with the custom_component, but it's described in the above mentioned issue:

external_components:
  - source:
      type: git
      url: https://github.com/velaar/esphome
      ref: dev
    components: [ waveshare_epaper, display]

spi:
  clk_pin: 13
  mosi_pin: 14

display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: 15
    dc_pin: 27
    busy_pin: 25
    reset_pin: 26
    model: 2.90inv2
    reset_duration: 2ms
    full_update_every: 200
    update_interval: 30s
    rotation: 90
Kaibob2 commented 12 months ago

As there are quite a few display related breaking changes in 2023.7.0, has anybody using the waveshare ePaper already updated to this version and can confirm that it's still working?

stephenjamieson commented 12 months ago

It does not compile no

Kaibob2 commented 12 months ago

That's what i expected 😮‍💨

velaar commented 11 months ago

It does not compile no

Sadly it doesn't. I'm not savvy enough to make the fix myself :( as it doesn't seem that all the breaking changes were documented. I will update the custom component if I find a fix and will report back

@Kaibob2 @stephenjamieson Edit: now it does. See #2334 for the working yaml. Link to comment

Leonhard67 commented 11 months ago

häng mich hier auch mal an, bekomme das 2.9 Display auch nicht zum laufen unter ESP-Home ..... epaperfehler

boyfromgermany commented 5 months ago

häng mich hier auch mal an, bekomme das 2.9 Display auch nicht zum laufen unter ESP-Home ..... epaperfehler

have you found a solution i also have the same with red