Wslv: LVGL+Lua+MQTT on OpenBSD

I’ve been tinkering with GitHub - dgwynne/wslv: LVGL x wscons on OpenBSD on and off for a few months now, and it’s now at a point where I think it’s usable. Rough, but usable. If you’re familiar with OpenHASP or the LVGL support in Tasmota, then this is like that but different. Instead LVGL running on an MCU, this is LVGL running on a computer with a touch screen.

wslv glues LVGL and MQTT together using GitHub - XuNeo/luavgl: lua + lvgl = luavgl An optimized lvgl Lua binding. I originally tried to use the Berry bindings to LVGL from Tasmota, but got overwhelmed with issues relating to mismatched versions between all the bits. luavgl was very easy to get working, and adding support for extra widgets (buttons, switches, and sliders in particular) was straightforward.

I’m now able to control some lights and fans and stuff using a Waveshare touch screen on my desk plugged into a Dell Wyse 3040 I got for cheap off Ebay. My intention is to wall mount the display once I figure out a few things with LVGL itself and improve the usability of the interface.

https://github.com/dgwynne/wslv/blob/main/example.lua is a rough example. It provides a small interface for controlling a light and its brightness over MQTT.

1 Like

I ended up writing my own lua bindings to lvgl. Half the reason was that I was triggering a use after free with luavgl, and the other half is that it gave me a better opportunity to learn more of LVGL by getting my hands dirty. I’m now basically at the same point I was before starting the rewrite, but without any crashes.

Instead of using the Dell Wyse 3040 to develop on I’ve been using an old Lenovo Yoga. Here’s a photo of my WIP dashboard for controlling some “smart” devices. The screen on the Yoga has more pixels than the display I want to put on the wall, that’s why there’s the black border.

1 Like

Half the reason was that I was triggering a use after free with luavgl,

Hi,

It’s a bit late, but could you open an issue for it? I’ll fix it as soon as i can reproduce it.