ESPHome LVGL vs openHASP

With all due respect, the topic is about “porting of a smart touchscreen switch from openHASP to ESPHome” (post #1), so @janick applied ESPHome on top of a previously flashed openHASP device. maybe multiple times.

I just want to know if somenone has done this over the air, since there is no information on how it was done on the post.

Firmwares can have different flash memory partitions, applying ESPHome to a openHASP device over OTA can render the device unusable (bricked) if these partitions do not align.

Also taking out the L8 off the wall and leaving part of the lights unusable while I apply ESPHome requires more planning and time.

Google did not help either.

I hope you understand this is not a low effort question - well kind of is because I would rather not take the device off the wall.

So, if someone has tried before, I would really appreciate a report on that experience, as I can wait a few days to hear from this community. If no one knows, I will be glad to do it.

If no one else answers, I would take the safe route of taking it off the wall.

Or buy another one with the intention to have one spare.
That way the downtime can be just the hardware switch.

1 Like

You cannot go from openHasp to ESPHome over the air.

Since upgrading from openHASP 6 to 7 could not be done over the air either, I took the opportunity to switch it to ESPHome. Once ESPHome was on-board, only OTA updates after that.

1 Like

You only need to take off the face plate by sliding it upward a few mm. No need to take off the entire thing…

I started from scratch trying both OpenHasp and ESPHome and found OpenHasp much easier to get my head round and get a working device quickly.

I have the Guition 4848S040 and have 2 pages of buttons (31) controlling lights, curtains and television.

I do have a question - After updating the HA yaml file to cope with more buttons, can I do a reload of just that file as opposed to reloading “All yaml configuration”?

To me, this feels kinda like a comparison of Tasmota vs. ESPHome. --but for much more complicated devices.

I’m thinking more along the lines - Openhasp is for prototyping and esphome is for production. The reason - not having to compile while designing/prototyping is certainly an advantage with Openhasp, but the reduced reliance on HA is the benefit of esphome.

1 Like

I use Squareline studio for design and then SDL for prototyping on a Linux computer.

I can get everything working 95% before even powering on my ESP32 based screen.

Plus the LVGL in esphome is so much more powerful. Works more like web CSS. No need to hard code the pixel location of an element it just “flows” into place.

It took me a few hours to copy and existing screen design to LVGL.

How do you get your Squareline Studio LVGL design onto ESPHome?

Did you use this translator?

This guy has developped an interesting set of templates that, if standardized, would go a long way to simplifying the task of binding HA devices to LVGL elements

Yes, I have step by step instruction in that git repo on how to do it. Including installing that libary

Yes that’s a nice one. I think mine is a bit more simple to use. Just one line of yaml to create a button and link it HA.

2 Likes

@andrew_NH nice work, thanks for that!
I will have a try as soon as I get the 7" waveshare touch panel.

Its just not the customization level I am looking for, especially for the widgets…colors, shapes, etc.

You do not have to resort to using Jinja to eliminate repetive or biolerplate YAML. The ESPHome ecosystem has its own concep of “packages” and “substitutions.” So once you get a “my_dimmer_slider” package to work you can use it for each light bulb with parameters for the device name.

That said, my YAML code is like yours very repetitive, but I’m currently in the middle of refactoring it for two reasons:

  1. to reuse the “my_dimmer_slider” for each bulb and,
  2. so that I can run this on different kinds of touch screen hardware by making a package for each kind of hardware board. One package for Lanbon, one for CYD, Waveshare and so on.

My goal is to put any room’s devices on any hardware and have a config file small enough to see all at once with no scrolling. I’d not yet 1/3rd of the way there yet.

But so far I’m only needing native ESPHome package/substitutions.

In case folks are interested & haven’t heard about it yet, a friend of mine has been experimenting with using ESPHome Designer (from HACS).

It’s looking pretty awesome – browser-based WYSIWYG designer for ESP32 panel displays. Originally mostly for e-ink panels, which is my buddy’s main use case. Sounds like LVGL support is getting there, as well as touch screens.

You can build things w/out doing any of the YAML yourself, using widgets & other things. Can work bi-directionally, importing YAML code into the designer, letting you modify the design, then output it back ready to use on a device.

I’ve got high hopes for this thing; pretty impressive.

1 Like