TubeSum ← Transcribe a video

Complete Guide Blinds Control MQTT OpenHAB ESP8266 : Software MAC

0h 08m video Published Sep 14, 2017 Transcribed Aug 1, 2026 M MK-SmartHouse
Intermediate 4 min read For: DIY smart home enthusiasts comfortable with Arduino IDE, basic terminal commands, and OpenHAB configuration on a Raspberry Pi.
AI Trust Score 70/100
⚠️ Average / Some Fluff

"Delivers exactly what the title promises — a complete, Mac-specific software guide for the Blinds Control — albeit with a few dry and repetitive moments."

AI Summary

This video walks through the complete software setup for a DIY Blinds Control device powered by an ESP8266, from wiring an Arduino programmer and flashing firmware to integrating the controller with OpenHAB via MQTT. It covers WiFi and MQTT configuration, uploading the sketch on a Mac, testing with MQTT.fx, and adding automation rules. The guide assumes familiarity with the Arduino IDE and basic terminal commands.

[00:00]
Introduction

The video shows how to set up the software for the Blinds Control device on a Mac, continuing from a previous video where the hardware was fully built.

[00:30]
Hardware Needed

You need an Arduino UNO or MEGA equivalent, its USB cable, and male-to-male dupont jumper cables. Links are available on the website or in the description.

[00:58]
Wiring the Blinds Control

Connect a jumper cable from RES on the Arduino to the Blinds Control, then connect TX to TX, RX to RX, GND to GND, and 5V to 5V. Make sure the 2-pin jumper is above PGM before continuing.

[01:36]
Downloading the Firmware

Go to the website page linked in the description, download the Blinds Control Firmware, unzip it, and open the code. The video assumes Arduino IDE is already set up.

[02:02]
Configuring WiFi

Change the SSID and password inside the quotation marks. The ESP8266 only works on 2.4GHz, so enter the 2.4GHz network credentials, not 5GHz.

[02:39]
Web UI Credentials

The web address information is in the giant comment block at the top of the code. Set the hostname (usually changing only the last digit) and the web UI username and password.

[03:08]
MQTT Settings

Set the subscribeTopic (the topic the device listens to), the MQTT Server IP address, and the Unique device ID. Only change what's inside quotation marks.

[03:40]
Uploading Firmware

In Arduino IDE, select the Board as Generic ESP8266 Module and the port as /dev/cu.wchusbserialXXXX, then press the upload button until it shows 100% and Done uploading.

[04:08]
Run Mode and Testing

Unplug the dupont wires between the Arduino and the device, then move the 2-pin jumper to RUN. Test with MQTT.fx by subscribing to # and publishing any number from 0 to 100 to the subscribeTopic.

[04:57]
Adding Item to OpenHAB

SSH into the Pi and edit /etc/openhab2/items/home.items. Add a Dimmer item with the MQTT binding line, for example: Dimmer MKBlindsControl1 "MK Blinds [%s]" <rollershutter> [ "Lighting" ] {mqtt=">[broker:MK-SmartHouse/utilities/MK-BlindsControl1:command:*:default]"}

[06:25]
Adding Sitemap Control

Edit /etc/openhab2/sitemaps/home.sitemap and add a Slider item inside the desired frame, using the item name such as Slider item=MKBlindsControl1, possibly with mappings like 50="Half", 100="Close".

[07:31]
Automation Rules

Edit /etc/openhab2/rules/home.rules and add a cron rule, for example: Time cron "0 0 7 1/1 * ? *" then sendCommand(MKBlindsControl1, 100). This sets the blinds to half at 7am every day.

Once the firmware is flashed, the Blinds Control device can be integrated into OpenHAB via MQTT, allowing manual control through buttons and sliders as well as automated scheduling via cron rules. The software setup is complete and the device is ready for final installation.

Mentioned in this Video

Tutorial Checklist

