wip: feat(esphome): Music Assistant control panel on Waveshare 7 inch touch LCD #817

Draft
lytedev wants to merge 2 commits from esphome-music-panel into main
Owner

ESPHome config for the Waveshare ESP32-S3-Touch-LCD-7 as a Music Assistant control panel.

Reaches MA through Home Assistant's native API rather than talking to MA directly — HA's Music Assistant integration already exposes the players as media_player entities. Entity IDs were read from HA's live entity registry, not guessed.

What it does

Now-playing (title + state), play/pause, prev/next, volume slider, and on-screen buttons to switch which MA player is targeted (Thinker / Living Room / Bedroom).

Layout

Follows the existing esp32-s3-box-3 pattern: config YAML + deploy.nix + SOPS secrets + README, registered as 'nix run .#deploy-music-panel'.

Board specifics

This board is NOT interchangeable with other 7 inch ESP32-S3 panels:

  • LCD is parallel RGB (mipi_rgb), not SPI
  • Backlight, LCD reset and touch reset are behind a CH422G I2C expander (0x24), not on ESP32 GPIOs; GT911 touch on the same bus
  • Octal PSRAM required for the framebuffer — a WROOM-class module cannot run it

Pin map taken from the community package for this exact board: https://github.com/inytar/waveshare-esp32-s3-touch-lcd-7-esphome

Two constraints that shaped the config

  • Transport actions pass the selected entity to HA as a template variable, because ESPHome binds entity_id at compile time and it cannot follow a runtime selection.
  • Each player needs its own title/state text_sensor pair for the same reason — a dynamically chosen player cannot share one subscription.

Audio

The plain ESP32-S3-Touch-LCD-7 has no onboard mic/speaker/amp (that is the separate 7C-BOX variant), so this is a controller, not a player. GPIOs are broken out if an I2S DAC/amp is wanted later.

Test plan

  • esphome config -> 'Configuration is valid!' (esphome 2026.5.3; mipi_rgb, ch422g, gt911, lvgl all present)
  • nix build .#deploy-music-panel succeeds; app runs and decrypts secrets
  • SOPS secrets round-trip
  • NOT flashed to hardware — display timings, touch calibration and LVGL layout unverified
  • Wi-Fi credentials are PLACEHOLDER_SET_ME; run 'sops secrets/waveshare-lcd-7.yaml' before first flash
ESPHome config for the Waveshare ESP32-S3-Touch-LCD-7 as a Music Assistant control panel. Reaches MA **through Home Assistant's native API** rather than talking to MA directly — HA's Music Assistant integration already exposes the players as media_player entities. Entity IDs were read from HA's live entity registry, not guessed. ## What it does Now-playing (title + state), play/pause, prev/next, volume slider, and on-screen buttons to switch which MA player is targeted (Thinker / Living Room / Bedroom). ## Layout Follows the existing esp32-s3-box-3 pattern: config YAML + deploy.nix + SOPS secrets + README, registered as 'nix run .#deploy-music-panel'. ## Board specifics This board is NOT interchangeable with other 7 inch ESP32-S3 panels: - LCD is parallel RGB (mipi_rgb), not SPI - Backlight, LCD reset and touch reset are behind a CH422G I2C expander (0x24), not on ESP32 GPIOs; GT911 touch on the same bus - Octal PSRAM required for the framebuffer — a WROOM-class module cannot run it Pin map taken from the community package for this exact board: https://github.com/inytar/waveshare-esp32-s3-touch-lcd-7-esphome ## Two constraints that shaped the config - Transport actions pass the selected entity to HA as a template variable, because ESPHome binds entity_id at compile time and it cannot follow a runtime selection. - Each player needs its own title/state text_sensor pair for the same reason — a dynamically chosen player cannot share one subscription. ## Audio The plain ESP32-S3-Touch-LCD-7 has no onboard mic/speaker/amp (that is the separate 7C-BOX variant), so this is a controller, not a player. GPIOs are broken out if an I2S DAC/amp is wanted later. ## Test plan - [x] esphome config -> 'Configuration is valid!' (esphome 2026.5.3; mipi_rgb, ch422g, gt911, lvgl all present) - [x] nix build .#deploy-music-panel succeeds; app runs and decrypts secrets - [x] SOPS secrets round-trip - [ ] NOT flashed to hardware — display timings, touch calibration and LVGL layout unverified - [ ] Wi-Fi credentials are PLACEHOLDER_SET_ME; run 'sops secrets/waveshare-lcd-7.yaml' before first flash
feat(esphome): Music Assistant control panel on Waveshare 7" touch LCD
All checks were successful
/ check-format (push) Successful in 9s
/ build (push) Successful in 5m57s
b154738b00
An ESPHome config for the Waveshare ESP32-S3-Touch-LCD-7 that drives Music
Assistant playback: now-playing, play/pause, prev/next, volume, and buttons to
switch which MA player is targeted. It reaches MA through Home Assistant's
native API rather than talking to MA directly, since HA's Music Assistant
integration already exposes the players as media_player entities.

