feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

Add support for the new LilyGO T-Display-S3

Open hapklaar opened this issue 3 years ago • 6 comments

Describe the problem you have/What new integration you would like Please add support for the T-Display-S3 module, so it is recognized in ESPHome

Please describe your use case for this integration and alternatives you've tried: Using these devices for HA connected energy monitors

Additional context Module info: https://github.com/Xinyuan-LilyGO/T-Display-S3

hapklaar avatar Sep 30 '22 15:09 hapklaar

Was able to get this board working by connecting it to the Home Assistant host directly and flash using the following board config:

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: arduino
    version: 2.0.3
    platform_version: 5.0.0

Did not get the display working other than the backlight lit up. Probably because it needs a special version of the TFT_eSPI library. Is it possible to use this custom library in ESPHome somehow?

display:
  - platform: st7789v
    model: custom
    height: 172
    width: 320
    offset_height: 0
    offset_width: 0
    backlight_pin: GPIO38
    cs_pin: GPIO6
    dc_pin: GPIO7
    reset_pin: GPIO5
    rotation: 90°

hapklaar avatar Oct 02 '22 09:10 hapklaar

The patch is needed only for 8bit parallel mode, ESPHome supports only SPI mode, which should work without that patch. Anyway, have you powered that display? GPIO15 needs to be high.

randybb avatar Oct 02 '22 13:10 randybb

here's a branch with the tft_espi patched for tdisplay s3 for esphome https://github.com/landonr/lilygo-tdisplays3-esphome and here's a branch with lvgl with esphome running on tdisplay s3 https://github.com/landonr/tdisplays3-esphome-lvgl

landonr avatar Oct 02 '22 15:10 landonr

here's a branch with the tft_espi patched for tdisplay s3 for esphome https://github.com/landonr/lilygo-tdisplays3-esphome and here's a branch with lvgl with esphome running on tdisplay s3 https://github.com/landonr/tdisplays3-esphome-lvgl

That sounds good, will have a look later on. What would I need for the display section if I plan to run this code on it?

hapklaar avatar Oct 02 '22 17:10 hapklaar

@hapklaar i can't access that repository. but in the meantime i'll update the lvgl sample to include some labels from home assistant

landonr avatar Oct 02 '22 19:10 landonr

@hapklaar i can't access that repository. but in the meantime i'll update the lvgl sample to include some labels from home assistant

Oh sorry, for some reason I made it private. It's public now if you still want to have a look.

hapklaar avatar Oct 02 '22 22:10 hapklaar

Amazing work on that repo! Really looking forward to support for this board and display being added to esphome as it's such an amazing device!

eliliam avatar Oct 17 '22 18:10 eliliam

For those experimenting, OTA updating is working for me with the following:

esp32:
  board: esp32-s3-devkitc-1
  variant: esp32s3
  framework:
    type: arduino
    version: 2.0.5
    platform_version: 5.2.0

brooksbennett avatar Nov 06 '22 19:11 brooksbennett

Hoping to see more updates here, who would be the right person to tag to get that tft_espi patch out that @landonr mentioned?

eliliam avatar Nov 15 '22 19:11 eliliam

I think this is as far as it gets with the tft_espi stuff until we get full esphome support for this display

landonr avatar Nov 15 '22 22:11 landonr

Same here, except using a patched TFT_eSPI library there is no native way to enable that display on esphome

EynErgy avatar Feb 08 '23 12:02 EynErgy

Does this display works with Arduino_GFX? when so, then i have good news i'm working on an integration of this library into esphome. For this to work there need to be some changes to the natives DisplayBuffer component. The PR is already made and is now waiting for merging into the dev branch.

nielsnl68 avatar Feb 08 '23 14:02 nielsnl68

Never tried it. I will give it a go to see

EynErgy avatar Feb 08 '23 15:02 EynErgy

Does this display works with Arduino_GFX? when so, then i have good news i'm working on an integration of this library into esphome. For this to work there need to be some changes to the natives DisplayBuffer component. The PR is already made and is now waiting for merging into the dev branch.

It looks like it does! https://www.youtube.com/watch?v=kpRC64QNQAo

hapklaar avatar Feb 08 '23 16:02 hapklaar