Weekend Project: Home Automation with Raspberry Pi and OpenHab

Weekend Project: Home Automation with Raspberry Pi and OpenHab

Hi, this is Wayne again with a topic “Weekend Project: Home Automation with Raspberry Pi and OpenHab”.
This week, we’ve got something special for you. This is the first video in a series that we’re putting together show you how to build your own home automation system using the open source software open tab, we’ll be building a Raspberry, Pi touchscreen command center. They can interface with over a hundred and fifty different smart home products and provides an interface for control and task scheduling instead of using an existing product, though we’ll build our own wirelessly controlled RGB LED strip that interfaces with openhab that allows you to control it from Any smartphone or computer on your network openhab is great because it interfaces with so many products. It’S free, it’s open source and it’s incredibly versatile. It also runs on Windows, OSX 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 set up. We also want to thank Aero for sponsoring this build they’ve, given us access to their vast inventory of electronic components.

In order to make this project series possible, we’re really excited to share what we’ve come up with 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 component from Aero or other online electronics vendors. You also need a few tools for soldering and programming microcontroller begin by assembling the Raspberry Pi touchscreen and mounting it to the PI, then download the latest build of raspbian from the Raspberry Pi website and flash it onto an SD card plug in a keyboard and Wi-Fi Adapter then insert the card into the pi and boot.

Weekend Project: Home Automation with Raspberry Pi and OpenHab

It up go through the configuration process for your setup in order to get the touchscreen to work, you’ll likely need to run a few commands in the command line to update raspbian after the update, restarting the PI. Will flip the screen upside down? If that’s a bother to you, you can flip it back by adding the line. Lcd underscore rotate equals 2 to the config dot text file in the boot folder. Now it’s time to install our home automation, control software openhab and the associated openhab add-ons we’ll be using. This gets a little command-line heavy so for a full list of commands.

Weekend Project: Home Automation with Raspberry Pi and OpenHab

Click on the link to the project instructions in the description below since the communication between our openhab server and our lights will occur over a messaging protocol called MQTT, we’ll need to install mosquito and MQTT broker. Finally, download our pre-made openhab configuration files in stall them in the Associated openhab folders, with openhab setup on a Raspberry Pi. It’S time to switch to building our neopixel strip controller.

Weekend Project: Home Automation with Raspberry Pi and OpenHab

The cheap Wi-Fi enabled at Adafruit esp8266 huzzah board is perfect for this, but because it uses 3.3 volt logic level, instead of the neopixel strips five volts will need to solder a logic level converter between them. Before we start that, though solder the provided header pins to the board, so we can program it using an FTDI adapter now on the low-level side of the converter. Pin to from the ESP will connect to a 1 pin 3 2 LV and ground to ground.

On the high side of converter, pen b1 is soldered to the neopixel data pin wire. That’S the striped wire on the neopixel, connector and ground will go to ground solder. A red wire to the HV pin on the converter and another red wire to the B on the ESP male end of the neopixel strip will also provide power for the ESB.

So solder, the red wire from the strip to the red wires coming from the V Plus and HV pins and the black wire goes to the ground on the ESP. After that plug the neopixel strip into the wall with a provided cord and make sure that the ESP is getting power by hitting the reset button to see if the on-board LED flashes with everything wired up it’s time to flash the ESP using the arduino ide. Take a moment to install the boards and libraries by following the links in the description and then open the provided, arduino sketch then edit, the sketch to include your Wi-Fi network settings and the PI’s IP address. You can check your PI’s IP address by typing IP space.

Addr space show into the command line, connect your computer to the ESP with an FTDI cable and set your board and port in the arduino ide put the ESP into programming mode by holding the GPIO 0 button down and pressing. The reset button then upload your code. After it’s flashed open a serial monitor and make sure that the board connects to your Wi-Fi network successfully with openhab configured in our neopixel strip on the network, it’s time to test it out, download the openhab app to your phone or tablet it’s available for both Android And iOS then open it and select settings in the upper right corner change. The open have URL field to your PI’s IP address, followed by a colon and 8080 exit the menu, and your phone should connect to openhab bringing up your led controller.

Alternatively, you can also control the LEDs from any computer on the same network, including the pi, by entering the PI’s IP address, followed by slash openhab app question. Mark sitemap equals home. I know a lot of you probably thinking that there are a lot easier ways to control RGB LED strips wirelessly, but there’s a reason we decided to do it this way. Openhab is extremely versatile and we’ve only just scratched the surface of the things you can do with it. You can control things with voice commands, monitor sensor networks, even set up rules for automating devices from email or if t8 events in future videos we’ll show you how to build other cool devices that connect to openhab, make your house even smarter. That’S it for this time, we’ll see you in the next weekend project. If you liked this video subscribe to our website or send us a comment on Facebook or Twitter be sure to check out our other project, videos or visit us on make zine calm. .