View shared configuration
# Waveshare ESP32-S3-Touch-LCD-2.8B - standalone ESPHome hardware configuration (ESPHome 2026.11.0 or newer)
# 480 x 640 IPS (ST7701S over RGB), GT911 touch, TCA9554 IO expander, ESP32-S3 with 16 MB flash and 8 MB octal PSRAM.
# Tested on a physical board. Implementation for Tessera: github.com/MaxGramser/homeassistant_espscreen/pull/354
#
# The panel must not receive COLMOD (0x3A). ESPHome's mipi_rgb always sends it, and the panel then reads the RGB
# lines shifted (greys turn green or purple). mipi_rgb_ws28b is ESPHome 2026.11's mipi_rgb plus `send_colmod: false`.
esphome:
name: waveshare-28b
friendly_name: Waveshare 2.8B
min_version: 2026.11.0
esp32:
board: esp32-s3-devkitc-1
variant: esp32s3
cpu_frequency: 240MHz
flash_size: 16MB
framework:
type: esp-idf
version: recommended
advanced:
execute_from_psram: true
sdkconfig_options:
CONFIG_LCD_RGB_ISR_IRAM_SAFE: "y"
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
psram:
mode: octal
speed: 80MHz
external_components:
- source:
type: git
url: https://github.com/Andware/homeassistant_espscreen
ref: waveshare28b
path: components
components: [mipi_rgb_ws28b]
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
api:
ota:
- platform: esphome
logger:
tx_buffer_size: 2048
# The one USB-C port goes to the chip's own USB.
hardware_uart: USB_SERIAL_JTAG
# The GT911 (0x5D), the TCA9554 (0x20) and the board's other chips share one bus. GPIO47 and GPIO48, the 4B's I2C
# pins, are RGB data lines on this board.
i2c:
id: touch_bus
sda: GPIO15
scl: GPIO7
frequency: 400kHz
scan: true
# The IO expander: line 0 resets the panel, line 1 resets the touch panel, line 2 selects the panel for its setup.
# The TCA9554 speaks the PCA9554's registers.
pca9554:
- id: expander
address: 0x20
i2c_id: touch_bus
# The ST7701S takes its setup over three-wire SPI on chip pins (shared with the SD card, which stays unused); only its
# select line is on the expander. It runs once, at boot; the picture itself goes over the RGB pins below.
spi:
id: lcd
clk_pin: GPIO2
mosi_pin: GPIO1
output:
# The backlight is a plain PWM pin, high for light (Waveshare's example: 20 kHz).
- platform: ledc
pin: GPIO6
id: gpio_backlight_pwm
frequency: 20000Hz
touchscreen:
- platform: gt911
id: ts_touch
i2c_id: touch_bus
display: my_display
interrupt_pin: GPIO16
reset_pin:
pca9554: expander
number: 1
update_interval: 20ms
# Pins, timings and the init sequence are those of Waveshare's example for this board (Display_ST7701.cpp and .h);
# the data lines in its order, DATA0..15. That example sends no COLMOD, and neither does this board (send_colmod).
# pixel_mode is then never sent to the panel. The pixel clock is 16 MHz, below the example's 30 MHz, which is what
# an ESP32-S3 with Wi-Fi keeps up with steadily from PSRAM.
display:
- platform: mipi_rgb_ws28b
model: CUSTOM
id: my_display
spi_id: lcd
cs_pin:
pca9554: expander
number: 2
reset_pin:
pca9554: expander
number: 0
data_rate: 80MHz
spi_mode: MODE0
dimensions:
width: 480
height: 640
de_pin: GPIO40
pclk_pin: GPIO41
hsync_pin: GPIO38
vsync_pin: GPIO39
pclk_frequency: 16MHz
pclk_inverted: false
hsync_pulse_width: 10
hsync_back_porch: 70
hsync_front_porch: 60
vsync_pulse_width: 10
vsync_back_porch: 20
vsync_front_porch: 20
send_colmod: false
color_order: RGB
invert_colors: false
data_pins:
red:
- number: GPIO46
ignore_strapping_warning: true
- number: GPIO3
ignore_strapping_warning: true
- GPIO8
- GPIO18
- GPIO17
green: [GPIO14, GPIO13, GPIO12, GPIO11, GPIO10, GPIO9]
blue:
- GPIO5
- number: GPIO45
ignore_strapping_warning: true
- GPIO48
- GPIO47
- GPIO21
update_interval: never
auto_clear_enabled: false
init_sequence:
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x13]
- [0xEF, 0x08]
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10]
- [0xC0, 0x4F, 0x00]
- [0xC1, 0x10, 0x02]
- [0xC2, 0x07, 0x02]
- [0xCC, 0x10]
- [0xB0, 0x00, 0x10, 0x17, 0x0D, 0x11, 0x06, 0x05, 0x08, 0x07, 0x1F, 0x04, 0x11, 0x0E, 0x29, 0x30, 0x1F]
- [0xB1, 0x00, 0x0D, 0x14, 0x0E, 0x11, 0x06, 0x04, 0x08, 0x08, 0x20, 0x05, 0x13, 0x13, 0x26, 0x30, 0x1F]
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x11]
- [0xB0, 0x65]
- [0xB1, 0x71]
- [0xB2, 0x82]
- [0xB3, 0x80]
- [0xB5, 0x42]
- [0xB7, 0x85]
- [0xB8, 0x20]
- [0xC0, 0x09]
- [0xC1, 0x78]
- [0xC2, 0x78]
- [0xD0, 0x88]
- [0xEE, 0x42]
- [0xE0, 0x00, 0x00, 0x02]
- [0xE1, 0x04, 0xA0, 0x06, 0xA0, 0x05, 0xA0, 0x07, 0xA0, 0x00, 0x44, 0x44]
- [0xE2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
- [0xE3, 0x00, 0x00, 0x22, 0x22]
- [0xE4, 0x44, 0x44]
- [0xE5, 0x0C, 0x90, 0xA0, 0xA0, 0x0E, 0x92, 0xA0, 0xA0, 0x08, 0x8C, 0xA0, 0xA0, 0x0A, 0x8E, 0xA0, 0xA0]
- [0xE6, 0x00, 0x00, 0x22, 0x22]
- [0xE7, 0x44, 0x44]
- [0xE8, 0x0D, 0x91, 0xA0, 0xA0, 0x0F, 0x93, 0xA0, 0xA0, 0x09, 0x8D, 0xA0, 0xA0, 0x0B, 0x8F, 0xA0, 0xA0]
- [0xEB, 0x00, 0x00, 0xE4, 0xE4, 0x44, 0x00, 0x40]
- [0xED, 0xFF, 0xF5, 0x47, 0x6F, 0x0B, 0xA1, 0xAB, 0xFF, 0xFF, 0xBA, 0x1A, 0xB0, 0xF6, 0x74, 0x5F, 0xFF]
- [0xEF, 0x08, 0x08, 0x08, 0x40, 0x3F, 0x64]
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x00]
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x13]
- [0xE6, 0x16, 0x7C]
- [0xE8, 0x00, 0x0E]
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x00]
- [0x11]
- delay 200ms
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x13]
- [0xE8, 0x00, 0x0C]
- delay 150ms
- [0xE8, 0x00, 0x00]
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x00]
- [0x35, 0x00]
light:
- platform: monochromatic
output: gpio_backlight_pwm
name: Backlight
restore_mode: ALWAYS_ON
# A test page: the screen's corners, colour bars and a grey ramp.
lvgl:
displays: [my_display]
touchscreens: [ts_touch]
buffer_size: 25%
pages:
- id: test_page
bg_color: 0x000000
widgets:
- obj: {x: 0, y: 0, width: 160, height: 120, bg_color: 0xFF0000, border_width: 0}
- obj: {x: 160, y: 0, width: 160, height: 120, bg_color: 0x00FF00, border_width: 0}
- obj: {x: 320, y: 0, width: 160, height: 120, bg_color: 0x0000FF, border_width: 0}
- obj: {x: 0, y: 120, width: 120, height: 120, bg_color: 0x202020, border_width: 0}
- obj: {x: 120, y: 120, width: 120, height: 120, bg_color: 0x606060, border_width: 0}
- obj: {x: 240, y: 120, width: 120, height: 120, bg_color: 0xA0A0A0, border_width: 0}
- obj: {x: 360, y: 120, width: 120, height: 120, bg_color: 0xFFFFFF, border_width: 0}
- button:
align: CENTER
width: 260
height: 100
widgets:
- label: {align: CENTER, text: "Touch me"}
Discussion 0
Add a commentStart the conversation
Share an example, ask a question or explain how you would use this.