1 00:58 Wire the Arduino to the Blinds Control: connect a jumper from RES, then TX-TX, RX-RX, GND-GND, and 5V-5V. Ensure the 2-pin jumper is above PGM.
2 01:36 Download the Blinds Control Firmware from the website, unzip it, and open the code in Arduino IDE.
3 02:02 Change the SSID and password inside quotation marks, using your 2.4GHz WiFi credentials.
4 02:39 Set the hostname, web UI username, and password in the comment block at the top of the code.
5 03:08 Configure the MQTT settings: subscribeTopic, MQTT Server IP address, and Unique device ID.
6 03:40 In Arduino IDE, set Board to Generic ESP8266 Module and Port to /dev/cu.wchusbserialXXXX, then click Upload.
7 04:08 Unplug the dupont wires and move the 2-pin jumper above RUN.
8 04:26 Use MQTT.fx to connect to the server, subscribe to #, and publish any number 0-100 to the subscribeTopic to test the device.
9 04:57 SSH into the Pi and run: sudo nano /etc/openhab2/items/home.items, then add a Dimmer item with the MQTT binding line.
10 06:25 Edit the sitemap with: sudo nano /etc/openhab2/sitemaps/home.sitemap, and add a Slider item for the Blinds Control.
11 07:31 Add a rule in /etc/openhab2/rules/home.rules using a cron expression, e.g., Time cron "0 0 7 1/1 * ? *" then sendCommand(MKBlindsControl1, 100).

Study Flashcards (13)

What Arduino boards are recommended for flashing the Blinds Control?

easy Click to reveal answer

Arduino UNO or MEGA equivalent.

00:30

Which pins on the Arduino connect to the Blinds Control?

medium Click to reveal answer

TX to TX, RX to RX, GND to GND, 5V to 5V, plus a jumper from RES.

00:58

What WiFi frequency band does the ESP8266 support?

easy Click to reveal answer

Only 2.4GHz, not 5GHz.

02:23

What parameters are found in the comment block at the top of the firmware code?

medium Click to reveal answer

Hostname, web UI username, and password.

02:39

What MQTT parameters need to be configured?

medium Click to reveal answer

subscribeTopic, MQTT Server IP address, and Unique device ID.

03:08

What Board and Port settings are used in Arduino IDE on a Mac?

hard Click to reveal answer

Generic ESP8266 Module and /dev/cu.wchusbserialXXXX.

03:40

What must be done with the 2-pin jumper after uploading?

easy Click to reveal answer

Move it from PGM to RUN.

04:08

What should you type in MQTT.fx to subscribe to all topics?

easy Click to reveal answer

# (hash).

04:26

What message range can be published to control the blinds?

easy Click to reveal answer

Any number from 0 to 100.

04:43

What OpenHAB item type is used for the Blinds Control?

medium Click to reveal answer

Dimmer.

05:27

What does the item tag allow the item to be used with?

medium Click to reveal answer

HomeKit (and other integrations if configured).

05:59

What controls are available in the sitemap for the Blinds Control?

easy Click to reveal answer

Three buttons (e.g., Open/Half/Close) and a slider.

07:01

What cron expression sets the blinds to half at 7am daily?

hard Click to reveal answer

0 0 7 1/1 * ? *

07:49

💡 Key Takeaways

📊

ESP8266 WiFi Band Limitation

A critical practical detail: the ESP8266 only supports 2.4GHz WiFi, a common source of setup failure.

02:23
🔧

PGM to RUN Jumper Switch

A simple but essential hardware step that ensures the device boots the newly flashed firmware instead of staying in programming mode.

04:08
💡

Using a Dimmer Item for Blind Position

Explains the design choice of using a Dimmer item to represent a servo position on a 0-100 scale, making integration intuitive.

05:27
🔧

Cron-Based Automation in OpenHAB

Shows how to schedule the blinds using a cron expression, enabling fully automated home routines.

07:31

