esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
422 stars 27 forks source link

OpenHASP as ESPHome module (LVGL) #1721

Closed nagyrobi closed 3 months ago

nagyrobi commented 2 years ago

Describe the problem you have/What new integration you would like There's OpenHASP: https://openhasp.haswitchplate.com making possible nice stuff like: cc-demoscreens

There's the new LCD menu PR implementing the concept of associating menu elements to ESPHome components (currently select, number and switch). This concept could be also easily extended over OpenHASP.

OpenHASP creates drawable objects based on LVGL library, these have various properties but the most important part is that these can also get/set values in similar ways. ESPHome's select, number, switch, etc. can be easily matched to OpenHASP's drawable objects:

ESPHome component OpenHASP object types
switch, binary sensor binary and toggle types
number, sensor range, some visual types
select selector types
text labels

OpenHASP also has a groupid property which can be set for each object, intended to link drawn objects' values with GPIO-related peripherals' values. So theoretically this is compatible with the concept above, ESPHome's components have to be put in OpenHASP's groups to link their values to each other.

OpenHASP uses JSON lines to configure each object functionality and appearance, this could be kept and passed on like a lambda. Also it has its own way to connect to display gpios, this could also be kept but moved in an ESPHome YAML config section.

Please describe your use case for this integration and alternatives you've tried: ESPHome and OpenHASP advantages could be combined into one:

No need to reinvent the wheel on any of the sides. Currently ESPHome lacks of such a great possibility to draw a graphical UI, and OpenHASP lacks a way to easily integrate external peripherals and run complex automations locally.

Should be easier to implement than Tasmota did.

Additional context OpenHASP's author @fvanroie made a few tests: https://github.com/fvanroie/esphome-lvgl https://www.youtube.com/watch?v=9A8NO0gWaAI

fvanroie commented 2 years ago

Take a look at the https://github.com/nielsnl68/SwitchPlate project which aims to integrate LVGL into ESPhome.

nielsnl68 commented 2 years ago

Although i am no longer aiming to intergrate LVGL but using the already build in native display components. This is still a good attempt to mimic what LVGL can do.

nagyrobi commented 8 months ago

Work in progress, LVGL will be natively supported by ESPHome: https://github.com/esphome/esphome/pull/6363

lvgl_main_screenshot

nagyrobi commented 3 months ago

Done: https://esphome.io/components/lvgl/