Wiznet makers

irina

Published April 27, 2026 © MIT license (MIT)

159 UCC

5 WCC

104 VAR

0 Contests

0 Followers

0 Following

Original Link

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.

COMPONENTS Hardware components

WIZnet - W5500

x 1


PROJECT DESCRIPTION

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.

System architecture: ESP32 LVGL touchscreen + W5500 Ethernet to MQTT broker to Home Assistant, openHAB, Node-RED, ioBroker

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.

MQTT topic structure showing command and state topics, and pages.jsonl UI object definitions

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.

W5500 SPI wiring for ESP32 and list of supported hardware boards including Sunton, TTGO, WT32-SC01, Lanbon L8

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
  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

Documents
  • openHASP

Comments Write