Skip to main content

Drive WLED LED strips from Mopidy album art

Project description

Mopidy-JukeboxLights

PyPI CI

A Mopidy extension that drives WLED LED strips with colors pulled from the album art of whatever is playing.

What it does

  • Color from the sleeve. Averaging album art gives brown every time. Instead this buckets pixels, discards anything too dark or too washed out to register as light, and scores the rest by pixel count weighted by saturation — so a small bright detail on a black sleeve still wins.
  • Two-color cabinets. Picks an accent from the strongest hue at least ~29° away from the dominant, and paints nominated segments with it. A red-and-blue sleeve lights red and blue, not two shades of purple.
  • Event driven. A Mopidy frontend actor listening for track_playback_started, so the lights change the instant the track does. Network calls run on a worker thread and never block Mopidy's event loop.
  • Idle and dark states. Breathes amber when nothing is playing, and goes fully dark when a kiosk panel blanks — see follow_display below.

Status page

Once running, http://<your-host>:6680/jukeboxlights/ shows what the lights are doing and, more usefully, why — whether WLED is reachable, which segments were discovered, and whether the strip is following music, breathing amber, or dark because the kiosk panel blanked. It also has a button to cycle red/green/blue/amber for checking wiring without needing to play anything.

Installation

python3 -m pip install Mopidy-JukeboxLights

Configuration

[jukeboxlights]
enabled = true
wled_host = 172.20.25.44       # IP or host:port of your WLED device
brightness = 160               # 1-255
idle_after = 45                # seconds of silence before the idle effect
idle_color = 240,168,48        # amber
accent_segments = 1,2,3        # segment ids that get the accent color
follow_display = true
display_flag = /run/jukebox/display-off

Segments are read from WLED at startup, so a strip run in one uncut piece with hidden stretches behind a door frame works without any config here — define the visible runs as WLED segments and this follows them.

Turning the lights off with the screen

If something else on the machine creates the file named by display_flag when a kiosk display blanks, the strip goes fully dark rather than breathing — but only while nothing is playing. Remove the file and it comes back. Set follow_display = false to ignore this entirely.

Project resources

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mopidy_jukeboxlights-1.0.0.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mopidy_jukeboxlights-1.0.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file mopidy_jukeboxlights-1.0.0.tar.gz.

File metadata

  • Download URL: mopidy_jukeboxlights-1.0.0.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mopidy_jukeboxlights-1.0.0.tar.gz
Algorithm Hash digest
SHA256 36716f4b04a16f5e1b77cffb3802022af623a4c3e6a6ab112c0c331a48a0d69d
MD5 bd23fed7d55446bc18a8792f820e7b73
BLAKE2b-256 27ecb7abf05eaf5b2cc6942a2954e6a25a6bb12f22a01a03dc30668501bf68d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mopidy_jukeboxlights-1.0.0.tar.gz:

Publisher: ci.yml on kingbutter/mopidy-jukebox-lights

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mopidy_jukeboxlights-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mopidy_jukeboxlights-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3209d4ccc13842fd9bbf799694033a82dec6b02d51cc1ab0c7d951dffe19fd4
MD5 f75eb0b80ded45b584a404de86ca09a2
BLAKE2b-256 0e2e8495732acefe315f4327a222b2f6bd5c07632392d6a2a0c121be80c74f01

See more details on using hashes here.

Provenance

The following attestation bundles were made for mopidy_jukeboxlights-1.0.0-py3-none-any.whl:

Publisher: ci.yml on kingbutter/mopidy-jukebox-lights

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page