Waveshare eInk screen caches images?


I have a Waveshare 4.2" e-Paper Module. I want to use it to show the dynamic energy prices of today and tomorrow. Including when the price is the cheapest in the night (when available).

Since the graph is a bit limited in it’s options I decided to create a little python script to make the image I want to show and host that on my network.
This is the image:

Showing that image on the eInk screen works fine. But it never seems to refresh; even when I manually restart the device.

It looks quite good though:

And it also flashes a lot every time the device (restarts). Is that normal?

This is my esp32 code:

  name: epaper1
  friendly_name: epaper1
    priority: -10
      - delay: 10s
      - component.update: epaperdisplay

  board: esp01_1m



  password: !secret otaPassword

  ssid: !secret wifi_ssid
  password: !secret wifi_password
    ssid: "Epaper1 Fallback Hotspot"
    password: !secret fallbackHotSpot

  - file: https://office.********.nl/EnergyPrices.png
    id: energypricesimage

  clk_pin: 14
  mosi_pin: 13  #DIN
  - platform: waveshare_epaper
    id: epaperdisplay
    cs_pin: 15
    dc_pin: 12
    update_interval: 300s
    busy_pin: 16
    reset_pin: 4
    model: 4.20in-bV2
    lambda: |-

I don’t think the images are dynamic. In other words it includes the image at compile time.

That would explain a lot!
Hope that someone has a workaround.

Perhaps the last post here?

Or ESPhome: Component not found: online_image

1 Like

Yes! This seems to be the way to do it:

But that’s not working yet…

Well, the image is somewhat dynamic, but an e-ink is not like a normal LCD.
It updates the screen and then that image stays until another update is called.
When it updates the screen, then it needs to “clear” the old image, which is why it flickers.
An update can take a few seconds, so the refresh rate of an e-ink is generally not for quickly changing images.
There are a few e.ink screens that support partial updates, which can update an area faster without to much flicker, but once in a while it needs to “clear” properly too, so it is more of a patch.

1 Like