Homelab 📖 20 min read

WLED Smart LED Controller

WLED turns an ESP32 and a strip of addressable LEDs into a smart light you control from your phone. Total cost: about $15. Setup time: 20 minutes.

What's WLED?

WLED is open-source firmware for ESP8266/ESP32 microcontrollers that turns them into addressable LED controllers with a web interface. It supports WS2812B (RGB) and SK6812 (RGBW) strips, has over 100 built-in effects, and works with phone apps on both iOS and Android.

WS2812B strips are fine for color effects and accent lighting. SK6812 adds a dedicated white LED, which produces cleaner warm white for room lighting instead of mixing RGB to approximate it.

Features:

  • 100+ built-in effects and palettes
  • Web interface with live preview
  • Mobile apps (iOS/Android)
  • Home Assistant, Alexa, Google Home integration
  • Music reactive modes (ESP32 only)
  • Sync multiple WLED devices on the same network

What you need to buy:

  • ESP32 dev board — ~$5 (NodeMCU or Wemos D1 Mini work fine)
  • WS2812B LED strip, 1 meter / 60 LEDs — ~$8
  • 5V power supply, 2A or higher — ~$3
  • 3 jumper wires (female-to-female or whatever fits your board)

Total: around $16. A level shifter on the data line improves reliability on longer runs but is not required for a 1-meter strip.

Power supply math:

Each WS2812B LED draws up to 60mA at full white. That means a 60-LED strip at maximum brightness pulls 60 x 0.06A = 3.6A at 5V, which is 18 watts.

  • Full white (all three color channels on): ~60mA per LED
  • Single color or mixed colors: ~20-30mA per LED
  • WLED default software limit: 850mA total (adjustable in settings)

Most phone chargers output 5V at 1-2A. That is not enough for a 60-LED strip at full brightness — you will get flickering and color shift where whites look pinkish or yellowish. Get a dedicated 5V 4A power supply if you plan to run the strip anywhere near full white. For color effects at moderate brightness, 5V 2A is usually sufficient because WLED's current limiter will dim the output to stay within budget.

For strips longer than 1 meter, inject power at both ends of the strip. Voltage drop over the thin copper traces causes LEDs at the far end to look dimmer and shift color if you only feed power from one end.

Wiring

ESP8266/32 LED Strip Power Supply
----------- --------- ------------
GPIO2 (D4) ------> Data In
GND ------> GND <------ GND
 +5V <------ +5V
VIN/5V <-------------------------------+
 (if powering ESP from same supply)

Important: The ESP32 ground and the LED strip ground must be connected together, even if you power the ESP over USB separately. Without a common ground, the data signal will not work.

Flashing WLED

Easy Method: Web Installer

Use the WLED web installer (install.wled.me) instead of flashing manually. It works in Chrome and takes 2 minutes.

  1. Go to install.wled.me in Chrome or Edge
  2. Connect the ESP32 to your computer via USB
  3. Click "Install WLED" and select your COM port
  4. Wait for the flash to finish

That is it. No Arduino IDE, no driver hunting, no compiling. If your board is not detected, you may need to install the CH340 or CP2102 USB driver depending on which chip your board uses.

Manual Method

# Install esptool
pip install esptool

# Download latest WLED binary from GitHub releases
# Flash to ESP8266
esptool.py write_flash 0x0 WLED_xxx.bin

Initial Setup

After flashing:

  1. ESP creates WiFi network: "WLED-AP"
  2. Connect to it (password: wled1234)
  3. Navigate to 4.3.2.1
  4. Configure your home WiFi credentials
  5. Save and reboot

The ESP reboots and connects to your network. Check your router's DHCP lease table to find its IP address, then open that IP in a browser to access the WLED interface.

Setting Things Up

LED Preferences

Config → LED Preferences

  • LED count: How many LEDs in your strip
  • LED type: WS281x, SK6812, etc.
  • GPIO: Which pin (default GPIO2)
  • Color order: GRB for most WS2812B

Power Limits

Config → LED Preferences → Maximum current

Set this to match your power supply's rated output. WLED will automatically dim all LEDs proportionally to stay within the limit rather than letting the power supply sag or shut down.

Using WLED

The main interface provides:

  • Color picker: Set static colors
  • Effects: 100+ animated patterns
  • Palettes: Color schemes for effects
  • Presets: Save configurations
  • Segments: Split strip into independent sections

Segments

Segments let you split one physical strip into multiple independently-controlled sections:

  1. Click segment icon
  2. Add segment with start/end LED numbers
  3. Each segment can have different color/effect/brightness

Useful when a single strip covers multiple zones — for example, under a desk and behind a monitor on the same strip but with different colors or effects on each section.

Presets and Playlists

Save any configuration as a preset:

  1. Set up desired color/effect
  2. Click save icon → New preset
  3. Name it and save

Create playlists to cycle through presets automatically.

Home Assistant Integration

WLED devices are auto-discovered by Home Assistant.

Or add manually:

light:
 - platform: wled
 host: 192.168.1.xxx

This gives full control over colors, effects, and presets from Home Assistant dashboards and automations.

Music Reactive

ESP32 (not 8266) can react to sound:

  • Connect analog microphone to GPIO
  • Enable in Sound Reactive menu
  • Use audio-reactive effects

Or use WLED Audio Reactive fork for more features.

Syncing Multiple Devices

Sync → WLED Broadcast

  • Enable "Send"
  • Select what to sync (color, effects, brightness)

All WLED devices on network will sync together.

API Integration

WLED has JSON and HTTP APIs:

# Turn on
curl "http://wled-ip/win&T=1"

# Set color
curl "http://wled-ip/json/state" -d '{"on":true,"bri":128,"col":[[255,0,0]]}'

# Activate preset
curl "http://wled-ip/json/state" -d '{"ps":1}'

Automate with scripts, Home Assistant, or any HTTP client.

Hardware tips

  • A 1000µF capacitor across the power supply input smooths out voltage spikes when LEDs switch on
  • A 300-470 ohm resistor on the data line protects the first LED from noise on long wires
  • For strips longer than 2 meters, inject power at both ends
  • Back up your WLED config periodically: Config → Security → Backup

WLED works with Home Assistant, Alexa, and Google Home out of the box. It also has an open API if you want to script your own effects. But honestly, the built-in effects are good enough that most people never touch the API.

💬 Comments