Check out my YouTube channel https://www.youtube.com/channel/UC82xXciVxsQKthONKeYbhnw for how to videos about 3d modeling, printing and home automation
Update: I've started a series of how-to videos for this project, please check out the full playlist, including Hardware (https://youtu.be/WNp4G49tkrQ), Software (https://youtu.be/7dm9OPTRvUQ) and openHAB configuration (https://youtu.be/Lnv-2xBhabo) here: https://www.youtube.com/playlist?list=PLH-d6dcsARGNHlRyqTrwyiWJLNb1YpbPS
More info about the breakout board I designed and used in this project: https://youtu.be/cJbiTxJr2iA
This is a bit of a remix of my other design (https://www.thingiverse.com/thing:2539897), without an OLED screen and more compact (not as tall).
I designed this unit to house my NodeMCU carrier board (https://goo.gl/U2fY7y) with as little clearance as possible.The function for this unit is to act as an LED Strip controller, connected to my home automation system (openHAB) via MQTT.
The Arduino code is basically my fork of bruhautomation's excellent ESP LED controller code (https://github.com/bkpsu/ESP-MQTT-JSON-Digital-LEDs), with some specific modifications and fixes I made for my application (including speed/color control tweaks, fixing the flicker that was present in the original code when using my WS2812 strips, adding some of my own effects, and creating a group MQTT topic to control multiple strips with one command).
The sample openHAB configuration files can be found here: https://community.openhab.org/t/nodemcu-mqtt-led-strip-controller-build-config-how-to-videos/39902
So far, I've been using these as my Kitchen cabinet lights, but for 2017 season holiday decorations, rather than fight with strings of lights outside, I decided to take the "easy" way out and line all my windows and doors with these. I have a total of 10 controllers/strips, all synchronized (FX, power, animation speed) via MQTT, and automated from openHAB (different effects based on day of the week). I think it looks great and I may just keep these in all year, for regular accent lighting.
I'm using these WS2812 strips (http://amzn.to/2ilIvdf) because they're good quality, pretty cheap, and get here in 2 days with Prime (they appear to be combined from smaller lengths of strips, but that makes no difference to me. For the NodeMCU, check these links out -
NodeMCU ESP8266 dev board v0.9 ($6 & Prime from Amazon: http://amzn.to/2hd6RJk, $3 from AliExpress: https://goo.gl/fQGwBN) or 1.0 (http://amzn.to/2ymAkak).
Check out my (mostly functional) 3D designs - (https://www.thingiverse.com/bkpsu/designs) ! If you like them and want to support my projects, use one of the links below when you're planning to buy anything from these sites (it won't cost you anything extra!). Thank you in advance!
How to build controller
Parts List (Affiliate links to parts I've used/tested):
-5 meter 5V WS2812 LED Strip (http://amzn.to/2ilIvdf) (comes with 3-wire male connector you need to connect to the controller)
-NodeMCU breakout board (https://goo.gl/U2fY7y)
-NodeMCU ESP8266 dev board v0.9 ($6 & Prime from Amazon: http://amzn.to/2hd6RJk, $3 from AliExpress: https://goo.gl/fQGwBN) or 1.0 (http://amzn.to/2ymAkak).
-solid hook-up wire, 22awg (http://amzn.to/2xbTaAW)
-5V 10A power supply (use for longer lengths of strip, ~2M or greater) (http://amzn.to/2BXcrE9)
-Aluminum Channel (for mounting outside, and helps diffuse the single LEDs into a smoother light) (http://amzn.to/2l2UH77)
-DC connectors (male/female), for easy and modular setup (http://amzn.to/2iQNmmO)
Print enclosure and cover
Solder left/right inner headers onto the OSHPark carrier board (15 pins each)
Stick NodeMCU board onto carrier board, USB connector facing down when looking at the silk-screen text on the carrier board
Solder 3-pin male LED connector onto carrier board as follows and wrap connector around the headers and down the middle (between the headers and underneath the NodeMCU):
Board Wire Color OLED
5v Red VCC
Gnd White Gnd
D4 Green Din
(Your LED Strip connections/wire colors might be different)
Put NodeMCU carrier board in, ensuring it fits snugly (USB connector is visible)
Put enclosure cover on, and secure with small screws (or glue in place)
Connect the extra red/white (5VDC/Gnd) wires to your 5V power supply (either via a connector plug or directly to the power supply)
Program controller. I'm using the code here: https://github.com/bruhautomation/ESP-MQTT-JSON-Digital-LEDs with a few minor mods:
Line 0 (before any comment text) add:
"#define FASTLED_INTERRUPT_RETRY_COUNT 0" (this prevents flicker I've noticed with my strips)
Line "#define NUM_LEDS 54" <- change the number to your # of LEDs
Line "#define DATA_PIN 5" <- change this to 5 (D4 output on NodeMCU)
Line "#define CHIPSET WS2811" <- change to WS2812 or the type of LED you're using
Line "#define COLOR_ORDER GRB" <- change order of colors to match your strip (i.e. if you set a red color, but get a green instead and vice versa, just change "GRB" to "RGB")
After this, you will need to either incorporate the controller into your home automation system. I use openHAB (www.openhab.org), but this will work with any system that can send JSON commands to MQTT topics (or can be reprogrammed to use any other method of setting the effect, brightness or speed. Check out bruhAutomation's readme (located at the GitHub link above) for other examples.
If you do use openHAB, I've posted sample items/sitemap/rules configuration files here: https://community.openhab.org/t/nodemcu-mqtt-led-strip-controller-build-config-how-to-videos/39902