esphome / issues

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

Waveshare 7.5inV2 is it supported in the most recent release? #5059

Open congestion247 opened 1 year ago

congestion247 commented 1 year ago

The problem

I want to build an E-Paper Dashboard for Home-Assistant.

All of the Hardware is working and tested in other combinations. I am able to flash the code to the ESP32 but whatever code parameters I use, I could not get anything displayed on the waveshare display

Hardware:

Driver is set to Disbplay Mode B and Interface conifg 1

I tested: different board-definitons (nodemcu-32s, az-delivery-devkit-v4, esp32dev), different display model configurations (7.50in-bV2, 7.50inV2, 7.50inV2alt) multiple GPIO combinations

The board and the driver are working because I can display something on it when it is connected to an Arduino.

I found some blockposts with similar setups with this hardware. The only difference is mostly that I have an e-Paper Driver hardware version 2.3 . All of the others of an hardware version 2.2

The only physical difference in this version is a new PWR Pin. Based on the recommendations auf the vendor I connected it to 3.3V so this should not be a dealbreaker.

https://www.waveshare.com/wiki/E-Paper_Driver_HAT

I am very thankful for any help.

Which version of ESPHome has the issue?

2023.10.4

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

AZ-Delivery ESP32 Dev KitC V2

Component causing the issue

Waveshare 7.5 Inch E-Paper Display Hat Module V2

Example YAML snippet

esphome:
  name: display-7-5
  friendly_name: Display_7_5

esp32:
  board: esp32dev 
  framework:
    type: arduino

# Enable logging
logger:

font:
  - file: 'fonts/ConsolaMono-Bold.ttf'
    id: consolaMono_bold_15
    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','å', 'ä', 'ö', '/','º','µ','³']

spi:
  clk_pin: GPIO13
  mosi_pin: GPIO14

display:
  - platform: waveshare_epaper
    id: epaperdisplay
    cs_pin: GPIO15
    dc_pin: GPIO27
    reset_pin: GPIO26

    busy_pin: 
      number: GPIO25
      inverted: true

    model: 7.50inV2alt
    reset_duration: 2ms
    update_interval: 30s
    lambda: |-
      it.printf(155,295, id(consolaMono_bold_15), TextAlign::BASELINE_CENTER, "HomeAssistant");

Anything in the logs that might be useful for us?

C:\Users\congestion>esphome run waveshare.yaml

INFO ESPHome 2023.10.4
INFO Reading configuration waveshare.yaml...
WARNING GPIO15 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing display-7-5 (board: esp32dev; framework: arduino; platform: platformio/espressif32@5.4.0)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
 - tool-esptoolpy @ 1.40400.0 (4.4.0)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 32 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SPI @ 2.0.0
Building in release mode
Compiling .pioenvs\display-7-5\src\esphome\components\display\display.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\display\display_buffer.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\display\rect.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\esp32\core.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\esp32\gpio.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\esp32\preferences.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\font\font.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\logger\logger.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\spi\spi.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\spi\spi_arduino.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\spi\spi_esp_idf.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\components\waveshare_epaper\waveshare_epaper.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\application.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\color.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\component.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\component_iterator.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\controller.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\entity_base.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\helpers.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\log.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\scheduler.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\string_ref.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\time.cpp.o
Compiling .pioenvs\display-7-5\src\esphome\core\util.cpp.o
Compiling .pioenvs\display-7-5\src\main.cpp.o
Building .pioenvs\display-7-5\bootloader.bin
Generating partitions .pioenvs\display-7-5\partitions.bin
esptool.py v4.4
Creating esp32 image...
Merged 1 ELF section
Successfully created esp32 image.
Compiling .pioenvs\display-7-5\libeb4\SPI\SPI.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\Esp.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\HWCDC.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\IPAddress.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\IPv6Address.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\MD5Builder.cpp.o
Archiving .pioenvs\display-7-5\libeb4\libSPI.a
Compiling .pioenvs\display-7-5\FrameworkArduino\Print.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\Stream.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\StreamString.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\Tone.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\USB.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\USBCDC.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\USBMSC.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\WMath.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\WString.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\base64.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\cbuf.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-adc.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-bt.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-cpu.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-dac.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-gpio.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-i2c-slave.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-i2c.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-ledc.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-matrix.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-misc.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-psram.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-rgb-led.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-rmt.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-sigmadelta.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-spi.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-time.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-timer.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-tinyusb.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-touch.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\esp32-hal-uart.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\firmware_msc_fat.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\libb64\cdecode.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\libb64\cencode.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\main.cpp.o
Compiling .pioenvs\display-7-5\FrameworkArduino\stdlib_noniso.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\wiring_pulse.c.o
Compiling .pioenvs\display-7-5\FrameworkArduino\wiring_shift.c.o
Archiving .pioenvs\display-7-5\libFrameworkArduino.a
Linking .pioenvs\display-7-5\firmware.elf
Retrieving maximum program size .pioenvs\display-7-5\firmware.elf
Checking size .pioenvs\display-7-5\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   5.1% (used 16836 bytes from 327680 bytes)
Flash: [==        ]  16.1% (used 295917 bytes from 1835008 bytes)
Building .pioenvs\display-7-5\firmware.bin
esptool.py v4.4
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
esp32_create_combined_bin([".pioenvs\display-7-5\firmware.bin"], [".pioenvs\display-7-5\firmware.elf"])
esptool.py v4.6.2
Wrote 0x58570 bytes to file C:\Users\congestion\.esphome\build\display-7-5\.pioenvs\display-7-5/firmware-factory.bin, ready to flash to offset 0x0
======================================================================================================= [SUCCESS] Took 69.35 seconds =======================================================================================================
INFO Successfully compiled program.

