This is an old revision of the document!
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
- Without instructions, assembling and attaching the screen to the Raspberry Pi can be a bit tricky.
- Start with the screen face down and flip the display controller board over so that the large connector is visible. Connect the large ribbon cable from the screen to the controller, being sure to push the cable in fully and securing it with the clip on the connector.
- Flip the display controller board onto the back of the screen, and push the small touchscreen cable into its connector. Screw the standoffs into the back of the screen, through the holes in the controller board.
- Insert the ribbon cable into the display connector on the side of the controller board, then place the Pi on top of the standoffs and screw it in. Connect the other end of the ribbon cable to the display connector on the Pi.
- In order to run power and ground to the touchscreen, we'll use the GPIO pins on the Pi. Take the red jumper wire that came with the screen, and plug it into the rightmost lower 5V GPIO pin on the Pi, then plug the other end into the rightmost pin on the controller board below it. Use the black jumper wire to connect the GPIO GND pin (two pins over from the red wire 5V pin) on the Pi to the leftmost pin on the controller board below it.