Using TTGO epaper display with ESPHome

Did anyone succeed in the workaround for the 2.13 inch version which was posted there?

I have changed the code as mentioned in the waveshare_epaper.cpp but that didn’t change the problem for me.

EDIT: It does work for me now, I had to make the waveshare_epaper.cpp read only after changing it otherwise it would get overwritten.

@Mediacj I changed “~/.local/lib/python3.7/site-packages/esphome/components/waveshare_epaper/waveshare_epaper.cpp”, and that is overwritten only when I install a new version of esphome. To be prepared for this case, I put a text file into my home directory with this path and the modified “// COMMAND DISPLAY UPDATE CONTROL 2”.

1 Like

I have a T5 V2.3 2.13" display with B72 driver.
The PCB lists connections (busy 4, rst 16, mosi 23, clk 18, dc 17, cs 5). I’ve tried all combinations of board (esp32dev, ttgo-t1) and display model in ESPHome (2.13in, 2.13in-ttgo and 2.13in-ttgo-b73) but nothing seems to work.
The first upload messed up the original display image, but that’s all. Any hints?

Don’t know why, but got the display working by using ‘2.90inv2’ driver. It was already quite a desperate attempt, but delighted now. The display is T5 V2.3 2.13".

2 Likes

Maybe you should publish your code.

If your TTGO epaper display is not working, it can be hard to find the cause.

I made this yaml file that should work. It’s a functional clock. The only requirements are a configured WiFi and downloaded fonts. Then try one of the different display models until it works.

Follow the instructions in the file (lines starting with #).

When you see 00:00 as time, give it a minute to refresh with the correct time.

File epaperclock.yaml

esphome:
  name: epaperclock
  platform: ESP32
  board: esp32dev

wifi:
  ssid: "mywifiname" # Your WiFi SSID here
  password: "mywifipasswd" # Your WiFi password here

logger:

# Download Source Sans Pro from https://fonts.google.com/specimen/Source+Sans+Pro
# Create a fonts directory next to this file and put the fonts there.
font:
  - file: 'fonts/SourceSansPro-Bold.ttf'
    id: sourcesans_big
    size: 100
    glyphs: "0123456789:"

  - file: 'fonts/SourceSansPro-Regular.ttf'
    id: sourcesans_small
    size: 24

time:
  - platform: sntp
    id: sntp_time

spi:
  clk_pin: 18
  mosi_pin: 23

display:
  - platform: waveshare_epaper
    cs_pin: 5
    dc_pin: 17
    busy_pin: 4
    reset_pin: 16
    # Remove the # in front of one of the model lines below
    model: 2.90inv2
    #model: 2.13in-ttgo
    #model: 2.13in-ttgo-b73
    update_interval: 1min
    # If everything works, try to set full_update_every to 30 or 60
    full_update_every: 1
    rotation: 90
    lambda: |-
      it.strftime(122, -20, id(sourcesans_big), TextAlign::TOP_CENTER, "%H:%M", id(sntp_time).now());
      it.strftime(122, 98, id(sourcesans_small), TextAlign::TOP_CENTER, "%A %B %d", id(sntp_time).now());
3 Likes

wow thank you so very much, this worked. Have been banging my head on this one. Thanks again

Hi, I know it’s been a while on this thread, but I will give it a shot. I was having the same issue and came across this response. For me, it seemed like the display was not updating fully, and looked pixelated after a refresh. I have a 4.2in, and my code runs perfectly on it, and the display is clear. So not code or my hardware.
Looking at the code from @edwinm, I added the full_update_every: 1, and all works as expected.
If I increase it, the issue comes back.

So I am assuming it has something to do with the partial update?

Have you seen anyting like it before? Is it the display or the ESPHome driver?

Thanks
H-

1 Like

Hi there, not sure if this could be part of the conversation, maybe a wee bit off-topic but…

I just bought an esp32 epaper and waveshare e-ink screen and I would love home assistant to show pictures (I don´t know how to start thought) ideally speaking through Alexa running an automation but this is my question, is there a way to tell home assistant what pictures to show??? perhaps different folders?? Google pictures?? I don´t know… :frowning: the idea is to ask Alexa to show my wedding pictures, or pictures of my son, etc…

Anyway… as I said I´m completely lost so show pictures is my first goal and then we´ll move forward, any help is appreciated!!

I’m just getting into a project like this myself, thanks for the info on here so far, probably will need some of it when i get my boards. It’s gonna be a steep learning curve for sure!

One (big?) difference, i’ve ordered the “T-Display” variant wich has a color LCD-screen:

Do you think the code is about the same? Or will the LCD be much harder to get working?

The item you bought is not really the subject of this thread, but see ST7789V TFT LCD — ESPHome

1 Like

Apologies for being slightly off topic. I just received a TTGO T5 2.13 display. I cannot flash this device no matter what I try. Even a basic arduino sketch fails to upload. I either get messages related to ‘not in boot mode’ or ‘timed out’. I placed a 100uf capacitor across the RST button as suggested on a similar board, but this made no difference.
Any clues? Is the board faulty?

Have you tried grounding GPIO 0?

Genius! I had forgotten about that. Yes. that worked, thanks so much.

Hi, I purchased couple of those displays from aliexpress and code from this thread was very helpful - I got the display working just fine.
However on the model I have there are two push buttons (one is marked as RST which I am guessing is a reset and the other one is marked as IO39 on the back of the board) and one slide button (marked as On/Off on the board).

I managed to code one of the buttons (the one marked IO39):

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
      mode:
        input: true
        pullup: false
    name: "Button Input 0"
    id: button_input_0
    on_click:
      then:
        - homeassistant.service:
            service: automation.toggle
            data:
              entity_id: automation.test123

However I was wondering how do I go about changing the RST button and the on/off button - I don’t see a point/need to have them and it would be nice it they could be used for something useful instead.
Any pointers would be much appreciated

1 Like

RST is probably wired to the reset pin of the board.
So you need to scrape off the trace and rewire it to another available pin.
Probably not an easy task.

And the power is probably on the 5v or 3v3 power line, so not much use trying to use that as an input.

thank you both

Does anyone have a working deep sleep configuration that they could share for the 2.9" T5 version?

I found some resources online but they’re for different epaper displays:

pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
gpio_deep_sleep_hold_en();

Thanks!

Update:
I made a tiny bit of progress only to see some issues in deep sleep:

[21:37:34][E][waveshare_epaper:119]: Timeout while displaying image!
[21:37:34][D][esp32.preferences:114]: Saving preferences to flash...

Has anyone encountered this? The left half of my screen is white and the right half is black and display artifacts from when it was displaying are there.

Solved a bunch of problems (screen reloading issue, deep sleep, sleeping the flash, button to reload, etc.) and posted code up here: https://github.com/cvocvo/esphomeprojects/blob/f9139ac8fdfe571471e89de474ec4cf09361d432/epaper29.yaml

6 Likes