$ show joBr99/nspanel-lovelace-ui
This repository provides a custom firmware and backend system for the Sonoff NSPanel smart touchscreen switch, replacing its stock interface with a Home Assistant Lovelace-like UI. The system consists of three core components: a Nextion display firmware (HMI files) rendered on the panel, a Tasmota Berry driver that handles serial communication and flashing, and a backend application running as an AppDaemon app in Home Assistant or as a standalone MQTT manager. The backend processes YAML configuration, manages localization across 38 languages, maps icons to Unicode glyphs, and synchronizes entity states between Home Assistant and the panel via MQTT. The repository also includes extensive documentation, CI/CD workflows for building Docker images and validating HMI changes, and integration examples for ioBroker and IP-Symcon. While primarily an application, it contains substantial data artifacts such as translation JSON files and icon mapping tables that support the UI.
The LLM identified 2 files worth highlighting for reuse:
Implements a standalone CRC-16 MODBUS verification function used to validate serial packets between Tasmota and the Nextion display. The function is self-contained, handles byte array input, and returns the checksum. It can be extracted and reused in any project requiring CRC16 data integrity checks, independent of the rest of the NSPanel codebase.
Provides a dictionary mapping Material Design Icon names to Unicode glyphs, along with resolution functions that handle prefix variants (mdi:, ha:, text:) and fall back to a default icon if not found. The module is isolated from the rest of the backend and can be extracted and reused in any application needing icon name-to-character resolution.