A DIY touchscreen scene controller that fits in a standard switch box
I had been looking for a clean way to control Home Assistant that would fit into a standard single-gang work box / switch panel. Lacking good options on the market I decided to design and build one myself.
The HASwitchPlate 1.0 (“HASPone”) can display a series of pages, each with a custom set of buttons. There are several default button layouts available out of the box, and each button can be configured from Home Assistant via MQTT for custom text, font size, colors, and actions. Button presses are published back to MQTT for Home Assistant to pick up and react to via blueprints and automations.
The project includes a 3D-printable enclosure (front/back) to fit a 2.4" Nextion LCD touchscreen. Arduino code for an ESP8266 has been developed to interface with the display and communicate with Home Assistant via MQTT. A PCB design is available to safely power the device with AC power.
The Nextion display used in this project has it’s own command structure which is accessible via MQTT, so you can use the provided display firmware or download their editor to add your own graphics, buttons, or other user controls. The included Arduino code should be flexible enough to support whatever you create as it’s mostly passing through Nextion commands directly.
Below are some example screens. All of these are created by way of sending MQTT commands from Home Assistant to the device, and all are included in the default Home Assistant package:
Building this project is straightforward with access to some basic maker tools. The enclosure requires a 3D printer but can be inexpensively outsourced through services like 3D Hubs. A PCB is available and all parts are through-hole making for easy soldering with beginning soldering skills and tools.
Alternately, fully-assembled HASP devices are available to purchase to get you setup and running quickly.