Im tryting to make Heltec Wireless Paper working with ESPHome for home assistant. I’m using codes from this reddit thread
The following code compiles, it connects to Wifi and MQTT, however the eink paper does not update. Need some suggestions how to make the screen work.
Here is the code-
esphome:
name: display-2
friendly_name: 290test2
on_boot:
priority: 600.0 # Ensure this runs before other components initialize
then:
- switch.turn_on: power3v3
- delay: 500ms # Allow time for the power to stabilize
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
wifi:
ssid: "..."
password: "..."
mqtt:
broker: 192.168.0.111
client_id: eink
# Enable logging
logger:
level: DEBUG
spi:
mosi_pin: GPIO2 # Replace GPIOY with the pin connected to SDA
clk_pin: GPIO3 # Replace GPIOX with the pin connected to SCL
switch: # read somewhere that you need to switch the eink display on
- platform: gpio
pin: GPIO45
id: power3v3
name: "power"
font:
- file: "font/Roboto/Roboto-Regular.ttf"
id: myfont
size: 30
text_sensor:
- platform: mqtt_subscribe
name: "Text"
id: txt
topic: display-2/text
display:
- platform: waveshare_epaper
id: my_display
cs_pin: GPIO4
dc_pin: GPIO5
reset_pin: GPIO6
# busy_pin: GPIO7
reset_duration: 200ms
model: 2.13in-ttgo-dke
update_interval: 10s
rotation: 90
lambda: |-
it.print(it.get_width(), 0, id(myfont), TextAlign::TOP_RIGHT, id(txt).state.c_str());