# chiefmate8/esp32-wiim-now-playing-display architecture

> Architecture diagram of the GitHub repository chiefmate8/esp32-wiim-now-playing-display, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chiefmate8/esp32-wiim-now-playing-display
- Repository: https://github.com/chiefmate8/esp32-wiim-now-playing-display

## Overview

This repository is an ESPHome configuration for an ESP32 touchscreen that displays WiiM playback information, with an idle clock and weather view. The principal flow is Home Assistant playback state to the display, supplemented by direct WiiM polling for track details and position; touch gestures become Home Assistant media-player actions. The YAML also configures weather retrieval and the display’s two visual states. No source excerpts were provided, so relationships below rely on the README’s documented behavior and diagram.

Main entry points: [`esphome/nowplaying.yaml`](https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml) (ESPHome configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_firmware["Display firmware"]
  node_config["ESPHome configuration<br/>[nowplaying.yaml]"]
  node_nowplaying["Now-playing screen<br/>[nowplaying.yaml]"]
  node_idle["Idle clock and weather<br/>[nowplaying.yaml]"]
  node_touch["Touch controls<br/>[nowplaying.yaml]"]
end

subgraph group_services["External services"]
  node_ha["Home Assistant"]
  node_wiim["WiiM Pro"]
  node_weather["Open-Meteo"]
end

node_user(("Listener"))

node_ha -->|"sends playback state"| node_config
node_config -->|"polls track details"| node_wiim
node_wiim -->|"provides position and metadata"| node_nowplaying
node_ha -->|"supplies fallback metadata"| node_nowplaying
node_weather -->|"provides forecast"| node_idle
node_user -->|"taps screen"| node_touch
node_touch -->|"sends media actions"| node_ha
node_config -->|"shows playback view"| node_nowplaying
node_config -->|"shows idle view"| node_idle

click node_config "https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml"
click node_nowplaying "https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml"
click node_idle "https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml"
click node_touch "https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config,node_nowplaying,node_idle,node_touch toneBlue
class node_ha,node_wiim,node_weather toneAmber
class node_user toneIndigo
```

## Components

### Display firmware

- [ESPHome configuration](https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml): `esphome/nowplaying.yaml`
- [Now-playing screen](https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml): `esphome/nowplaying.yaml`
- [Idle clock and weather](https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml): `esphome/nowplaying.yaml`
- [Touch controls](https://github.com/chiefmate8/esp32-wiim-now-playing-display/blob/main/esphome/nowplaying.yaml): `esphome/nowplaying.yaml`

### External services

- **Home Assistant**
- **WiiM Pro**
- **Open-Meteo**

### Other components

- **Listener**

## Connections

- Home Assistant → ESPHome configuration: sends playback state (evidence: `README.md`)
- ESPHome configuration → WiiM Pro: polls track details (evidence: `README.md`)
- WiiM Pro → Now-playing screen: provides position and metadata (evidence: `README.md`)
- Home Assistant → Now-playing screen: supplies fallback metadata (evidence: `README.md`)
- Open-Meteo → Idle clock and weather: provides forecast (evidence: `README.md`)
- Listener → Touch controls: taps screen (evidence: `README.md`)
- Touch controls → Home Assistant: sends media actions (evidence: `README.md`)
- ESPHome configuration → Now-playing screen: shows playback view (evidence: `README.md`)
- ESPHome configuration → Idle clock and weather: shows idle view (evidence: `README.md`)
