esphome / esphome/feature-requests
Display buffer emulator
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
When creating new esphome configuration files for projects with displays, there is quite a lot of iteration of the lambda function, i.e. tweaking sizes, locations, colors, to get things looking right. Each tweak requires a recompile and re-upload.
Suggestion: Create a python module that takes the live yaml file while it is being edited on the webpage, then creates a ram buffer emulating what the display screen will look like.
Display that buffer on the web page next to the yaml content.
Result: users can live edit the yaml seeing how it will look.
**Please describe your use case for this integration and alternatives you've tried:**
**Additional context**
I have implemented a c++ class that emulates the display buffer. Using this it is possible to compile the yaml lambda content into a separate c file, which can be compiled using gcc and creates a local image on the desktop (using the opencv2 library). I am not sure whether this would be the best approach (.yaml -> .c -> native_executable -> image) or whether it would be better to parse the c code and create a series of equivalent python functions that drew directly to a buffer image (.yaml -> python_parse -> image).
What do you all think?
Contributor guide
No contributing guide indexed for this repository
Research direction
No repository file, test, or entry point is named. Start by evaluating the proposed C++/gcc/OpenCV route against the alternative Python parser using the live YAML input and webpage context. Done would mean a live-edited configuration produces a display buffer beside the YAML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, opencv, python
- Domain
- embedded-iot, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100