esptool.py v4.6.2
Serial port COM8
Connecting.......
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
WARNING: Detected crystal freq 41.01MHz is quite different to normalized freq 40MHz. Unsupported crystal in use?
Crystal is 40MHz
MAC: b0:a7:32:f1:47:98
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x00058fff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 296304 bytes to 166279...
Wrote 296304 bytes (166279 compressed) at 0x00010000 in 4.0 seconds (effective 599.5 kbit/s)...
Hash of data verified.
Compressed 17440 bytes to 12128...
Wrote 17440 bytes (12128 compressed) at 0x00001000 in 0.4 seconds (effective 355.7 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.0 seconds (effective 767.9 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 1446.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from COM8 with baud rate 115200
[22:32:27][I][logger:326]: Log initialized
[22:32:27][I][app:029]: Running through setup()...
[22:32:27][D][spi:039]: Setting up SPI bus...
[22:32:27][D][spi_device:355]: mode 0, data_rate 2000kHz
[22:32:27][I][app:062]: setup() finished successfully!
[22:32:27][I][waveshare_epaper:1628]: Power on the display and hat
[22:32:29][W][component:214]: Component waveshare_epaper.display took a long time for an operation (1.35 s).
[22:32:29][W][component:215]: Components should block for at most 20-30ms.
[22:32:29][I][app:102]: ESPHome version 2023.10.4 compiled on Oct 31 2023, 22:31:40
[22:32:29][C][logger:416]: Logger:
[22:32:29][C][logger:417]:   Level: DEBUG
[22:32:29][C][logger:418]:   Log Baud Rate: 115200
[22:32:29][C][logger:420]:   Hardware UART: UART0
[22:32:29][C][spi:067]: SPI bus:
[22:32:29][C][spi:068]:   CLK Pin: GPIO13
[22:32:29][C][spi:069]:   SDI Pin:
[22:32:29][C][spi:070]:   SDO Pin: GPIO14
[22:32:29][C][spi:072]:   Using HW SPI: SPI
[22:32:29][C][waveshare_epaper:1794]: Waveshare E-Paper
[22:32:29][C][waveshare_epaper:1794]:   Rotations: 0 °
[22:32:29][C][waveshare_epaper:1794]:   Dimensions: 800px x 480px
[22:32:29][C][waveshare_epaper:1795]:   Model: 7.5inV2
[22:32:29][C][waveshare_epaper:1796]:   Reset Pin: GPIO26
[22:32:29][C][waveshare_epaper:1797]:   DC Pin: GPIO27
[22:32:29][C][waveshare_epaper:1798]:   Busy Pin: GPIO25
[22:32:29][C][waveshare_epaper:1799]:   Update Interval: 30.0s
[22:32:54][I][waveshare_epaper:1628]: Power on the display and hat
[22:32:56][W][component:214]: Component waveshare_epaper.display took a long time for an operation (1.49 s).
[22:32:56][W][component:215]: Components should block for at most 20-30ms.
[22:33:24][I][waveshare_epaper:1628]: Power on the display and hat
[22:33:26][W][component:214]: Component waveshare_epaper.display took a long time for an operation (1.35 s).
[22:33:26][W][component:215]: Components should block for at most 20-30ms.
[22:33:54][I][waveshare_epaper:1628]: Power on the display and hat
[22:33:56][W][component:214]: Component waveshare_epaper.display took a long time for an operation (1.34 s).
[22:33:56][W][component:215]: Components should block for at most 20-30ms.
[22:34:24][I][waveshare_epaper:1628]: Power on the display and hat
[22:34:26][W][component:214]: Component waveshare_epaper.display took a long time for an operation (1.35 s).
[22:34:26][W][component:215]: Components should block for at most 20-30ms.

....

Additional information

No response

fukajan commented 1 year ago

Same problem here when using this YAML configuration:

esphome:
  name: display-floor

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: Secret

ota:
  password: Secret

wifi:
  ssid: Secret
  password: Secret
  domain: Secret

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Screen Floor Fallback Hotspot"
    password: Secret

font:
  - file: 'fonts/PassionOne-Regular.ttf'
    id: font_small_book
    size: 18
    glyphs:
      ['H', 'E', 'L', 'O']

spi:
  clk_pin: GPIO12
  mosi_pin: GPIO14

display:
  - platform: waveshare_epaper
    id: eink_display
    cs_pin: GPIO15
    dc_pin: GPIO27
    busy_pin: GPIO25
    reset_pin: GPIO26
    model: 7.50inV2
    lambda: |-
      it.print(20, 20, id(font_small_book), "HELLO");

I am able to compile and upload both through Wifi and the serial connection. While the display does not show anything, the log output loops:

[14:01:50][I][waveshare_epaper:1628]: Power on the display and hat
[14:01:51][W][component:214]: Component waveshare_epaper.display took a long time for an operation (1.35 s).
[14:01:51][W][component:215]: Components should block for at most 20-30ms.
fukajan commented 1 year ago

This might to be a duplicate of or related to #4628. Not sure if my problem is unrelated because I use a the e-Papear ESP32 Driver Board instead of the e-Paper HAT Rev 2.2.

github-actions[bot] commented 8 months 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.

briodan commented 5 months ago

running into issue as well, seems mostly like its a contrast issue or something because the display is very faint. using the yaml from https://github.com/Madelena/esphome-weatherman-dashboard