---
title: 'Complete Guide LED Strip Control MQTT OpenHAB ESP8266 : Software MAC'
source: 'https://youtube.com/watch?v=Xtq1b8tSYsU'
video_id: 'Xtq1b8tSYsU'
date: 2026-08-01
duration_sec: 562
---

# Complete Guide LED Strip Control MQTT OpenHAB ESP8266 : Software MAC

> Source: [Complete Guide LED Strip Control MQTT OpenHAB ESP8266 : Software MAC](https://youtube.com/watch?v=Xtq1b8tSYsU)

## Summary

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.

### Key Points

- **Introduction and Scope** [00:00] — 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.
- **Required Hardware** [00:52] — 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.
- **Wiring the Arduino to the LED Strip Controller** [01:20] — 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.
- **Arduino IDE Prerequisite** [01:44] — The video assumes Arduino IDE is already set up. If not, watch the separate 'Door Sensor' software video for detailed setup instructions.
- **Downloading the Firmware** [02:12] — Download the LED Strip Control Firmware from the MKSmartHouse website. Open the file MK-LEDStripControl.ino from the Downloads folder.
- **Configuring WiFi Settings** [02:39] — 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.
- **Device Parameters** [03:26] — 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.
- **Uploading the Firmware** [04:30] — 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'.
- **Testing with MQTT.fx** [05:21] — 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.
- **Creating OpenHAB Items** [06:26] — 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.
- **Adding Colorpickers to Sitemap** [07:24] — Edit /etc/openhab2/sitemaps/home.sitemap and add 'Colorpicker item=MKLEDStripControl1Color' and similar lines inside the desired frame (e.g., MK-Room).
- **Writing Rules for HSB to RGB Conversion** [08:13] — 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.
- **Final UI Control** [08:51] — 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.

### Conclusion

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.

## Transcript

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
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
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.
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
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
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
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.
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
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
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.
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.
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
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
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.
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.
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
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
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.
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.
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
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.
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.
17. To confirm that it flashed correctly and is working you can fire up MQTT.fx, connect to
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.
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.
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.
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.
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"
(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.
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.
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.
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
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
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.
In terminal type in sudo nano /etc/openhab2/rules/home.rules and press enter. var int blueValue var String RGBvalues
In the bottom of the file type in: rule "MKLEDStripControl1" greenValue = hsbValue.green.intValue blueValue = hsbValue.blue.intValue rule "MKLEDStripControl2" when
blueValue = hsbValue.blue.intValue RGBvalues= redValue.toString + ";" + greenValue.toString the colorpicker and send them through MQTT. 29. and then Basic UI.
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!
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!
