A lightweight Windows system tray app to control Yeelight smart bulbs, plus an advanced music sync feature.
- 💡 System tray icon - Lives quietly in your taskbar
- 🔄 Quick toggle - Double-click to toggle light on/off
- 🎚️ Brightness control - 10%, 25%, 50%, 75%, 100%
- 🌡️ Color temperature - Warm (2700K) to Daylight (6500K)
- ⚡ Fast & lightweight - No heavy dependencies
- 🎵 Real-time audio visualization - Syncs with any audio (YouTube, Spotify, games)
- 🎧 Headphone support - Works with any output device via WASAPI loopback
- 🎨 Smart color mapping - Bass=warm colors, Treble=cool colors
- 🥁 Beat detection - Pulses on beats with adaptive threshold
- 🌊 Smooth transitions - Exponential smoothing for natural flow
- 🔄 Auto mode switching - EnergyPulse (reactive) ↔ SpectrumFlow (ambient)
- Windows 10/11
- Python 3.8+
- Yeelight bulb with LAN Control enabled
-
Clone the repository:
git clone https://github.com/user/yeelight-tray.git cd yeelight-tray -
Install dependencies:
pip install -r requirements.txt
-
Configure your bulb IP:
copy config.ini.example config.ini
Edit
config.iniand set your Yeelight bulb's IP address. -
Generate the icon:
python generate_icon.py
-
Run:
pythonw yeelight_tray.pyw
- Open the Yeelight app
- Tap on your bulb → Settings (gear icon)
- Look for "Device Info" → IP Address
Or check your router's connected devices list.
LAN Control must be enabled on your Yeelight bulb:
- Open Yeelight app
- Tap your bulb → Settings (gear icon)
- Enable LAN Control
| Action | Result |
|---|---|
| Double-click tray icon | Toggle light on/off |
| Right-click tray icon | Open menu with all options |
-
First-time setup - Allow through firewall:
Run this command in an elevated PowerShell (Run as Administrator):
netsh advfirewall firewall add rule name="Yeelight Music Sync" dir=in action=allow protocol=TCP localport=54321
-
Run the music sync:
python yeelight_music_sync.py
-
Play music from any source (YouTube, Spotify, games, etc.)
-
Press Ctrl+C to stop
The light will automatically sync colors and brightness to your audio!
Option 1: Use the installer script (recommended)
# Run the install script (double-click or run in terminal)
install_startup.batTo remove from startup:
uninstall_startup.batOption 2: Manual
- Press
Win + R, typeshell:startup, press Enter - Create a shortcut to
yeelight_tray.pywin that folder
MIT License - feel free to use and modify.
Pull requests welcome! Please keep it simple and focused.