One of my pandemic hobbies that got stuck was home automation. I discovered Home Assistant – the popular open source, extremely customizable home automation platform – and all the complex things you can do with it to make your housework work better.
I have ADHD and have found the home assistant to be a valuable tool for managing executive dysfunction. I use it for audio calendar reminders, laundry reminders, timers, and monitoring my doorbell camera and my dog nanny cam. It’s also a great source of pure nerdy joy for me. And I recently took the most gleefully silly step in my home automation fixation.
Home Assistant allows you to create custom dashboards to interact with your smart home devices. Community members spend countless hours perfecting their dashboards, and some of them are truly impressive. I even discovered a community theme for Home Assistant that goes a long way towards making it look like the LCARS computer control system A new generation the Star Trek era I grew up on. LCARS is not a practical or useful computer interface. Its stated purpose is “to design something well-ordered when (it) the viewer sees against the background of the scene. What it is, however, is beautiful. The aesthetic took hold of me at the age of eight and has never left.”
Most of my home automation is done through actual automation without my intervention, and I use voice control heavily (yes, “Computer” is my wake-up call. False alarms when I look Star Trek worth it). But there are things I’ll always want a dashboard for. Sometimes you want to control things manually. It’s nice for displaying the weather or triggering custom light scenes. From the beginning of my infatuation with Home Assistant, I’ve longed to use an LCARS-style interface. The above theme is very good – I use it for the main dashboard of my phone. But it’s not perfect.
The size and proportions of the elbow pads are a bit off and the buttons are split into two pieces. It’s the little things. But I’m the type of fan who wants to push the accuracy thing as far as possible. So I made my own.
I recently discovered the Light and Versatile Graphics Library (LVGL), which allows you to create graphical interfaces that are much more customizable and sophisticated than the standard Home Assistant control panel setup. I figured there must be some way to get LVGL to talk to Home Assistant. The last piece of the puzzle was ESPHome. ESPHome is an open-source firmware framework that allows coding novices like me to use a relatively simple markup language to program Wifi-enabled microcontrollers such as the ESP32, ESP8266, and RP2040, and integrates deeply with Home Assistant. The possibilities are huge. I use ESPHome components as motion detectors, presence sensors, air quality sensor and drivers for LED strips. And ESPHome supports LVGL on specific display hardware.
So I bought this Waveshare 7” touchscreen with built-in ESP32-S3 microcontroller and got to work.
I spent hours scouring the internet to find screenshots and fan recreations of some of the many LCARS panels featured in 90’s Star Trek. And I narrowed it down to this:

It’s the graphic you see in Tuvok’s quarters Star Trek: Voyager. I’m not sure what it’s supposed to do in the show, but it has lots of colorful buttons and rounded corners. And most importantly, there are two gauges on the top for who knows what. But to me it felt like controlling the brightness of the lighting. So I had my design.
Next was to build it. To create an interface in ESPHome using LVGL, use YAML to specify the characteristics (size, position, color, etc.) of the required graphical element. LVGL calls them “widgets”. So first I created my design in Adobe Illustrator as a reference.

I then began the rather tedious task of recreating this design in the ESPHome editor in Home Assistant. Fortunately, you don’t need to know C (the LVGL language is written) to use it in ESPHome. Instead, you’re using YAML, which is much more forgiving for a keen amateur like me. Component by component, I specified the dimensions of each button, its location, its color, what label it would have, and its shape. The best practice in LVGL is to use built-in widgets instead of just embedding images. LVGL has this capability, but ESP32 microcontrollers don’t have a lot of spare resources, and images quickly eat them up. The only real images used in this design are the two gauges on the top right. All other shapes are LVGL button widgets.

I had to cheat a little because of the irregular shapes. Some buttons in the LCARS interface only have two rounded corners. LVGL buttons are all or nothing when it comes to rounded corners. Fortunately, though, LVGL doesn’t mind when you stack shapes on top of each other. For buttons that are half rounded, I simply stacked the circle on top of the square button. They are the same color so it looks like one shape. The elbows in the middle are made in a similar way.

I finally got there. An honest looking LCARS touch screen in my living room. 12 year old me would have been so amazed. 41 year old me sure does.
All I had to do was connect it to my devices. I was hanging out in my living room while doing this project, so I chose living room lamps. (Yes, I created this entire project before I had a clear idea of what exactly I was going to do with it. This is not a hobby for people who are completely pragmatic.)
I configured a certain button to turn white when the lights were on and return to its original color when the lights were off. Another button actually turned the lights on and off. The more buttons that do more things, the more authentic it feels to me. And this panel has more buttons than I have lights in my house. One of the meters reflects and controls the brightness of these lamps. There are status buttons that show me whether my home’s operating mode is “normal” or “cozy”, which determines the light scenes in my extensive WLED setup.

The touchscreen with the panel stays on the stand near my couch. It is far from practical. We already knew that about LCARS. However, it is beautiful. And my nerdy heart is overjoyed that I can now control my house the way my childhood heroes controlled their starships.