Closed nathanp512 closed 7 months ago
Sorry to say, i was not able to test my changes with a Pi Pico. Recently i have ordered one, to see what happens. I will look into it asap.
I would be happy if I can help.
Offtopic: In case someone has the Waveshare Pico-ResTouch-LCD-3.5 I got this 'ili9488' screen working with some modifications of ST7796 (but takes 15 sec for screen build and no api connection) with this piece of code:
ili9xxx_init.h:
static const uint8_t PROGMEM INITCMD_WS35PICO[] = {
// This Waveshare Pico-ResTouch-LCD-3.5 initilization routine was copied from ST7796
ILI9XXX_SWRESET, 0x80, // Soft reset, then delay 150 ms
ILI9XXX_MADCTL, 1, 0x48, //Memory Access [00]
ILI9XXX_PIXFMT, 1, 0x55, //565 --> is18bitdisplay = true; //Must be used in combination with ILI9XXX_PIXFMT, 1, 0x66 in init
ILI9XXX_IFMODE, 1, 0x80, //Interface [00]
ILI9XXX_DFUNCTR, 2, 0x02, 0x02, // Nomal scan
ILI9XXX_ETMOD, 1, 0xC6, //Entry Mode [06]
ILI9XXX_SLPOUT, 0x80, // Exit Sleep, then delay 150 ms ILI9XXX_DISPON, 0x80, // Main screen turn on, delay 150 ms
0x00 };
ili9xxx_display.cpp:
// 35_TFT display Waveshare Pico-ResTouch-LCD-3.5 void ILI9XXXWS35PICO::initialize() { this->initlcd(INITCMDWS35PICO); if (this->width == 0) { this->width = 320; } if (this->height == 0) { this->height_ = 480; } this->invertdisplay(true); // Inverts color }
top, do you mind when i add it to the ili9xxx component. Although, that said i like to use the driver name of the display. When you can give me that, then that will be prefert.
Sure you can use the code. According Waveshare docs it uses an Ilitek ili9488 driver. But I was not able to use it as an ili9488 with the 'GFX Library for Arduino' and the TFT_eSPI library needs some file replacements (Waveshare Pico-ResTouch-LCD-3.5 wiki ). The ST7796 model of the ili9xxx component worked best for my display (although colors were inverted and screen content was mirrored). So I think there are different implementations of the ili9488 driver.
When I swap the Pico W for an ESP32 (LILYGO TTGO T-Koala) the API works as expected and the display works fine and fast. Pico W with ssd1306_i2c display also works fine (including API).
I think it might be a hardware issue (Pico W only has 264 kB of SRAM) or component (ili9xxx/api) on rpipicow related.
@nielsnl68 I changed my init for the WaveShare Pico-ResTouch-LCD-3.5 a bit:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@nathanp512 could you make a PR for above changes?
Hi @nielsnl68 I am not sure what driver name to use. According to WaveShare docs it is an ILI9488 but the ST7796S code suits better. Anyway, neither the ili9488 or st7796 code works for this display without modifications. I studied some schematics on http://www.lcdwiki.com/ but my WaveShare Pico-ResTouch-LCD-3.5 differs from other displays (it seems to convert SPI to parallel with some 74HC4040 and 74HC4094 IC's).
What driver name do you suggest for this WaveShare Pico-ResTouch-LCD-3.5 display?
Tested again
This issue (HA cannot connect API) seems fixed. Tested successfully with ESPHome 2023.11.6.
The problem
Home Assistant cannot add esphome RP2040 device when ili9xxx display with 480*320 models ili9481, ili9488 and st7796 enabled.
Which version of ESPHome has the issue?
2023.3.2
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
2023.4.2
What platform are you using?
RP2040
Board
Raspberry Pi Pico W
Component causing the issue
display/ili9xxx
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
When API encryption enabled: HA asks for encryption key but with same result (no connection).
Port 6053 is open (checked with telnet).
It does not matter whether the display hardware is connected or not.
Not sure it is relevant: It takes about 15 seconds to build up the screen as can be seen in the logs.
What I also did (with same results; cannot connect api when display section enabled):
HA can connect to ESPHome device with 320*240 display models configured (ili9341, ili9342 and TFT 2.4 tested).
When I remove/disable the display section (last 9 lines) in YAML HA connects without any issues and it works as expected (except that I cannot display any data).