5inch display ILI6122 & ILI5960 need help to add it to ESPHome

Maybe you can try with openhasp to track configuration for those displays.

I’m using sunton 8048S050 from aliexpress and openhasp work with it. Not without some bugs but works.

2 Likes

Can you share the file for 3D printing the box?

Sure: openHASP ESP32-S3 Sunton 8048S050 Display Desk Stand by Szaman - MakerWorld

Hi,
thanks for the voice of OpenHasp. I was able to compile a firmware for ESP32 display-7.0 Inch with the settings shared by DaveDuncanson. It works, finally I can use ESP with HA.

I still have to make a nice dashboard :wink:

Hi @WarC0zes,

recently I got the same display, and I was wondering if you could share your esphome configuration for these devices. I’ve tried it myself without any luck up to now, and I’ve seen you spent a lot of effort on this project. I would highly appreciate your help. TIA

Hi,
The screen doesn’t work with ESPHome, there is no RGB screen driver. You must use Arduino or PlatformIO which have screen and touch drivers.

I used openHASP, with a shared configuration for the 7 inch.I compiled a firmware with the configuration using the doc and gitpod to compile.

copy the elecrow-esp32-s3-tft.ini (the link below) to user_setups/esp32s3/

in the platformio_override.ini file modify it as such:

[platformio]
extra_configs =
    ; Uncomment or edit the lines to show more User Setups in the PIO sidebar
    user_setups/esp32s3/elecrow-esp32-s3-tft.ini

and

extra_default_envs =
    ; Comment unneeded environments or create extra
    ; arduitouch-esp32_ili9341
    ; d1-mini-esp32_ili9341
    ; d132-unoshield
    ; esp12e-st7735
    ; esp32dev-mrb3511
    ; esp32dev-ili9488
    elecrow-s3-8048C070_4MB

Save Ctrl + S and type platformio run in the command line area for compile.
After, download firmware in build_output\firmware.

Then flash the ESP with Flash Download Tools:

choise COM port
SPI SPEED 80MHz
SPI MODE QIO
select the firmware and type 0 in the box.

Switch the ESP to upload mode (Why need putting the ESP32 displays into "upload mode" with the BOOT and RESET button? — ELECROW - FORUM) and start flash.

Follow the instructions for the first start Wifi Setup - openHASP

WIP:

@WarC0zes - many thanks.

this is an awesome tutorial.

Hallo, here is elecrow-esp32-s3-tft-50.ini for 5" display.
I also didn’t notice the other controller and believed the display to be ESPhome compatible… But it’s not!

;***************************************************;
;    Elecrow ESP32-S3 TFT 5.0"                          ;
;          - Wizee-ESP32 WZ8048C050                 ;
;          - Custom esp32-s3 board                        ;
;          - ILI6122/ILI5960 display driver                 ;
;          - gt911 touch controller                             ;
;***************************************************;
;
; https://www.elecrow.com/esp32-display-5-inch-hmi-display-rgb-tft-lcd-touch-screen-support-lvgl.html
;

[elecrow-esp32-s3-tft-50]
extends = arduino_esp32s3_v2
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = qio_opi

build_flags =
    ${arduino_esp32s3_v2.build_flags}
    ${esp32s3.ps_ram}

;region -- ArduinoGFX build options ------------------------
    -D HASP_LV_USE_SW_ROTATE=0
    -D TFT_BCKL=2   ;#define GFX_BL 2
;endregion

lib_deps =
    ${arduino_esp32s3_v2.lib_deps}
    ;;;;;;;${arduinogfx.lib_deps}
    ${lovyangfx.lib_deps}
    Arduino_RPi_DPI_RGBPanel_mod
    ${goodix.lib_deps}

board_build.partitions = huge_app.csv

[elecrow-tft-common-pins]
build_flags =


 
; Bus Settings - LovyanGFX Library //     ; Bus Settings - Ardunio_GFX Library
  -D LGFX_USE_V1=1
  -D TFT_B0=8   ;8 /* B0 */,
  -D TFT_B1=3   ;3 /* B1 */, 
  -D TFT_B2=46  ;46 /* B2 */,
  -D TFT_B3=9   ;9 /* B3 */, 
  -D TFT_B4=1   ;1 /* B4 */,
  
  -D TFT_G0=5   ;5 /* G0 */,
  -D TFT_G1=6   ;6 /* G1 */,
  -D TFT_G2=7   ;7 /* G2 */,
  -D TFT_G3=15  ;15 /* G3 */,
  -D TFT_G4=16  ;16 /* G4 */,
  -D TFT_G5=4   ;4 /* G5 */,
  
  -D TFT_R0=45  ;45 /* R0 */,
  -D TFT_R1=48  ;48 /* R1 */,
  -D TFT_R2=47  ;47 /* R2 */,
  -D TFT_R3=21  ;21 /* R3 */,
  -D TFT_R4=14  ;14 /* R4 */,
  -D RGB_DRIVER=1   ;
  
  -D TFT_DE=40      ;40 /* DE */,
  -D TFT_VSYNC=41   ;41 /* VSYNC */,
  -D TFT_HSYNC=39   ;39 /* HSYNC */,
  -D TFT_PCLK=0     ;0 /* PCLK */,

