esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
294 stars 38 forks source link

E-Ink waveshare display refreshes but no text/image shows #3514

Open eliliam opened 2 years ago

eliliam commented 2 years ago

The problem

I have a black and white 2.9in waveshare epaper display that I would like to use within ESPHome, however I've ran into an issue. When I tried setting the model to either 2.9in or 2.9inv2, I receive serial errors saying [E][waveshare_epaper:119]: Timeout while displaying image! and the display does not do anything. Interestingly, when I try 2.9in-b the error goes away, and the screen refreshes but appears to never draw the text to the display. It goes from full white, to black, to white again, and after the update_interval has passed, the cycle repeats.

I have been able to use this display with GxEPD2, which helped me identify it as a GDEW029T5 display using a UC8151 as it's driver. I would love to use this in ESPHome but can't until this is fixed.

Which version of ESPHome has the issue?

v2022.8.0

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.8.6

What platform are you using?

ESP32

Board

lolin_d32

Component causing the issue

waveshare_epaper

Example YAML snippet

Device config:

esphome:
  name: esp32-epaper

esp32:
  board: lolin_d32
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "REDACTED"

ota:
  password: "REDACTED"

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Epaper Fallback Hotspot"
    password: "REDACTED"

font:
  - file: 'slkscr.ttf'
    id: font1
    size: 24

spi:
  clk_pin: 22
  mosi_pin: 23

display:
  - platform: waveshare_epaper
    cs_pin: 21
    dc_pin: 19
    busy_pin: 5
    reset_pin: 18
    model: 2.90in-b
    update_interval: 30s
    lambda: |-
      it.print(10, 10, id(font1), "Hello, will it work? Nope...");
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

AaronJackson commented 1 year ago

I also encountered this issue and have opened a pull request to fix it. https://github.com/esphome/esphome/pull/4222 For some reason the code was only writing black (0x00) instead of the actual data in buffer.