Sync your WLED lights with your media player's album art for an immersive lighting experience! This AppDaemon app for Home Assistant dynamically adjusts your WLED lights to match the dominant colors of the currently playing media's album art.
- Dynamic Album Art Color Sync: Automatically extracts colors from your media player's album art and applies them to your WLED lights in real-time.
- Vibrant Color Palette Generation: Identifies the top three most vibrant and saturated colors from album art to create a visually appealing lighting effect.
- Highly Configurable WLED Settings: Customize the WLED effect, speed, intensity, color palette, segment ID, and transition time directly from your
apps.yaml
configuration. - Easy to Install and Setup: Simple configuration through the
apps.yaml
file and flexible installation options via HACS or manual download.
Before you begin, ensure you have the following:
- Home Assistant: A working Home Assistant installation.
- AppDaemon: AppDaemon installed and configured within Home Assistant.
- WLED Controller: A WLED-enabled light controller connected to your network.
- Pillow (PIL) Python Library: Required for image processing. This will be installed as part of the setup.
You can install the WLED Album Art Sync app using either HACS (Home Assistant Community Store - Recommended) for easy updates or Manual Download if you prefer manual management.
- Install HACS (if not already installed):
- If you don't have HACS, follow the installation guide on the HACS website.
- Enable AppDaemon Discovery in HACS (if needed):
- Go to Settings > Integrations in Home Assistant.
- Find the HACS integration and click Configure.
- Ensure "AppDaemon apps discovery & tracking" is enabled. If not, enable it and submit.
- Add Custom Repository in HACS:
- Navigate to the HACS page in Home Assistant.
- Click Custom Repositories (three dots menu in the top right corner).
- Add the following information:
- Repository URL:
https://github.com/idodov/wled_album_art
- Category: Select AppDaemon
- Repository URL:
- Click ADD.
- Install WLED Album Art App:
- Go back to the main HACS page.
- Click on Integrations.
- Search for and install "WLED Album Art Sync".
- Move App Files to AppDaemon Apps Directory (Important):
- After installing through HACS, you MUST manually move the app files. HACS places files in the
/addon_configs/a0d7b954_appdaemon/apps/
directory, but AppDaemon expects them in/homeassistant/appdaemon/apps/
. - Use the Home Assistant File Editor or Samba share to move all files from
/addon_configs/a0d7b954_appdaemon/apps/wled_album_art/
to/homeassistant/appdaemon/apps/wled_album_art/
. Create thewled_album_art
directory in/homeassistant/appdaemon/apps/
if it doesn't exist.
- After installing through HACS, you MUST manually move the app files. HACS places files in the
- Configure
appdaemon.yaml
(if not already configured):- Open your
appdaemon.yaml
file. This file is often located in/addon_configs/a0d7b954_appdaemon/
when using the AppDaemon add-on. - Ensure you have the
app_dir
parameter configured under theappdaemon:
section to point to your AppDaemon apps directory. Add this line if it's missing, do not remove existing lines.
appdaemon: app_dir: /homeassistant/appdaemon/apps/
- Open your
- Install Python Package (Pillow):
- Go to the AppDaemon add-on configuration page in Home Assistant (Settings > Add-ons > AppDaemon > Configuration).
- In the Python packages section, add
pillow
to the list.python_packages: - pillow
- Save the configuration and restart the AppDaemon add-on for the changes to take effect.
- Download the Python Script:
- Download the
wled_album_art.py
file directly from the GitHub repository: https://github.com/idodov/wled_album_art/blob/main/wled_album_art.py
- Download the
- Create App Directory (if needed):
- If you don't already have an
apps
directory for AppDaemon, create it at/homeassistant/appdaemon/apps/
. - Inside the
apps
directory, create a subdirectory namedwled_album_art
.
- If you don't already have an
- Place the Script:
- Move the downloaded
wled_album_art.py
file into the/homeassistant/appdaemon/apps/wled_album_art/
directory.
- Move the downloaded
- Configure
appdaemon.yaml
and Install Pillow:- Follow steps 6 and 7 from the HACS installation method to configure your
appdaemon.yaml
and install thepillow
Python package.
- Follow steps 6 and 7 from the HACS installation method to configure your
-
Edit
apps.yaml
:- Open your
apps.yaml
file, located in the/homeassistant/appdaemon/apps/
directory.
- Open your
-
Add the App Configuration:
- Add the following configuration block to your
apps.yaml
file, adjusting the parameters to match your setup.
wled_album_art: module: wled_album_art class: WLEDImageSync ha_url: "http://homeassistant.local:8123" # Home Assistant URL (e.g., your Home Assistant IP or homeassistant.local:8123) media_player: "media_player.living_room" # Entity ID of your media player wled_ip: "192.168.86.50" # IP address of your WLED controller segment_id: 0 # Segment ID on WLED (optional, default: 0) transition_time: 2 # Transition time in seconds for color changes (optional, default: 1 second) effect_name: 38 # WLED Effect ID to use (optional, default: 38 - Solid) speed_value: 128 # Effect speed (optional, default: 128) intensity_value: 128 # Effect intensity (optional, default: 128) pallete: 5 # WLED Color Palette ID (optional, default: 5)
- Add the following configuration block to your
-
Configuration Parameters:
ha_url
: The URL of your Home Assistant instance. Usuallyhttp://<your_ha_ip_address>:8123
orhttp://homeassistant.local:8123
.media_player
: The entity ID of the media player you want to monitor for album art (e.g.,media_player.spotify
,media_player.plex
).wled_ip
: The IP address of your WLED controller on your local network.segment_id
(Optional): The WLED segment ID to control. Defaults to0
(the first segment).transition_time
(Optional): The time in seconds for WLED to smoothly transition between colors. Defaults to1
second.effect_name
(Optional): The WLED effect ID to use. Defaults to38
(Solid color). Refer to the WLED Effects list for other IDs.speed_value
(Optional): The speed of the WLED effect (if applicable). Defaults to128
.intensity_value
(Optional): The intensity of the WLED effect (if applicable). Defaults to128
.pallete
(Optional): The WLED color palette ID to use. Defaults to5
. Refer to the WLED Palettes list for other IDs.
Once installed and configured, the app will automatically start synchronizing your WLED lights with your media player's album art whenever media playback starts or the album art changes.
Enjoy your immersive lighting experience!