I wanted my bookshelf to have kind of a fireplace background lighting - slightly pulsing yellow-orange light:
- rectangular pine slats 5x15x1000mm, shortened to about 600mm
- LED strip with individually addressable WS2813 LEDs, 30 LEDs per meter, 5 Volts, cut to 17 LEDs per slat
- salvaged cables from defective PC power supplies
- zipties as cable relief
- 3-pin connectors
- NodeMCU ESP32
- perfboard
- 11 W USB power supply (a little on the frail side…)
I chose to separate the LED slats into 4 groups, 2 slats each, so that the maximum distance between the ESP32 data out and the last LED would be small and I wouldn’t run into problems due to the difference between nominal (5V) and actual (3.3V) data logic level.
I used a perfboard to hook up four 3-pin connectors to the ESP32, which itself rests in a socket rather than being soldered to the board. The LED slats get their power directly from the 5V and GND pins and their data from GPIOs 19, 18, 5 and 17 - all right next to each other. I flashed WLED to the ESP via the web installer, made it connect automatically to my WLAN, configured the 4 LED outputs at Config > LED preferences, made a preset for the fireplace animation, et voila, done.
I can now control the book shelf backlight via smartphone or computer command. For the latter I also configured a convenient mDNS name (Config > WiFi Setup). I can then post partial JSON of the desired state to that address:
curl -X POST http://bookshelf.local/json -d '{"on":true, "ps":1}' -H "Content-Type: application/json"
… which turns on the LEDs and switches to preset 1.