[env:elecrow-s3-8048C050_4MB]
extends = elecrow-esp32-s3-tft-50, flash_4mb

build_flags =
    -D HASP_MODEL="Elecrow WZ8048C050"
    -D HASP_LOG_LEVEL=LOG_LEVEL_VERBOSE
    -D HASP_USE_CAPTIVE_PORTAL=0
  ;  -D HASP_USE_CUSTOM=1
  ;  -D MQTT_TOPIC_CUSTOM="SmartPICoop"


    ${elecrow-esp32-s3-tft-50.build_flags}
    ${elecrow-tft-common-pins.build_flags}

    ; Panel Settings ILI6122/LI5960
    -D TFT_WIDTH=800            ;800 /* width */,
    -D TFT_HEIGHT=480           ;480 /* height */, 

    -D TFT_HSYNC_POLARITY=0     ;0 /* hsync_polarity */,
    -D TFT_HSYNC_FRONT_PORCH=8  ;8 /* hsync_front_porch */, 
    -D TFT_HSYNC_PULSE_WIDTH=1  ;???Pio_4 /* hsync_pulse_width */ ???Ard_1 /* hsync_pulse_width */,
    -D TFT_HSYNC_BACK_PORCH=32  ;???Pio_43 /* hsync_back_porch */,???Ard_32 /* hsync_back_porch */,    
    -D TFT_VSYNC_POLARITY=0     ;0 /* vsync_polarity */,
    -D TFT_VSYNC_FRONT_PORCH=8  ;8 /* vsync_front_porch */,  
    -D TFT_VSYNC_PULSE_WIDTH=1  ;???Pio_4 /* vsync_pulse_width */ ???Ard_1 /* vsync_pulse_width */,   
    -D TFT_VSYNC_BACK_PORCH=8   ;Pio_12 /* vsync_back_porch */ ???Ard_ 8 /* vsync_back_porch */,   
    -D TFT_PCLK_ACTIVE_NEG=1    ;1 /* pclk_active_neg */,
    -D TFT_PREFER_SPEED=16000000  ;16000000 /* prefer_speed */
    -D TFT_AUTO_FLUSH=1         ;true /* auto_flush */
   
    ; Touch Settings GT911
    -D HASP_USE_LGFX_TOUCH=1
    -D TOUCH_WIDTH=800
    -D TOUCH_HEIGHT=480
    -D TOUCH_DRIVER=0x911
    -D TOUCH_SCL=20
    -D TOUCH_SDA=19
    -D TOUCH_IRQ=-1
    -D TOUCH_RST=-1
    -D I2C_TOUCH_ADDRESS=0x5D 
    -D I2C_TOUCH_FREQUENCY=400000

lib_deps =
    ${elecrow-esp32-s3-tft-50.lib_deps}

The procedure is the same as for a 7" display.
Copy the elecrow-esp32-s3-tft-50.ini to user_setups/esp32s3/
in the platformio_override.ini file modify it as such:

[platformio]
extra_configs =
    ; Uncomment or edit the lines to show more User Setups in the PIO sidebar
    user_setups/esp32s3/elecrow-esp32-s3-tft-50.ini

and

extra_default_envs =
    ; Comment unneeded environments or create extra
    ; arduitouch-esp32_ili9341
    ; d1-mini-esp32_ili9341
    ; d132-unoshield
    ; esp12e-st7735
    ; esp32dev-mrb3511
    ; esp32dev-ili9488
    ; elecrow-s3-8048C070_4MB
    elecrow-s3-8048C050_4MB
1 Like

@MakerNix I see the thread jumped to the 7" model which has a different screen. Did you ever get the 5" working in ESPHome?

Hi,
The 5 inch doesn’t have a supported driver under ESPHome. Elecrow has modified its product page and removed ESPHome support ESP32 display-5.0 Inch HMI Display 800x480 RGB TFT LCD Touch Screen Compatible with Arduino/LVGL

You can use it with Arduino or PlatformIO, which has the driver.

With OpenHASP, it works well and you can integrate it with Home Assistant.


Is there someplace that explains the various pieces you need to design the UI and connect it to HA? I’ve been going through the tutorial videos on the Elecrow site, and they’re talking about using Arduino and Squareline Studio. There’s also mention here of OpenHASP, but the information there doesn’t mention anything I’ve found yet about the UI design. Would I do that with Squareline Studio (which seems to generate Arduino code) and then somehow use OpenHASP to create linkage between the UI I create and the data in HA? Or is there a GUI designer in OpenHASP I haven’t found yet?

It would be enough :slightly_smiling_face:

https://haspdesigner.qrisonline.nl/

2 Likes