[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 Blinds Control using a MAC. [Intro]

[00:15] So in the last video we left off with the Blinds Control Device being fully built so all it needs is firmware and to be connected to the home automation server. I recommend having my website open up so that way you have all the steps and commands ready,

[00:30] 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

[00:44] 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, pcb and 3D printed parts

[00:58] The first thing we are going to do is grab the arduino and put a jumper cable from RES Then grab the Blinds Control and connect all the pins to their corresponding spots so,

[01:10] TX to TX, RX to RX, GND to GND, and 5V to 5V. Before we continue, check to make sure the 2 pin jumper is above PGM.

[01:23] 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:36] software video where I go in detail of the entire process. Next we are going to head over to my site, the link is in the description to the exact page and press the download Blinds Control Firmware.

[01:49] On the new page press download.Then go to your finder and downloads folder and double A pop up will come up asking if you want to put it in a folder, click OK.

[02:02] It should bring up the code for the Blinds Control, and there are only a few things we 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:23] 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

[02:39] 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

[02:55] but since this is the first Blinds Control I will keep it as it is. After that is the web user interface username and password, these are the credentials you

[03:08] The next set of parameters are for mqtt. The first one is the subscribeTopic and this is the topic for which the device listens The next one is the MQTT Server Ip address and this is simply the IP address of your

[03:26] 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.

[03:40] So go to tools and make sure the Board: is Generic ESP8266 Module and the port is /dev/cu.wchusbserialXXXX.

[03:54] 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:08] First unplug the dupont wires in between the arduino and the device. Then take the 2 pin jumper and move it over so it is above RUN. To confirm that it flashed correctly and is working you can fire up MQTT.fx, connect to

[04:26] 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. In the topic bar type in the subscribeTopic that we wrote in the blinds control device

[04:43] Next in the message box type in any number 0 - 100 and press publish. Now the device is complete and just needs to be added to OpenHAB.

[04:57] So ssh into your pi or whatever your server may be. So type in sudo nano /etc/openhab2/items/home.items and press enter, you may need to type in admin

[05:13] Then type in the comment //Blinds Controls then underneath that we are going to create So type in Dimmer MKBlindsControl1 "MK Blinds [%s]" &lt;rollershutter&gt; [ "Lighting" ] {mqtt="&gt;[broker:MK-SmartHouse/utilities/MK-BlindsControl1:command:*:default]"}

[05:27] It will allow us to control the Blinds Control. But let me go a little bit more in detail, the first part is Dimmer and since this device is a Blinds Control we need to control the position of the servo motor with numbers.

[05:43] The next part is the item name and I just used its hostname without the dash. After that is the label text and it is what shows up in the interface and how it is formatted Next to that is the icon name which is what picture shows up in the interface.

[05:59] After that is the item tag and what this does is allow this item to be used with home kite If you do not have either of those setup then you can check out my videos covering those

[06:12] Then lastly, we have the mqtt path to the device in there is the subscribeTopic that I have two blinds controls so I will paste it in again and change the item name, label

[06:25] text as well as the mqtt path to match that device’s subscribe topic. Now press control x then y and enter. Type in sudo nano /etc/openhab2/sitemaps/home.sitemap and press enter.

[06:47] 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. 56="Half", 100="Close"] Slider item=MKBlindsControl1

[07:01] and press enter, what we did is import the item into the sitemap so we can control it The controls it has is you can either press one of the three buttons, or use the slider. Again, since I have two I will also put the text in the JK-Room frame and change the numbers.

[07:19] Before we go any further let's confirm that everything works so go to your web user interface You should see the Blinds Control item.

[07:31] If you press the buttons and move the slider you should see the servo move. Now that we know the Blinds Control works let's make it automatically open and close In terminal type in sudo nano /etc/openhab2/rules/home.rules and press enter.

[07:49] Time cron "0 0 7 1/1 * ? *" then then sendCommand(MKBlindsControl1, 100) Let me explain what this does, the first rule sets the blinds to half everyday at 7 am the

[08:01] If you want to change the times for the rules go watch my sprinkler system software video where I show you how to change cron expressions. Now press control x then y and enter.

[08:18] 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

[08:31] Good Bye!

More from MK-SmartHouse

View all

⚡ Saved you 0h 08m reading this? Transcribe any YouTube video for free — no signup needed.