Waveshare 3.49 and mipi_spi

wow, how did you get that so perfect, but no i don’t think there’s rounded corners, this is the best i could get with my phone camera

Well, let me know when you have any feedback on my suggestions.

updated external component and tried with 176 (tried both 0 and 90 rotation and it’s the same)

and with 168

it’s hard to get better images with phone but hope they can be used

Ok, so I think it is running into the issue that the AXS15231 doesn’t like drawing on boundaries other than 8 pixels. The 176 case will have 4 pixels cropped off, as per your image.

In any case what’s going to be needed to fix this is to make the driver able to use a slightly bigger buffer than the screen dimensions so it can use a width of 176 while only drawing into 172.

yes it’s same as in the beginning when using standard AXS15231 driver and 176, it does remove the garbage pixels but also crop the first 4 lines.

i will stand by for testing if you can work something out, making a new driver is way over my head…

Ok, update the PR and try again with this display config:

display:
  - platform: mipi_spi
    id: main_display
    model: WAVESHARE-ESP32-S3-TOUCH-LCD-3.49
    rotation: 90
    show_test_card: true

Don’t add anything else to the display config.

The runtime config dump should show the correct dimensions (172x640), and draw_rounding of 8, and the display should be nice.

If that works correctly, then test your lambda drawing.

wow you’re fast, updated pr and tried with your display config and it looks correct, very nice!, will try with my yaml as soon as i return from work :+1: but looks very promising <3

got sent home due to porter strike so back and testing and looks like you did it, all looks ok with simple yaml and with my own full yaml :+1: great work! and thanks for your patience :slight_smile:

if there is more i need to test let me know, and i assume i can use the PR for now?

Please also test using LVGL - just remove the lambda and add the lvgl: key at top level which will get you the LVGL hello world page.

You can keep using the PR, it will be merged into dev now and be included in an upcoming release. Thanks for the testing!

tested with:

external_components:
  - source: github://pr#11226
    components: [display, mipi, mipi_spi]
    refresh: 1h

spi:
  id: display_qspi
  type: quad
  clk_pin: 10
  data_pins: [11, 12, 13, 14]

display:
  - platform: mipi_spi
    id: main_display
    model: WAVESHARE-ESP32-S3-TOUCH-LCD-3.49
    rotation: 0
lvgl:

and it looks good:

BUT with rotation 90 we seem to get the 4 lines back on top and test image looks wrong, should i try to get a closer image of the lines at top?

Thanks, no need for a better image. I’ll look into it. Rotation is handled differently for lvgl.

let me know if you need me to test LVGL on this display again :+1:

Will do, probably won’t be until next week.

just say the word and i’m ready to test :grin::+1:

try it like this

display:
  - platform: mipi_spi
    id: my_display
    model: WAVESHARE-ESP32-S3-TOUCH-LCD-3.49
    rotation: 90
    #show_test_card: false
    #spi_mode: MODE0
    #update_interval: 1s
    #auto_clear_enabled: False
    data_rate: 20MHz

the display works, it’s the LVGL rotation that has a small problem, but thanks

sorry to disturb but did you forget this last issue or is it still on the todo list?

Just busy, sorry.

Try with this:

external_components:
  - source: github://pr#11680
    components: [lvgl, const]
    refresh: 1h

i get errors:

INFO Updating https://github.com/esphome/esphome.git@pull/11680/head
ERROR Unable to import component lvgl:
Traceback (most recent call last):
  File "/esphome/esphome/loader.py", line 199, in _lookup_module
    module = importlib.import_module(f"esphome.components.{domain}")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 999, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/data/external_components/41c641cf/esphome/components/lvgl/__init__.py", line 78, in <module>
    from .widgets.buttonmatrix import buttonmatrix_spec
  File "/data/external_components/41c641cf/esphome/components/lvgl/widgets/buttonmatrix.py", line 5, in <module>
    from esphome.const import CONF_ID, CONF_ITEMS, CONF_ROWS, CONF_TEXT, CONF_WIDTH
ImportError: cannot import name 'CONF_ROWS' from 'esphome.const' (/esphome/esphome/const.py)
Failed config

lvgl: [source /config/esphome/esphome-web-c0c120.yaml:102]
  
  Component not found: lvgl.