Hi! I purchased the same 5 inch display from elecrow and tried to create a configuration for openHasp firmware based on your instructions and the instructions above for 7 inches.
I ran into a problem:
When specified inside platformio_override.ini
extra_default_envs = elecrow-s3-8048C070_4MB
platformio throws an error:
[{
“resource”: “/c:/…/…/…/openHASP/platformio.ini”,
“owner”: “PlatformIO”,
“severity”: 8,
“message”: “Unknown environment names ‘elecrow-s3-8048C070_4MB’. Valid names are ‘ttgo_esp32_poe-ili9341, az-touch-mod-esp32_ili9341_8MB, esp32dev-mrb3511, d1-r32-unoshield_ili9486_adc, esp32-one_st7796 , elecrow-s3- 8048C050_4MB, d1-r32-unoshield_ili9341_adc, az-touch-mod-esp32_ili9341_4MB, my_custom_build, d1-mini-esp32_ili9341, lolin-d32-pro_ili9341’”,
“startLineNumber”: 1,
“startColumn”: 1,
“endLineNumber”: 1,
“endColumn”: 1
}].
could you tell me how to solve this problem?
I’m new to this and may have missed something.

I seem to have successfully compiled the firmware file.
I used env: elecrow-s3-8048C050_4MB instead of elecrow-s3-8048C070_4MB. This is because Platformio (as I understood) does not recognize elecrow-s3-8048C070_4MB. However, the screen still does not start.

As I mentioned earlier, I am using the following setup: Elecrow ESP32-S3 TFT 5.0. Could someone share their .bin firmware file or the entire project for analysis? I would be very grateful for your help.

using the procedure explained by xFallon i got an image on my 5 inch display, but its not really working, the screen is not stable and the widgets on the screen keep flickering and changing position so nothing is really readable. any idea what is going wrong? thanks!!

Hi Radon240 Maxim and cotthemh Herwig
my display works fine.


The problem may be in the parameter settings in elecrow-esp32-s3-tft-50.ini
In the original libraries “LovyanGFX Library” and “Ardunio_GFX Library” Bus Settings, when I searched for the background of connecting the display and the touchpad, there are different values.
I would try to compile openHASP with this other values.
As:

...
    ; Panel Settings ILI6122/LI5960
    -D TFT_WIDTH=800            ;800 /* width */,
    -D TFT_HEIGHT=480           ;480 /* height */, 

    -D TFT_HSYNC_POLARITY=0     ;0 /* hsync_polarity */,
    -D TFT_HSYNC_FRONT_PORCH=8  ;8 /* hsync_front_porch */, 
    -D TFT_HSYNC_PULSE_WIDTH=1  ;???Pio_4 /* hsync_pulse_width */ ???Ard_1 /* hsync_pulse_width */,
    -D TFT_HSYNC_BACK_PORCH=32  ;???Pio_43 /* hsync_back_porch */,???Ard_32 /* hsync_back_porch */,    
    -D TFT_VSYNC_POLARITY=0     ;0 /* vsync_polarity */,
    -D TFT_VSYNC_FRONT_PORCH=8  ;8 /* vsync_front_porch */,  
    -D TFT_VSYNC_PULSE_WIDTH=1  ;???Pio_4 /* vsync_pulse_width */ ???Ard_1 /* vsync_pulse_width */,   
    -D TFT_VSYNC_BACK_PORCH=8   ;Pio_12 /* vsync_back_porch */ ???Ard_ 8 /* vsync_back_porch */,   
    -D TFT_PCLK_ACTIVE_NEG=1    ;1 /* pclk_active_neg */,
    -D TFT_PREFER_SPEED=16000000  ;16000000 /* prefer_speed */
    -D TFT_AUTO_FLUSH=1         ;true /* auto_flush */
...

???Pio_x value is from PlatformIO Elecrow demo projects.
???Ard_x value is from Arduino Elecrow demo projects.
I did not deal with the values in more detail, because my display worked well the first time.

Here is a link to a modified download of the zipped openHASP project

modified openHASP v0.7.0 project

elecrow-s3-8048c050-ota-v0-7-0-rc8-6cf4262.bin file

Try my bin. openHASP version is v0.7.0
elecrow-s3-8048c050-ota-v0-7-0-rc8-6cf4262.bin

Hello everyone,
I saw that ESPHome has just added the driver:

Has anyone tried with an Elecrow ESP?

Hi,
Elecrow 7inch ( not 5inch ) added to openHASP.
For those who want to try, it’s the Crowpanel 7" model on the openHASP Nightly page.

https://nightly.openhasp.com/

I’ve update by OTA, from 0.7.0-rc8 to 0.7.0-rc12 version. It’s good.
If you have any issues, report them on this issue CrowPanel 7 Inch support. · Issue #684 · HASwitchPlate/openHASP · GitHub

Hi,
for those who have the 5 inch model, it has been added and will be available in the next release. :wink:
Thank to marsman7.