How to scale one LED strip to 20 strips
59sSmart home users constantly worry about expanding past one device, and this shows adding strips is just repeated steps—a huge FAQ answered.
▶ Play Clip"Delivers a thorough step-by-step tutorial as promised, though some sections assume prior knowledge."
This video tutorial demonstrates how to configure the software for an LED Strip Control device using a Mac, MQTT, and OpenHAB. It walks through flashing firmware to an ESP8266 via Arduino, setting up MQTT parameters, and integrating multiple LED strips into OpenHAB for full UI control.
Matt from MKSmartHouse demonstrates how to set up software for LED Strip Control on a Mac. The video covers connecting two LED strips to OpenHAB, and the process can be repeated for up to 20 strips.
You need an Arduino (UNO or MEGA compatible), USB cable, and male-to-male DuPont jumper cables. Links are available on the website or description.
Connect a jumper cable from the Arduino RES pin, then connect TX to TX, RX to RX, GND to GND, and 3.3V to 3.3V. Verify the 2-pin jumper is above PGM.
The video assumes Arduino IDE is already set up. If not, watch the separate 'Door Sensor' software video for detailed setup instructions.
Download the LED Strip Control Firmware from the MKSmartHouse website. Open the file MK-LEDStripControl.ino from the Downloads folder.
Change the SSID and password in the code. The ESP8266 only works on 2.4GHz WiFi, so do not use the 5GHz network. Only change text inside quotation marks.
In the code's comment block, set the hostname, update path, UI username/password, MQTT subscribeTopic, MQTT server IP address, and a unique device ID to differentiate each device.
In Arduino IDE select Board: 'Generic ESP8266 Module' and the correct port (e.g., /dev/cu.wchusbserialXXXX). Click the upload button and wait for 'Done uploading'.
Use MQTT.fx to subscribe to the MQTT server with topic '#'. Publish the message '100;100;100;' to the first device's subscribeTopic to test it. Repeat for the second device.
SSH into the server and edit /etc/openhab2/items/home.items. For each LED strip create three items: a Group item, a Color item, and a String item that receives the MQTT command.
Edit /etc/openhab2/sitemaps/home.sitemap and add 'Colorpicker item=MKLEDStripControl1Color' and similar lines inside the desired frame (e.g., MK-Room).
In /etc/openhab2/rules/home.rules, add rules for each LED strip that convert the HSB value from the color picker into RGB values, format them as a string, and send via MQTT.
In Basic UI, use the UP button to turn the strip on, DOWN to turn off, and the color picker circle to change colors. The software setup is complete.
The video successfully demonstrates a scalable way to control multiple LED strips via MQTT and OpenHAB. By repeating the firmware and configuration steps, users can manage up to 20 devices from a single dashboard.
Which WiFi band does the ESP8266 support?
2.4GHz
02:39
What command is used to test an LED strip after flashing?
Publish '100;100;100;' to the device's subscribeTopic in MQTT.fx
05:48
What three OpenHAB items are needed for each LED strip?
Group, Color, and String items
06:39
What is the purpose of the Color item in OpenHAB?
It handles user interaction in the user interface (e.g., the color picker).
06:54
How do you differentiate multiple LED strip devices on the MQTT server?
By changing the last digit of the unique device ID.
03:55
What board selection must be made in Arduino IDE for the ESP8266?
Generic ESP8266 Module
04:11
Scalable setup
The same steps can be repeated to connect up to 20 LED strips, making this guide highly valuable for large home automation projects.
00:21ESP8266 WiFi limitation
Emphasizes that the ESP8266 only works on 2.4GHz, a common mistake that causes connection failures.
02:39Three-item OpenHAB pattern
Shows that each device in OpenHAB needs a group, color, and string item to separate UI interaction from MQTT communication.
06:14Complete UI control
Demonstrates the final user experience with UP/DOWN buttons and a color picker, proving the software setup works end-to-end.
08:51[00:00] Hey guys Matt here from MKSmartHouse.com and in this video I am going to show you how to setup the software for the LED Strip Control using a MAC. So in the last video we left off with the LED Strip Control Device being fully built
[00:21] so all it needs is firmware and to be connected to the home automation server. Many of you have been asking what to do if you were to connect more than 1 of any of So in this video I am going to show you how to connect 2 LED Strips to openhab, you can
[00:37] repeat the steps for the second one to add even 20 LED Strips. I recommend having my website open up so that way you have all the steps and commands ready, and so you do not have to type in everything you can just copy and paste.
[00:52] I know this is the software video but, there are some hardware things that we need besides We are going to need an arduino of some kind preferably a UNO or a MEGA equivalent with
[01:04] its usb cable of course and male to male dupont jumper cables. Links to these items will be in the description or on the website. On my website you will also find my shop where you can find the kit, and pcb to make this
[01:20] The first thing we are going to do is grab the arduino and put a jumper cable from RES Then grab the LED Strip Control and connect all the pins to their corresponding spots
[01:32] so, TX to TX, RX to RX, GND to GND, and 3.3V to 3.3V. Before we continue, check to make sure the 2 pin jumper is above PGM.
[01:44] Please note that in this video I will not go over how to setup the arduino IDE and will assume that it is set up and you know how to connect an arduino to it. If you do not know how to set it up or it is not setup then go check out my Door sensor
[01:58] software video where I go in detail of the entire process. Recently people have been telling me that they cannot compile the arduino code I have That is because your Arduino IDE is not setup, so if you are having this issue please go
[02:12] watch my door sensor software video I show exactly how to set it up. Next we are going to head over to my site, the link is in the description to the exact page and press the download LED Strip Control Firmware.
[02:25] Then go to your finder and downloads folder and double click on MK-LEDStripControl.ino. A pop up will come up asking if you want to put it in a folder, click OK.
[02:39] have to change. The first thing is the wifi settings which are the ssid and password so change those Please keep in mind that the esp8266 only works on 2.4ghz so type in your 2.4ghz wifi
[02:58] ssid and password not your 5ghz. Also when adding the information only change what is inside the quotation marks. The devices I designed are great because I implemented a web user interface for each
[03:14] individual device so that way if you ever have to flash new firmware you just go to The web address information is found at that top of the code in the giant comment block.
[03:26] The first parameter is the hostname of the device, usually I only change the last digit but since this is the first LED Strip Control I will keep it as it is. Next is the update path and personally I don’t change that.
[03:39] After that is the web user interface username and password, these are the credentials you 9. The first one is the subscribeTopic and this is the topic for which the device listens
[03:55] 10. The next one is the MQTT Server Ip address and this is simply the IP address of your The last one is the Unique device ID and this simply differentiates each device on the MQTT
[04:11] side, I usually just change the last digit for every single device. So go to tools and make sure the Board: is Generic ESP8266 Module and the port is /dev/cu.wchusbserialXXXX.
[04:30] Once those are good press the upload button, it is the one with an arrow pointing to the When it is uploading you should see dots moving at the bottom and some percents. After it is done uploading you should see it say 100% and Done uploading.
[04:44] Great now unplug the Arduino and the dupont wires from the first LED Strip and make sure the jumper is over PGM on the second LED Strip and connect the dupont wires to their corresponding
[04:56] Now let's make some changes for the second LED Strip so connect the arduino again. First change the number in the host from a 1 to a 2.
[05:08] Lastly, increment the device ID. Now upload the code the same way you did the first one. Once it finished uploading unplug the arduino as well as the dupont wires.
[05:21] 17. To confirm that it flashed correctly and is working you can fire up MQTT.fx, connect to
[05:33] the server and in the subscribe section type in # and press subscribe. If you do not have MQTT.fx then check out my Home Automation Server Setup Guide. 19.
[05:48] In the topic bar type in the subscribeTopic that we wrote in the first LED Strip Control Next in the message box type in 100;100;100; and press publish.
[06:02] In the topic bar type in the subscribeTopic that we wrote in the second LED Strip control This LED Strip should have also changed color.
[06:14] Now the devices are complete and just need to be added to OpenHAB. So ssh into your pi or whatever your server may be. 23.
[06:26] So type in sudo nano /etc/openhab2/items/home.items and press enter, you may need to type in admin password. //LED Strip Control Group MKLEDStripControl1Group "Desk LED Strip"
[06:39] (All) Color MKLEDStripControl2Color "Cubes LED Strip" Now let me go over the items we created. Each LED Strip has 3 Items that go along with it.
[06:54] The first item is a group item and what this does is group all the items for the LED Strip The next item is a color item and it is the item that deals with your interaction with the user interface, this is the item we will use in the sitemap file.
[07:10] The last item is a string item and this is the item where the MQTT command will be sent to, as you can see the subscribeTopic is at the end. Now press control x then y and enter.
[07:24] Next up is the sitemap file so we can control the device. Type in sudo nano /etc/openhab2/sitemaps/home.sitemap and press enter. If you are following along with my series then we have many different frames in our
[07:40] I am going to put the device in the frame called MK-Room. So go to the frame and type in: Colorpicker item=MKLEDStripControl1Color Colorpicker item=MKLEDStripControl2Color and press enter, what we did is import the
[07:55] item into the sitemap so we can control it from the user interface in the form of a color Now press control x then y and enter. the color picker into MQTT the device can understand.
[08:13] In terminal type in sudo nano /etc/openhab2/rules/home.rules and press enter. var int blueValue var String RGBvalues
[08:26] In the bottom of the file type in: rule "MKLEDStripControl1" greenValue = hsbValue.green.intValue blueValue = hsbValue.blue.intValue rule "MKLEDStripControl2" when
[08:39] blueValue = hsbValue.blue.intValue RGBvalues= redValue.toString + ";" + greenValue.toString the colorpicker and send them through MQTT. 29. and then Basic UI.
[08:51] If you press the UP button it turns the LED strip on, If you press the DOWN button it turns the LED Strip off, and if you press the circle it brings up a color picker and That is it!
[09:06] The software is complete, now all we have to do is install the device in its final place Alright thank you for watching and If you have any questions leave them in the comments Good Bye!
⚡ Saved you 0h 09m reading this? Transcribe any YouTube video for free — no signup needed.