Follows the existing esp32-s3-box-3 layout: config YAML + deploy.nix +
SOPS secrets + README, registered as `nix run .#deploy-music-panel`.

Board specifics worth knowing, since this board is not interchangeable with
other 7" ESP32-S3 panels: the LCD is parallel RGB (mipi_rgb), and backlight,
LCD reset and touch reset are behind a CH422G I2C expander rather than ESP32
GPIOs, with a GT911 touch controller on the same bus. Octal PSRAM is required
for the framebuffer. Pin map taken from the community package for this exact
board (linked in the config).

Transport actions pass the selected entity to HA as a template variable,
because ESPHome binds `entity_id` at compile time; the per-player title/state
text_sensors exist for the same reason — a dynamically chosen player cannot
share one subscription.

Validates with `esphome config` (2026.5.3, which has all of mipi_rgb, ch422g,
gt911 and lvgl). NOT yet flashed: display timings, touch calibration and the
LVGL layout are unverified on real hardware.
fix(esphome): boot the panel on real hardware and build it reproducibly
All checks were successful
/ check-format (push) Successful in 8s
/ build (push) Successful in 5m45s
23be36ecbd
Three changes, all found by flashing the actual board:

1. PSRAM 120MHz -> 80MHz. The first flash succeeded but the panel boot-looped
   on "Invalid image block, can't boot" while loading a segment at 0x3c87xxxx,
   an address in external PSRAM. ESPHome flags 120MHz octal as experimental;
   80MHz is the supported setting. Note the community reference config for this
   board uses 120MHz, so this is a deliberate divergence. Flash size was ruled
   out first — the chip really is 16MB, as configured.

2. deploy.nix runs esphome in a container. Not stylistic: esphome shells out to
   PlatformIO, which builds its own tools in its own venv, and on this host that
   venv segfaults building esptool, so the nixpkgs esphome cannot compile an
   esp-idf project at all. An FHS environment did not help. The container also
   keeps PlatformIO state in a dedicated cache dir instead of ~/.platformio, and
   needs --group-add keep-groups so rootless podman inherits dialout — without
   it the flash fails on serial permissions *after* a successful compile.

3. Resize the LVGL layout. The widgets were sized for a taller screen: six
   stacked elements exceeded 480px, so the flex column overflowed and the UI
   rendered oversized and out of alignment.

Verified on hardware: compiles, flashes, boots, joins Wi-Fi (192.168.0.132),
answers mDNS, accepts OTA updates, and completes an API handshake. The rendered
layout still needs a visual check.
lytedev changed title from feat(esphome): Music Assistant control panel on Waveshare 7 inch touch LCD to wip: feat(esphome): Music Assistant control panel on Waveshare 7 inch touch LCD 2026-07-28 11:51:01 -05:00
All checks were successful
/ check-format (push) Successful in 8s
Required
Details
/ build (push) Successful in 5m45s
Required
Details
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin esphome-music-panel:esphome-music-panel
git switch esphome-music-panel
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lytedev/nix!817
No description provided.