---
title: "openHASP — MQTT Touchscreen UI for Home Automation with W5500 Wired Ethernet"
url: "https://maker.wiznet.io/irina/projects/openhasp--mqtt-touchscreen-ui-for-home-automation-with-w5500-wired-ethernet/"
markdown_url: "https://maker.wiznet.io/irina/projects/openhasp--mqtt-touchscreen-ui-for-home-automation-with-w5500-wired-ethernet/md"
type: "UCC: User Created Content"
author: "Francis Van Roie (fvanroie)"
author_url: "https://github.com/HASwitchPlate/openHASP"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Francis Van Roie (fvanroie)"
original_url: "https://github.com/HASwitchPlate/openHASP"
license: "MIT license (MIT)"
published: "2026-04-27"
language: "en"
hardware: ["WIZnet W5500"]
likes: 0
views: 385
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# openHASP — MQTT Touchscreen UI for Home Automation with W5500 Wired Ethernet

> ESP32 LVGL touchscreen controller for Home Assistant, openHAB & more. MQTT-driven multi-page UI, W5500 wired Ethernet, OTA, web config, anti-burn-in.

Original author: Francis Van Roie (fvanroie) (source: https://github.com/HASwitchPlate/openHASP)

## Components

- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Documents and links

- [openHASP](https://github.com/HASwitchPlate/openHASP) (code)

## Article

## Overview

**openHASP** is an open-source firmware that turns an **ESP32 with a touchscreen display** into a fully customizable **home automation control panel**, driven entirely by **MQTT**. It uses the **LVGL (Light and Versatile Graphics Library)** to render a multi-page touchscreen UI — no proprietary display hardware required.

Originally derived from the popular **HASwitchPlate (HASPone)** project by aderusha, openHASP replaces the Nextion/TJC HMI display requirement with commodity SPI displays, and adds full **ESP32** and **STM32F4** support. Starting from **v0.7.0-rc13**, it supports **WIZnet W5500 SPI Ethernet** as an alternative to Wi-Fi, enabling reliable wired network connectivity for home automation panels in environments where Wi-Fi is not ideal.

## System architecture

The ESP32 runs the LVGL UI locally and communicates bidirectionally with an MQTT broker over Wi-Fi or W5500 wired Ethernet. Any home automation platform that supports MQTT — Home Assistant, openHAB, Node-RED, ioBroker — can control the display and receive touch events.

## What This Project Does

- Renders a **multi-page touchscreen UI** using LVGL — buttons, toggles, sliders, arcs, labels, color pickers, dropdowns, and more

- Connects to any **MQTT broker** and publishes touch events / subscribes to UI state updates

- Supports **W5500 SPI Ethernet** (wired) as an alternative to Wi-Fi — enabled via `HASP_USE_ETHSPI=1`

- UI layout defined in a simple **JSON Lines file** (`pages.jsonl`) stored on LittleFS — no recompilation needed

- Includes a built-in **web configuration UI** (port 80) for Wi-Fi, MQTT, display, and GPIO settings

- Supports **OTA firmware updates** from URL or file upload via web interface

- Anti-burn-in mode, idle screen dimming, and full backlight control via MQTT

- Telnet, FTP, and Syslog support for remote debugging

- GPIO input/output control via MQTT topics

- LWT (Last Will and Testament) topic for online/offline detection

## MQTT topic structure & UI objects

The UI is fully controlled over MQTT. Commands are sent to `hasp/{node}/command/` topics and state changes are published to `hasp/{node}/state/` topics. UI layouts are defined in a `pages.jsonl` file with simple JSON objects.

## W5500 Wired Ethernet & Supported Boards

W5500 SPI Ethernet support was added in v0.7.0-rc13. Enable it with `HASP_USE_ETHSPI=1` in the build config or select Ethernet in the web UI. The W5500 connects via standard SPI pins and provides DHCP or static IP assignment.

## Hardware

- **MCU:** ESP32 (recommended) or STM32F4

- **Display:** Any SPI TFT display — ILI9341, ST7789, ST7796, ILI9163, etc.

- **Touch:** XPT2046, FT5x06, GT911, STMPE610 capacitive/resistive touch controllers

- **Ethernet:** WIZnet W5500 via SPI (MISO=GP19, MOSI=GP23, SCLK=GP18, CS=GP5, INT=GP4)

- **Supported boards:** Sunton ESP32-2432S028R / 2432S032C, TTGO T-Display, WT32-SC01, Lanbon L8, FireBeetle ESP32, generic ESP32 DevKit

- **Connectivity:** Wi-Fi or W5500 wired Ethernet (selectable)

## Software & Tools

- **Framework:** Arduino for ESP32 (PlatformIO)

- **Graphics:** LVGL (Light and Versatile Graphics Library)

- **Display driver:** TFT_eSPI or LovyanGFX

- **MQTT:** PubSubClient / AsyncMqttClient

- **File system:** LittleFS (pages.jsonl, config files)

- **Libraries:** ArduinoJson 6.x, AceButton, ArduinoStreamUtils

- **Latest version:** v0.7.0-rc13

- **Documentation:** https://openhasp.haswitchplate.com

## How to Flash & Configure

1. Download the pre-built `.bin` firmware for your board from the [Releases page](https://github.com/HASwitchPlate/openHASP/releases)

2. Flash via **ESPHome Flasher**, **esptool.py**, or drag-and-drop (if OTA is already running)

3. Connect to the **openHASP Wi-Fi AP** that appears after first boot (or configure Ethernet)

4. Open `http://192.168.4.1` to configure Wi-Fi, MQTT broker IP, node name, and display settings

5. To enable W5500: set `HASP_USE_ETHSPI=1` in build config, or select Ethernet in web UI and enter SPI pins

6. Upload your `pages.jsonl` file via the **web file manager** or FTP

7. Configure MQTT topics in your home automation platform (Home Assistant, openHAB, Node-RED, etc.)

## FAQ

**Q1. Why use W5500 Ethernet instead of Wi-Fi for a wall panel?**
Wall-mounted panels often sit in areas with weak Wi-Fi signal, or behind metal enclosures. The **WIZnet W5500 hardware TCP/IP stack** provides a stable wired connection to the MQTT broker — no Wi-Fi dropouts, no reconnection delays. It's ideal for critical home automation touchpoints like light switches or HVAC controls.

**Q2. How do I create a UI layout?**
Create a `pages.jsonl` file where each line is a JSON object describing a UI element. For example:
`{"page":1,"id":1,"obj":"btn","x":10,"y":10,"w":100,"h":50,"text":"Light ON"}`
Upload the file via the web file manager or FTP. No recompilation is needed — the UI updates on next boot.

**Q3. Which home automation platforms are supported?**
Any platform that supports MQTT works with openHASP. The most popular integrations are **Home Assistant** (with a dedicated HACS integration), **openHAB**, **Node-RED**, and **ioBroker**. Topic mapping is handled by the home automation platform.

**Q4. Can I control GPIO pins via MQTT?**
Yes. GPIO inputs publish their state to `hasp/{node}/state/input{pin}` and outputs can be controlled via `hasp/{node}/command/output{pin}`. This allows physical button inputs and relay outputs to be integrated directly into your automation flows.

**Q5. What is the pages.jsonl format?**
Each line in `pages.jsonl` defines one UI object with properties like page number, object ID, type (obj), position (x, y), size (w, h), and style attributes. Objects can be updated at runtime via MQTT without rebooting. Up to 12 pages with 32 objects per page are supported.

**Q6. How does anti-burn-in work?**
When idle for a configurable time, the screen automatically dims or turns off. Anti-burn-in mode periodically shifts the display content slightly to prevent pixel burn-in on OLED or older TFT panels. Both idle timeout and anti-burn-in can be controlled via MQTT commands at runtime.

## Key Takeaway

openHASP transforms any ESP32 touchscreen board into a professional home automation control panel — with a fully MQTT-driven UI, support for all major home automation platforms, and now **WIZnet W5500 wired Ethernet** for rock-solid network connectivity. It is the ideal solution for building custom wall panels, smart switches, and scene controllers without proprietary hardware or cloud dependencies.

**Source Code:** <https://github.com/HASwitchPlate/openHASP>
**Documentation:** <https://openhasp.haswitchplate.com>

---

Source: https://maker.wiznet.io/irina/projects/openhasp--mqtt-touchscreen-ui-for-home-automation-with-w5500-wired-ethernet/
