I bought a 7.5 e-ink screen from Waveshare here and got it to work via an Arduino and on a Wemos Lolin32 but seem completely unable to get it to work on ESPHome…
ESPHome version is v2022.2.6, the ID on the label connect of the screen is WFT0583CZ61
and hooked it up according to the config from the source provided by Waveshare itself. It does not match 1 to 1 with the image on the site I bought it from, connector seems different.
I’ve tried different ESP32 boards, bunch of different wiring, all 7.5 inch models… I have no clue what else I can do.
With an Arduino Uno I used
With the Wemos Lolin32 I used
https://www.waveshare.com/wiki/File:E-Paper_ESP32_Driver_Board_Code.7z
DEV_Config.h
lists;
#define EPD_SCK_PIN 13
#define EPD_MOSI_PIN 14
#define EPD_CS_PIN 15
#define EPD_RST_PIN 26
#define EPD_DC_PIN 27
#define EPD_BUSY_PIN 25
Using the same pins as on the working Arduino framework code;
substitutions:
device_name: lolin-test
# online example
# gpio_spi_clk_pin: GPIO25
# gpio_spi_mosi_pin: GPIO26
# gpio_cs_pin: GPIO32
# gpio_dc_pin: GPIO17
# gpio_reset_pin: GPIO27
# gpio_busy_pin: GPIO33
# my attempt
# gpio_spi_clk_pin: GPIO18
# gpio_spi_mosi_pin: GPIO23
# gpio_cs_pin: GPIO5
# gpio_dc_pin: GPIO22
# gpio_reset_pin: GPIO21
# gpio_busy_pin: GPIO4
# EPD_7IN5_V2 / DEV_Config.h
gpio_spi_clk_pin: GPIO13
gpio_spi_mosi_pin: GPIO14
gpio_cs_pin: GPIO15
gpio_dc_pin: GPIO27
gpio_reset_pin: GPIO26
gpio_busy_pin: GPIO25
esphome:
name: ${device_name}
name_add_mac_suffix: false
esp32:
board: lolin32
framework:
type: arduino
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lolin-test Fallback Hotspot"
password: "IFOpMALE9VYQ"
captive_portal:
# Enable logging
logger:
# baud_rate: 0
# Enable Home Assistant API
api:
password: "2HQ7Y9YseHMk2uydHBxxxxxxx"
ota:
password: "2HQ7Y9YseHMk2uydHBxxxxxxx"
font:
- file: 'fonts/OpenSans-Regular.ttf'
id: font_regular_8
size: 8
- file: 'fonts/OpenSans-Regular.ttf'
id: font_regular_65
size: 65
- file: 'fonts/OpenSans-Bold.ttf'
id: font_medium_20
size: 20
web_server:
port: 80
time:
- platform: homeassistant
timezone: Europe/Amsterdam
id: current_time
on_time_sync:
- component.update: uptime_timestamp
switch:
- platform: restart
name: "$device_name Restart"
sensor:
- platform: uptime
name: "$device_name Uptime Sec"
id: uptime_sec
internal: true
- platform: wifi_signal
name: "$device_name WiFi Signal"
update_interval: 120s
- platform: template
id: uptime_timestamp
name: "$device_name Uptime"
device_class: "timestamp"
accuracy_decimals: 0
update_interval: never
lambda: |-
static float timestamp = (
id(current_time).utcnow().timestamp - id(uptime_sec).state
);
return timestamp;
spi:
clk_pin: $gpio_spi_clk_pin
mosi_pin: $gpio_spi_mosi_pin
id: epaper_display
display:
- platform: waveshare_epaper
id: epaper
cs_pin: $gpio_cs_pin
busy_pin: $gpio_busy_pin
reset_pin: $gpio_reset_pin
dc_pin: $gpio_dc_pin
# model: 7.50in-bV2
model: 7.50in-bc
# model: 7.50inV2
# model: 7.50in
# full_update_every: 30
lambda: |-
ESP_LOGI("display", "Updating...");
// OUTSIDE
it.printf(7, 15, id(font_regular_8), TextAlign::BASELINE_LEFT, "Dehors");
it.line(78, 14, 293, 14);
int time = id(current_time).now().hour * 100 + id(current_time).now().minute;
// TIME
it.line(7, 337, 293, 337);
it.strftime(7, 363, id(font_medium_20), TextAlign::BASELINE_LEFT, "%A", id(current_time).now());
it.strftime(7, 393, id(font_medium_20), TextAlign::BASELINE_LEFT, "%d %b. %y", id(current_time).now());
it.strftime(290, 393, id(font_regular_65), TextAlign::BASELINE_RIGHT, "%H:%M", id(current_time).now());