Christmas in coming, this year I want to be prepared with new smart lights and cool effects to surprise my neighbors and visitors. For example, you can use them on a Christmas Tree or outside around your home or garden (pay attention to choose waterproof version, labeled with IP68 code)
Optionally you can add Home Assistant integration and grant control with your home automation.
I’ve chosen WS2811 LEDs strip, there are many options but this is to me the most cheap and still whit great results LED strip. They are usually sold in strip of 50 leds each, that can be connected together by its own JST connector, in order to have a much longer strip. Beside the length, you need to choose between 5 and 12V leds, to keep the whole circuit simpler I’ve chosen 5V version, so that I can use same power supply for LEDs and for ESP8266.
Also WS2812B LEDS strip will works as well, but usually a bit more expensive.
The controller for the strip is a ESP8266 board (Wemos or Nodemcu) or even an ESP32 is also good.
Additionally to WS2811 LED and ESP8266 nodemcu you will need a 5V / 5A power supply. The power supply must be selected according to the length of your strip, each LED is rated for a 0,3W power consumption, so multiple this rate for total amount of LED and finally for 5 (5V) to obtain the wattage of your power supply.
One Led Chip is about 0.3W, If You Buy 5m 60Leds/m ( Total LED Strip is 300 Leds ), So 0.3W*300=90W.
Then, Choose the Right Led Power Supply:
If the Led Strip Works with DC5V Power, 90W / 5V=18A ( at Least 18A or more ).
The firmware for the nodemcu is WLED, a great project you can find at this page WLED Project.
Home Assistant Integration is not mandatory but allows you to add more automation and control your LEDs from outside your local network (if your HA is ready for external access)
So let’s start
Flash WLED on ESP8266
There are a bunch of options for this process, I’m going to use the Installer site
- Select last stable version
- Check Clean install (deletes presets and settings)
- Connect ESP8266 nodemcu to your PC using an USB cable
- Hold RST button on nodemcu board
- Click Install
- Select the COM port which your ESP8266 is connected to
- Click Connect
- Release RST button on nodemcu board
- Wait until process completion
If the process doesn’t starts, be sure to close all other programs that may use USB ports on your PC, for example having Cura slicer open will fail the process.
Alternatively you can use following tool/files:
- Download ESPHome Flasher tool (ESPHome-Flasher-1.4.0-Windows-x86.exe version at the time of this instruction)
- Download WLED binary firmware (WLED_0.12.0_ESP8266.bin version at the time of this instruction)
Connect to WLED server
- Connect to your ESP8266 trough the now available access point WLED-AP, type the default password wled1234
- Open a web browser and navigate to http://188.8.131.52, following Welcome page will come out
- Click on WIFI SETTINGS
- Type yout WI-FI SSID and Password
- Click Save & Reboot
- Open your router control panel and find out the new IP address assigned to the ESP8266 nodemcu, it will be listed named as “WLED…” device name
- Open a web browser window and type the IP address
- Click Config button
- Click LED Preferences button
- Type the Total LED count number (depending on your LEDs strip) and click Save
- Now go back to home page and have fun with different Colors and Effects
Wire your ESP and WLED
WS2811 and WS2812B LED use a 3 pin wire, for power and signal, the standard color code should be the following, but I suggest to double check the label on the LED itself because different manufacturer sometimes uses different colors.
Each strip is composed by 50 leds, the first one of the chain has a 3pin JST SM Male connector and 2 spare wire for power supply. It must be connected as following schema, DATA SIGNAL is pin D4 on nodemcu:
The last led of the chain has instead a 3pin JST SM Female connector so that you can add more strip.
I’ve used a little waterproof electrical box, adding two holes for the power connector and for LEDs wiring, sealed again with hot glue! This is the final results:
- If you have an Home Assistant server in your home you can now install the dedicated Integration and control your LEDS from everywhere and using you own Automation
- click in the ADD INTEGRATION button at this page
- click CONFIGURE
- Add discovered device to your HA
- Control ON/OFF, EFFECTS and add it to your Automations