Table of Contents

OpenHAB, MQTT, Arduino and ESP8266

This article is from Make Magazine. The original file is here:

Using the open source software OpenHAB, we’ll be building a Raspberry Pi touchscreen command center that can interface with over 150 different “smart home” products, and provide an interface for control and task scheduling. Instead of using an existing product though, we’ll build our own WiFi enabled RGB LED strip that interfaces with OpenHAB, allowing you to wirelessly control it from your smartphone or any computer on your network.

OpenHAB is great because it interfaces with so many products, it’s free, it’s open source, and extremely flexible. It also runs on Windows, OS X, and Linux, so you don’t necessarily have to use a Raspberry Pi for this project. If you have an old laptop or desktop kicking around, you can just as easily run the same setup.

The main parts for this build are a Raspberry Pi and touchscreen, as well as the components used to control the NeoPixel strip. You can purchase the components from Arrow, or other online electronics vendors. You’ll also need a few tools for soldering and programming the microcontroller.

Step #1: Assemble the Raspberry Pi and touchscreen

Step #2: Setup the microSD card and configure Raspbian

Step #3: Install OpenHAB


Now it’s time to install our home automation control software, OpenHAB, and the OpenHAB addons we’ll be using.

Now we'll enter a few more commands to configure OpenHAB to run at startup: sudo wget http://www.element14.com/community/servlet/JiveServlet/download/38-152207/openhab.zip unzip openhab.zip sudo rm openhab.zip sudo cp openhab.sh /etc/init.d sudo chmod 777 /etc/init.d/openhab.sh sudo update-rc.d -f openhab.sh defaults We'll also need to install the OpenHAB MQTT addons, since that's the protocol we'll be using to communicate with our LED strip: sudo wget https://bintray.com/artifact/download/openhab/bin/distribution-1.7.1-addons.zip sudo unzip distribution-1.7.1-addons.zip -d /addons sudo cp /addons/org.openhab.binding.mqtt-1.7.1.jar /opt/openhab/addons sudo cp /addons/org.openhab.persistence.mqtt-1.7.1.jar /opt/openhab/addons sudo rm distribution-1.7.1-addons.zip