Wireless Paper V1.1 for Esphome

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());

Following arduino sketch works for hello world.
But how to make it work for ESPHome? Im pasting working arduino -

#include "Arduino.h"
#include <Wire.h>
#include "HT_lCMEN2R13EFC1.h"

// Initialize the OLED display (modify pins if needed)
HT_ICMEN2R13EFC1 display(6, 5, 4, 7, 3, 2, -1, 6000000); 

void setup() {
  Serial.begin(115200);
  Serial.println("Starting Hello World...");

  VextON();         // Enable external power for OLED
  delay(100);       // Stabilize power
  SPI.begin();      // Initialize SPI bus
  display.init();   // Initialize OLED display
  display.clear();

  // Display "Hello, World!"
  display.drawString(50, 30, "Hello, World!");  
  display.update(BLACK_BUFFER);
  display.display();
}

void loop() {
  // Nothing to do here, display remains static
}

// Power Management Functions
void VextON() {
  pinMode(45, OUTPUT);
  digitalWrite(45, LOW);
}

void VextOFF() { // Default OFF
  pinMode(45, OUTPUT);
  digitalWrite(45, HIGH);
}

I don’t know ESPHome details, but I know that this line in your config:

model: 2.13in-ttgo-dke

Is definitely not the same display as used by

HT_ICMEN2R13EFC1 display(6, 5, 4, 7, 3, 2, -1, 6000000);

There’s a repo on GitHub that has more info on the e-ink displays used by Heltec here that may help you finding out more about this display.

Hello bns!

Thank you very much for providing some details.
I have been stuck and can’t figure out where to start or how to proceed.
Very little documentation is available for this display.

You seem to have deep knowledge about this display.
If you find anything related to ESPHome, please share. that would be a great help.

Deep knowledge is a strong claim, but I’ve spent a fair few hours trying to get it going indeed :slight_smile:

Looking at the ESPHome documentation, the following is listed regarding display support:
“Graphical displays with fully addressable pixels, like E-Paper, OLED or TFT displays.”
https://esphome.io/components/display/index.html#:~:text=Graphical%20displays%20with%20fully%20addressable%20pixels%2C%20like%20E-Paper%2C%20OLED%20or%20TFT%20displays.
Clicking the link for the E-Paper displays, that forwards to Waveshare displays. But this one isn’t a Waveshare display, so there is no support for it currently.
You could file an issue maybe at ESPHome asking for support, I have no single clue how to port drivers into that yourself (and I don’t think the Heltec displays would be easy to port).

Thank you, bns!
You are right.

I found a post on the Home Assistant forum where a user was able to use the Heltec Vision Master E290 e-Paper display. He used platform: waveshare_epaper . However, I’m not sure if the Heltec Vision Master E290 is actually a Waveshare display. Here’s the link to the post with his code:

I’m completely puzzled by the overall situation.
Hopefully, a genius like you has a better understanding of how it worked.
I saw your other posts in this forum, and you seem to have a deeper understanding of these boards.

Regards-

You could try all the 2.13inch entries listed on the page with Waveshare epapers, as apparently that user had success with one of the 2.90inch entries. As this Heltec display is a bit of a poser and for 70% behaves like a more common display, you may be able to get away with it.
Make sure to enable Vext as well, similarly to the observation on that Vision Master topic. Probably double check the datasheet or check on another forum post, but I think Vext must be low on the Wireless Paper. Can’t remember the Vext pin right now.

Just be sure to keep us updated on your attempts. I don’t have time to try this myself but happy to shoot your suggestions and think along if you supply the info.