Dedicated Sonos touchscreen controller using a Sunton ESP32 display and ESPHome.
This project implements a dedicated Sonos controller using a Sunton ESP32-2432S028 2.8 inch touchscreen display with ESPHome integrated into Home Assistant.
The panel displays:
- Sonos playback state
- Track title
- Artist name
It also provides touch controls for:
- Previous track
- Play / Pause
- Next track
- Volume down
- Volume up
This repository documents the stable working version of the project.
The screenshot above shows the current stable interface running on the device after installation and configuration.
Stable status:
- display fully working
- touchscreen mapping working
- Sonos controls working
- title and artist display working
- long-title handling working
- accent handling stabilized enough for daily use
- sleep mode with clock working
- touch wake working
- no sleep while music is playing
- sleep after 30 seconds when playback is not active
Tested with:
- Sunton ESP32-2432S028
Main features:
- ESP32 microcontroller
- 2.8 inch TFT display
- XPT2046 touchscreen controller
- integrated SPI display interface
- ESPHome
- Home Assistant
- ESP-IDF framework
.
├── LICENSE
├── README.md
├── TROUBLESHOOTING.md
├── images
│ └── screen.jpeg
└── esphome
├── sunton-2432s028r-sonos.yaml
└── secrets.example.yaml
Main configuration file:
esphome/sunton-2432s028r-sonos.yaml
This file contains:
- display configuration
- touchscreen calibration
- Sonos Home Assistant integration
- Unicode text normalization
- touch button mapping
- standby clock
- screen sleep and wake handling
The configuration uses the Sonos entity:
media_player.arc
If your Sonos entity has a different name, replace all occurrences of:
media_player.arc
inside the YAML configuration.
Copy the example secrets file:
cp esphome/secrets.example.yaml esphome/secrets.yaml
Then edit it with your WiFi credentials:
wifi_ssid: "YOUR_WIFI"
wifi_password: "YOUR_PASSWORD"
Normal mode:
- SONOS ARC header
- playback state
- track title
- artist
- PREV / PLAY / NEXT
- volume minus / plus
Standby mode:
- low brightness clock
- date
- touch to wake
Sleep logic:
- screen stays awake while Sonos is playing
- screen sleeps after 30 seconds only when Sonos is not playing
For battery usage, the simplest and most reliable option is to use a standard USB power bank.
Advantages:
- no custom wiring
- safe and stable
- easy to recharge
- no dedicated battery electronics required
A custom 18650 battery power design is possible, but it is not developed in this project.
Stable reference version:
- display works correctly
- touchscreen mapping works
- Sonos commands work
- text normalization handles most metadata issues
- sleep mode works without changing touch zones
Unicode handling: Sonos metadata sometimes contains typographic characters such as apostrophes or accents. The YAML includes a normalization function to reduce display artifacts.
GPIO warnings: ESPHome may warn about strapping pins such as GPIO12. This is expected on this board and does not affect normal operation.
-
Copy the YAML file to your ESPHome configuration folder:
/config/esphome/sunton-2432s028r-sonos.yaml -
Ensure secrets are configured.
-
Install the device from ESPHome Builder in Home Assistant.
Typical workflow:
git add .
git commit -m "Update configuration"
git push
Planned future improvements:
- screen auto brightness
- wake/sleep refinements if needed
- optional volume indicator
- optional LVGL version later
At this stage, the project intentionally keeps the current stable battery guidance simple: use a USB power bank rather than a dedicated battery circuit.
MIT
