I just got mine from Amazon today. Going to use what everyone has posted as a starting point, and once I have a decent integration going, I’ll post up the code here and on my github
Hey folks,
just got mine as well. Any updates here on how to get it running?
Just got my ESP32-S3-Touch-LCD-7 in today – I’m able to get the clock display using the config above, now checking for 7" specific settings.
You need to define touch screen under section lvgl
Touchscreens:
- touchscreen_id:
Is there a way to lower the backlight or turn of the screen on the 4.3" model when inactive? My unit gets hot running 24/7
Hello, do you know if it is possible to connect multiple sensors to the board? I would like to connect one relay and one DHT sensor.
You can connect as many sensors as you like on the I2C bus, and you could use an I2C relay board as well. There no other GPIO pins available though.
Has anyone managed to change the brightness level on this device?
I’m missing something – I can detect touches on the screen but I’m not clear how to wire the touch events to lvgl buttons so they can be pressed.
Add a touchscreen
key to the LVGL config. The display is auto-detected, but not touchscreen, it has to be specified explicitly.
Tips I learned for calling a service (such as turning on a light) from Home assistant using a button:
-
The “touchscreen” comments from Clyde and styphonthal above need to be included (see code snippet below) as this was not part of the clock code above.
-
The device has to be configured back in home assistant to allow it to make a service call (see note below from the esp lvgl cookbook - LVGL: Tips and Tricks — ESPHome).
-
For weird compile failures relating to c library code and not YAML, make sure to “clean build files”.
Note
Many of the examples below call services in Home Assistant; however, Home Assistant does not allow such service calls by default. For each ESPHome device which will call services, you must explicitly enable this setting in Home Assistant. This may be done when the device is initially adopted or by using the Configure option in the “devices” list of the ESPHome integration.
binary_sensor:
- platform: homeassistant
id: remote_light
entity_id: light.office_light
publish_initial_state: true
on_state:
then:
lvgl.widget.update:
id: light_btn
state:
checked: !lambda return x;
lvgl:
displays:
- display_id: my_display
buffer_size: 25%
touchscreens:
- touchscreen_id: my_touch
pages:
- id: light_page
widgets:
- btn:
id: light_btn
width: 200
height: 120
checkable: true
widgets:
- label:
align: center
text: 'Office light'
on_click:
- homeassistant.service:
service: light.toggle
data:
entity_id: light.office_light
Hi!
It is possible mixing tha LVGL, and Native display components? Can i use LVGL btn, and Native Graph Vomponent in same page? ( [Graph Component] (Display Component — ESPHome ) )
No, they don’t play nicely together. LVGL has a chart
widget, but it’s not currently implemented in ESPHome and won’t be until after the first release, as there is a feature freeze right now to allow review of the PR.
you answered my question - I did not have the “touchscreens” clause under the lvgl block.
I did see link errors when I added the binary sensor but cleaning took care of it
Thanks!!
Oh, Holy Cow!
I’ve been working with the waveshare 7" panel and ESPHome for days. Thanks to you, I’ve managed to get what I want, little by little. The goal is partly operation without Home Assistant, on-site modbus reading. I’ve made it this far today.
Per the wiki (linked to above), “You cannot dim the screen but only turn on/off the backlight”
Backlight on the waveshare is controlled using the ch422g port expander chip, which, I believe, is not yet supported by ESPHOME. Support for this chip was added to esp-arduino-libs on 2024-05-07 and a component request has been submitted for subsequent ESPHOME support (Support for WCH(Jiangsu Qin Heng) CH422G I/O Expander · Issue #2671 · esphome/feature-requests · GitHub).
Has anyone had any luck working with the CAN Bus interface? I have a Waveshare USB CAN dongle but I’m getting transmit errors when trying to send to the LCD device.
And how can i add image for background? I follow the guide, but compile failed.
[canned response]
Not enough information. If you provide:
- a complete, minimal and self-contained YAML demonstrating the problem;
- a copy of the output with the error messages;
- a description of your environment (i.e. Windows/MacOS/Linux, how ESPHome is installed etc.)
Then you will probably get a useful response quite quickly.
[/canned response]
And how can i add image for background? I follow the guide, but compile failed.
clean build files?
https://community.home-assistant.io/t/compile-work-with-images