Closed carlosV2 closed 11 months ago
I've found the problem!
It seems like ESPHome isn't clever enough to know that I'm using a Raspberry Pi Pico (not the wireless version) so when it sees the network
component, it happily compiles it. At this time I don't know how this affects the board but my guess is that it sets all the peripherals up (so I could render the blue square during setup) and then it tries to connect to some network which, in my case, it was surely failing so it got stuck somehow. This also prevented the logging from working.
In summary, removing the network
component (which forces you to remove the ota
and api
components too) fixes the issue and the lambda is beautifully executed.
The reason why I had those components was because they came already set when I selected the pico board (not the W).
The interesting bit is that I created this device with a pre-2023.11.2
version. On the new version, the new devices are created with the wifi
component instead. This component is equally silly on a non-wifi device but, at least, it fails the firmware compilation so the issue is prevented before runtime (not ideal but way better than before).
The problem
I'm unable to get anything meaningful rendered in my st7789v 2inch waveshare display.
I've wired the pico and the screen as shown in this page. Sure enough, when I run the code in that page it works without a problem (discarding this is a wiring issue).
When I try with ESPHome, however, I get nothing rendered at all. I thought it could be a problem with a mismatching driver version so I started to code my own component based on the st7789v platform. I quickly realised the coding in ESPHome should be fine as it follows the screen's specification.
I then attempted to get anything rendered so during the screen setup, I added the following line:
This does indeed render a blue square in the screen (discarding this is a GPIO or SPI issue).
Since it has been ignoring anything inside the lambda, my last attempt has been to add the following line at the end of the
draw_absolute_pixel_internal
function:This makes the screen to render a Christmas tree of colours (like a colourful version of the old static signal in the old analog TVs).
From this, I can only conclude that either the internal buffer is not being filled correctly, the lambda is not working at all, or a combination of the both of them.
Which version of ESPHome has the issue?
2023.11.2
What type of installation are you using?
pip
Which version of Home Assistant has the issue?
n/a
What platform are you using?
RP2040
Board
Waveshare 2inch LCD Display Module IPS Screen 240×320 Resolution Onboard driver ST7789v
Component causing the issue
st7789v
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
I've also tried every solution proposed in the issues on this repository that seemed vaguely related plus the mandatory internet searches. Both unsuccessfully.
In addition to this, I also tried with the
st7735
component to keep discarding options (in this case, to use a different implementation even it was buggy). Of course it didn't work either.