Hello,
I am trying a Waveshare 4.2in screen for an Air Quality Sensor project and the screen is always doing a fresh update never partial pixel refreshes.
I am using the ESPHome Waveshare component. I print an image and show temperature and humidity. The update time is set at 60seconds, and every time it hits the 60s mark it refreshes the full screen. It looks terrible (the screen goes black, then white and then renders) and slow. According to the documentation of the ESPcomponent there are two modes of update.
E-Paper displays have two modes of switching to the next image: A partial update that only changes the pixels that have changed and a full update mode that first clears the entire display and then re-draws the image.
How can I force the screen to do only partial refreshes? What am I doing wrong? I saw that for smaller screens there is the option to say every how many seconds the screen is fully refresh but I don´t manage to figure out how to avoid only full refresh
P.S. I know is not doing small partial refreshes because the temperature and humidity only changes on the 60sec mark.
My YAML:
esphome:
name: esp32_screen_test
platform: ESP32
board: nodemcu-32s
wifi:
ssid: "xxx"
password: "xxxxxx"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esp32 Screen Test"
password: "08zwahC7R9tu"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
spi:
clk_pin: GPIO14
mosi_pin: GPIO27
font:
- file: "Roboto-Bold.ttf"
id: my_font
size: 20
image:
- file: "waveshare/noa.jpg"
id: my_image
resize: 200x200
sensor:
- platform: dht
pin: GPIO21
model: dht11
temperature:
name: "Living Room Temperature"
id: temperature
humidity:
name: "Living Room Humidity"
id: humidity
update_interval: 10s
display:
- platform: waveshare_epaper
id: my_display
cs_pin: GPIO32
dc_pin: GPIO33
busy_pin: GPIO26
reset_pin: GPIO25
model: 4.20in
update_interval: 60s
#full_update_every: 30
lambda: |-
it.printf(10, 20, id(my_font), "Temperature: %.1f°C, Humidity: %.1f%%", id(temperature).state, id(humidity).state);
it.image(100, 50, id(my_image));