Explorations in Home Automation
January 31, 2025
Recently we got bids for a kitchen remodel and some included an option to put under-cabinet lighting, which I think is kinda cool. They ballparked it at like $1,000 and who knows if their tech would even be smart enough to integrate with Home Assistant which to me is mandatory. Moreover, that price is pretty crazy.
Around the same time I heard about the WLED Project, so decided to try it out.
Below are the steps I took to get Home Assistant-controlled LED strips up and running. There is a small bit of soldering involved but nothing fancy. I’m going to link to the specific components I used as a courtesy in case helpful to you, but there may well be better options. I’m not an influencer so I get no kickback from the sources.
Also, the WLED project has very nice getting started instructions, including wiring examples, and tips to avoid common mistakes.
A note about power. With the above parts you’d think that driving 144 LEDs (~60mA each ~= 8.6A) would quickly smoke the power circuitry on the D1 Mini. The default setting for WLED (at least for the D1 mini) has an automatic brightness limiter to prevent the LED strip from drawing more than about 1A, so not to worry! If you decide to go with more powerful supply you can turn this off via the web interface to your WLED-enabled D1 Mini (i.e., after you complete the Set up with WLED instructions below). It’s near the top of the LED Preferences page.
I wired a D1 Mini to the power the LED strip as shown in the schematic below but using the D1 mini’s micro-USB to power everything. If you want to drive multiple LED strips with a single D1 Mini you can wire up an external power supply to the same 5V and GND pins that the LED strip is connected to. The figures below show a barrel connector for this purpose if you decide that’s the way you want to go. If not, just ignore that component and its wiring.
We are using pin D4 (=GPIO2) on the D1 Mini, as this is WLED’s default for the data (control) line. If you use a different pin you can change the pin assignment via the WLED web interface: CONFIG –> LED Preferences –> “Data GPIO: (increment/decrement menu).
The LED strips I am using come with a tiny controller connected to the upstream end of the LED strip with a connector. They came with an extra connector and 3-wire pigtail (red=5v; white=GND; green-DIN). I soldered these wires to my D1 mini (with an in-line 330ohm resister on the green line) as shown in the schematics below (in which the LED strip pictured does not have a connector). Using this connector also ensures that you plug into the upstream end of the LED strip (see WLED common mistakes).

Above: How to wire this up. (L to R: Physical view; schematic; pcb layout). For completeness I show a barrel connector for power in case you wanted to go with an external, beefy power supply. One could readily hard-wire the power supply but a connector offers better flexibility (e.g., you may wish to swap out the D1 Mini or the power supply later). (Download the Fritzing file)
The following steps will get your D1 Mini set up with WLED.
Download WLED firmware from WLED Github repo. Go to the Assets section to find a list of firmware downloads and download the firmware for the D1 mini (I used WLED_0.15.0_ESP8266.bin).
Plug your D1 mini into a USB port on your laptop or server.
Now you have a working WLED controller, so you can manually changes the LED colors, invoke dozens of patterns, etc. from a web browser. But don’t you want to automate this? I thought so. Read on.
This part is the easiest. First, install the Home Assistant WLED integration. Once you install it, select it and on the WLED page under Devices select ADD DEVICE and fill in the IP address of your D1 Mini. (check your router client list - here is where knowing the MAC address can be helpful). After adding my first WLED device, additional ones were auto-discovered so I did not need to know the IP address, which was quite handy!
The WLED project has good instructions to help with Home Assistant WLED integration.