diff --git a/images/1120x350_72ppi_blank.xcf b/images/1120x350_72ppi_blank.xcf new file mode 100644 index 0000000..96d5e46 Binary files /dev/null and b/images/1120x350_72ppi_blank.xcf differ diff --git a/images/1120x630_72ppi_blankl.xcf b/images/1120x630_72ppi_blankl.xcf new file mode 100644 index 0000000..322fc65 Binary files /dev/null and b/images/1120x630_72ppi_blankl.xcf differ diff --git a/images/1920x1080_72ppi_blank.xcf b/images/1920x1080_72ppi_blank.xcf new file mode 100644 index 0000000..13a68b2 Binary files /dev/null and b/images/1920x1080_72ppi_blank.xcf differ diff --git a/images/500x350_72popu_blank.xcf b/images/500x350_72popu_blank.xcf new file mode 100644 index 0000000..8b164fa Binary files /dev/null and b/images/500x350_72popu_blank.xcf differ diff --git a/images/alternativeraspberrydisplaycase.jpg b/images/alternativeraspberrydisplaycase.jpg new file mode 100644 index 0000000..739a153 Binary files /dev/null and b/images/alternativeraspberrydisplaycase.jpg differ diff --git a/images/bluetoothkeyboard.jpg b/images/bluetoothkeyboard.jpg new file mode 100644 index 0000000..434fc6f Binary files /dev/null and b/images/bluetoothkeyboard.jpg differ diff --git a/images/ethernetcable.jpg b/images/ethernetcable.jpg new file mode 100644 index 0000000..b3b691f Binary files /dev/null and b/images/ethernetcable.jpg differ diff --git a/images/externaldisplay.jpg b/images/externaldisplay.jpg new file mode 100644 index 0000000..c8ca621 Binary files /dev/null and b/images/externaldisplay.jpg differ diff --git a/images/hdmicable.jpg b/images/hdmicable.jpg new file mode 100644 index 0000000..7256819 Binary files /dev/null and b/images/hdmicable.jpg differ diff --git a/images/ledwifi.jpg b/images/ledwifi.jpg new file mode 100644 index 0000000..559936b Binary files /dev/null and b/images/ledwifi.jpg differ diff --git a/images/microsdcard.jpg b/images/microsdcard.jpg new file mode 100644 index 0000000..6902eee Binary files /dev/null and b/images/microsdcard.jpg differ diff --git a/images/pi3.jpg b/images/pi3.jpg new file mode 100644 index 0000000..781c9c6 Binary files /dev/null and b/images/pi3.jpg differ diff --git a/images/powersupply.jpg b/images/powersupply.jpg new file mode 100644 index 0000000..300c591 Binary files /dev/null and b/images/powersupply.jpg differ diff --git a/images/raspberrycase.jpg b/images/raspberrycase.jpg new file mode 100644 index 0000000..51f69dc Binary files /dev/null and b/images/raspberrycase.jpg differ diff --git a/images/raspberrydisplay.jpg b/images/raspberrydisplay.jpg new file mode 100644 index 0000000..0ff83e0 Binary files /dev/null and b/images/raspberrydisplay.jpg differ diff --git a/images/raspberrydisplaycase.jpg b/images/raspberrydisplaycase.jpg new file mode 100644 index 0000000..b13c9c1 Binary files /dev/null and b/images/raspberrydisplaycase.jpg differ diff --git a/images/raspberrypi3gpio.jpg b/images/raspberrypi3gpio.jpg new file mode 100644 index 0000000..7c15a5a Binary files /dev/null and b/images/raspberrypi3gpio.jpg differ diff --git a/images/raspberrypi3interfaces.jpg b/images/raspberrypi3interfaces.jpg new file mode 100644 index 0000000..5e7a61e Binary files /dev/null and b/images/raspberrypi3interfaces.jpg differ diff --git a/images/raspbiandownload.jpg b/images/raspbiandownload.jpg new file mode 100644 index 0000000..7268205 Binary files /dev/null and b/images/raspbiandownload.jpg differ diff --git a/images/rgbledstripe.jpg b/images/rgbledstripe.jpg new file mode 100644 index 0000000..fadf3fc Binary files /dev/null and b/images/rgbledstripe.jpg differ diff --git a/images/rx-v581.jpg b/images/rx-v581.jpg new file mode 100644 index 0000000..16e93de Binary files /dev/null and b/images/rx-v581.jpg differ diff --git a/images/samsungtv.jpg b/images/samsungtv.jpg new file mode 100644 index 0000000..4eba686 Binary files /dev/null and b/images/samsungtv.jpg differ diff --git a/images/usbkeyboard.jpg b/images/usbkeyboard.jpg new file mode 100644 index 0000000..45b83d1 Binary files /dev/null and b/images/usbkeyboard.jpg differ diff --git a/images/usbmouse.jpg b/images/usbmouse.jpg new file mode 100644 index 0000000..2a97e7e Binary files /dev/null and b/images/usbmouse.jpg differ diff --git a/images/whiteledstripe.jpg b/images/whiteledstripe.jpg new file mode 100644 index 0000000..db24861 Binary files /dev/null and b/images/whiteledstripe.jpg differ diff --git a/images/writeimage.jpg b/images/writeimage.jpg new file mode 100644 index 0000000..5e0b904 Binary files /dev/null and b/images/writeimage.jpg differ diff --git a/images/writeimage2.jpg b/images/writeimage2.jpg new file mode 100644 index 0000000..a92edb3 Binary files /dev/null and b/images/writeimage2.jpg differ diff --git a/images/z-wave_aeon_labs_z-stick_gen5.jpg b/images/z-wave_aeon_labs_z-stick_gen5.jpg new file mode 100644 index 0000000..5fc09ab Binary files /dev/null and b/images/z-wave_aeon_labs_z-stick_gen5.jpg differ diff --git a/images/z-wave_fibaro_double_switch_2.jpg b/images/z-wave_fibaro_double_switch_2.jpg new file mode 100644 index 0000000..a66c0cb Binary files /dev/null and b/images/z-wave_fibaro_double_switch_2.jpg differ diff --git a/images/z-wave_keyfob_zw088_by_aeotec.jpg b/images/z-wave_keyfob_zw088_by_aeotec.jpg new file mode 100644 index 0000000..f020ced Binary files /dev/null and b/images/z-wave_keyfob_zw088_by_aeotec.jpg differ diff --git a/images/z-wave_plus_aeotec_multi-sensor_6_zw100-c.jpg b/images/z-wave_plus_aeotec_multi-sensor_6_zw100-c.jpg new file mode 100644 index 0000000..761b200 Binary files /dev/null and b/images/z-wave_plus_aeotec_multi-sensor_6_zw100-c.jpg differ diff --git a/images/z-wave_plus_uzb_usb_stick_by_z-wave.me.jpg b/images/z-wave_plus_uzb_usb_stick_by_z-wave.me.jpg new file mode 100644 index 0000000..492e656 Binary files /dev/null and b/images/z-wave_plus_uzb_usb_stick_by_z-wave.me.jpg differ diff --git a/images/z-wave_razberry_2_daughterboard_by_z-wave.me.jpg b/images/z-wave_razberry_2_daughterboard_by_z-wave.me.jpg new file mode 100644 index 0000000..574def3 Binary files /dev/null and b/images/z-wave_razberry_2_daughterboard_by_z-wave.me.jpg differ diff --git a/images/z-wave_smartplug_by_nodon.jpg b/images/z-wave_smartplug_by_nodon.jpg new file mode 100644 index 0000000..fcf583b Binary files /dev/null and b/images/z-wave_smartplug_by_nodon.jpg differ diff --git a/openHAB2_beginners_walkthrough.md b/openHAB2_beginners_walkthrough.md index 7fd569a..2d3cbc4 100644 --- a/openHAB2_beginners_walkthrough.md +++ b/openHAB2_beginners_walkthrough.md @@ -5,9 +5,146 @@ layout: tutorial-beginner {% include base.html %} --- -Markdown Syntax compilation test for Jekyll +openHAB2 Raspberry beginner’s walkthrough – (Using Raspberry Pi 3 with openHAB2 and Z-Wave, WiFi LED, Samsung TV and YahooWeather bindings for a home automation project) --- +# Chapter 1: Before you start +## Is openHAB2 the right choice for my home automation project? +Be aware that openHAB2 is an OPEN home automation solution which is strongly living from a very supportive community. If you want to have a plug and play solution with supplier guaranteed service level and a high likeliness that all the features are working and all the hardware is compatible, you might be better off in getting a ready to use home automation kit including the designated controller (like e.g. devolo or homematic IP). Consider this especially if you are planning to do safety related automation or emergency detection like fire alarm. +If you, on the other hand, are willing to spend a few hrs/days in learning how to do a little installation and coding yourself and have no problems with the service level of a Raspberry Pi 3 (it is not as failsafe as other controllers) you might find a perfect environment with openHAB2 for your low cost, very flexible and continuously improving home automation environment. + +## Introduction: +This tutorial is targeting beginners like me to get a step by step guideline to get all the things installed. Since I am no coding expert and have no experience in Raspberry and Raspbian I am trying to go through the things step by step, so you should be able to get everything done, even without exactly having to go into all the details. That is one of the reasons I am also using the graphical GUI PIXEL for Raspbian since I thing it makes it easier for the beginners to get started (and you might want to use PIXEL anyway when you are using the Raspberry 7” display as interface for your home automation controller) +This tutorial is also based on **having a Windows PC** to support the setup process. You might be able to completely do it without the support of an extra PC, if you can get a MicroSD card with a pre-installed Raspbian OS and use the display options (the Raspberry 7” display or HDMI Display) for the Raspberry. + +*=> **DISCLAIMER: +This tutorial might contain some typos, errors or ways of setting up, which can be done in a better way. I am just reflecting my process of starting from scratch and slowly working my way through hundreds of online tutorials, manuals, forum threads etc. and on the way, highlighting the issues I had in getting things working. There will be no guarantee that the given instructions are working for your project as well.** * + +Anyway I hope this tutorial will help some beginners to enjoy home automation with openHAB2. + +##A few words about the 2 in openHAB2: +The 2 in openHAB2 is important! The tutorial is based on the openHAB2 and will not go into all the details of the old version. +You just have to be aware, that a lot of online documentation is still for the openHAB version and will not be applicable for openHAB2! +So the best thing is always to go to the official webpage of openHAB2 and start from there, and only if you really can’t find the information or the link there, go to google and search for other solutions. I was always using the search setting (last year) so it was more likely to the results considering openHAB2 and not openHAB. + +--- +# Chapter 2: Preparation +Shopping list: +As mentioned before, I am basing this tutorial on the graphical GUI of Raspbian named PIXEL so the shopping list is also containing parts for this optional setup: + +## Minimal hardware setup of the controller with external display: + +|Description|Image| +|---|---| +|Raspberry Pi 3|![image](\images\pi3.jpg)| +|MicroSD card 16GB (minimal to have some buffer for the future) Make sure you have the right card reader to plug the MicroSD card into your computer!|![image](\images\microsdcard.jpg)| +|Designated Raspberry power supply (min. 2,5A 5V, I recommend 3A) Do not use other USB chargers since insufficient power supply (shown in GUI as lightening symbol in the upper right corner) will result in serious issues like e.g. Bluetooth not working) A cable switch might be a good thing since you might have to hard-reset your Pi in the early days more often and the Pi itself does not have a power switch|![image](\images\powersupply.jpg)| +|USB Mouse|![image](\images\usbmouse.jpg)| +|USB Keyboard|![image](\images\usbkeyboard.jpg)| +|HDMI cable, full size to whatever your display needs (Obsolete, if you going for the 7” Raspberry display setup)|![image](\images\hdmicable.jpg)| +|Display with HDMI input (Obsolete, if you going for the 7” Raspberry display setup)|![image](\images\externaldisplay.jpg)| +|*Optional:* Raspberry case (Obsolete, if you going for the 7” Raspberry display setup)|![image](\images\raspberrycase.jpg)| +|*Optional:* Ethernet cable (Obsolete, if you not want to use WiFi to connect the Raspberry to your gateway)|![image](\images\ethernetcable.jpg)| + +## Additional hardware for optional setup of the controller with 7” Raspberry display: +(I found it very useful to have one permanent GUI interface mounted on your controller, you can also use this touchscreen interface directly to interact with your home automation): + +|Description|Image| +|---|---| +|Raspberry Pi 7" Touch-Display|![image](\images\raspberrydisplay.jpg)| +|Premium case for Raspberry Pi 7" Touch-Display (closed version) often sold in bundle with Touch-Display, should be available in black, white and transparent. This is a very good case if you want to place the controller on a table or counter since it is protecting the Raspberry from the back.|![image](\images\raspberrydisplaycase.jpg)| +|*Alternative:* Cases for Raspberry Pi 7" Touch-Display. You will find a wide range of other cases. The open versions might give you a better access to the Pi GPIO pins or for changing SD card. Please consider: since you can rotate the image of the GUI on the display you can also choose to switch from landscape to portrait orientation.|![image](\images\alternativeraspberrydisplaycase.jpg)| +|Bluetooth keyboard (optional, since the optional on screen touch keyboard for Raspbian PIXEL was not working without errors, I decided to go for a Bluetooth keyboard which makes the typing much easier)|![image](\images\bluetoothkeyboard.jpg)| + +## Z-Wave Controller hardware +If you want to use the Z-Wave technology for your home automation project you have to have one Z-Wave controller connected to your Raspberry +**NOTE:** Be aware that the details serial numbers or item names may vary since you have to always make sure to use the hardware which is allowed in your country! + +|Description|Image| +|---|---| +|UZB Z-Wave PLUS USB stick by Z-Wave.Me *Pros:* Cheapest controller, small. *Cons:* For inclusion, the controller has to be plugged into the Raspberry, so for mounted devices like wall switches , you have to take the Raspberry in close proximity of the device or do the inclusion before you mount the switch inside the wall.|![image](\images\z-wave_plus_uzb_usb_stick_by_z-wave.me.jpg)| +|*Alternative:* Aeotec by Aeon Labs Z-Stick Gen5 *Pros:* Allows offline inclusion of Z-Wave devices which makes it very easy since you only have to take the stick to the mounted device, not the entire Raspberry. *Cons:* Including battery powered devices into openHAB2 requires a special process and might cause errors(see tutorial]|![image](\images\z-wave_aeon_labs_z-stick_gen5.jpg)| +|*NOT REALLY an Alternative:* Z-Wave Z-Wave.Me Razberry 2 Daughter Card for Raspberry Pi Home Automation (not plug and play compatible with optional setup of the controller with 7” Raspberry display!)*Pros:* will be mounted directly on the Raspberry so it is not using a USB port *Cons:* will be mounted directly on the Raspberry which is blocking the GPIO pins for e.g. the Display power supply or additional cooling fans, so you have to manually solder the power wires at the back of the razberry. Is using the i/o port of the Raspberry Pi 3 on board Bluetooth, so a lot of additional configuration is needed to get the razberry and the Bluetooth running in parallel. Most expensive controller.|![image](\images\z-wave_razberry_2_daughterboard_by_z-wave.me.jpg)| + +## Z-Wave sensors, switches and actuators + +**NOTE:** Be aware that the details serial numbers or item names may vary since you have to always make sure to use the hardware which is allowed in your country! +Since I am doing a German based home automation project you may find that some Z-Wave devices are not sold in your required country configuration ( e.g. Z-Wave NodOn Smart Plug not available e.g. in the US) + +|Description|Image| +|---|---| +|Z-Wave Fibaro Double Switch 2, Z-Wave Plus Smart Switch (comes at almost the same costs than the single switch and gives you 2 channels. Only reason to go for single switch is you need the full power range of the single switch since the double switch has slightly lower range) *NOTE:* This switch is designed to be installed in the electrical power wiring of your home (inside a distributor case). In some countries this may only be allowed to be done by special trained staff (insurance and/or law). |![image](\images\z-wave_fibaro_double_switch_2.jpg)| +|Aeotec Multi-Sensor 6 ZW100-C - Z-Wave Plus|![image](\images\z-wave_plus_aeotec_multi-sensor_6_zw100-c.jpg)| +|Z-Wave Aeon Labs ZW088 Z-Wave Key Fob, Gen5|![image](\images\z-wave_keyfob_zw088_by_aeotec.jpg)| +|Z-Wave NodOn Smart Plug (not available e.g. in the US)|![image](\images\z-wave_smartplug_by_nodon.jpg)| +**NOTE:** If you want to by other Z-Wave devices always make your they are listed in the Z-Wave device list of the openHAB2 Z-Wave binding to make sure they are supported correctly in the context of openHAB2: +http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list + +**LAN devices (cable or WiFi)** +A lot of things you are using at home are already connected to your LAN and can be integrated into your openHAB2 home automation project if the right binding is available for that device. +You can find an overview on http://docs.openhab.org/addons/bindings.html +**NOTE:** Be aware that not all the bindings to include devices are already included in the stable version of openHAB2 and may require a manual installation of a so called snapshot version of the binding (how to install snapshot bindings is explained later in this tutorial since we will need it for the WiFi LED controller) + +|Description|Image| +|---|---| +|WiFi XCSOURCE Magic UFO-WiFi LED-Controller Type LD382 (other brand names might work as well, but you have to make sure it is Type LD382, LD382A or LD686)*REMARK:* I was using a WiFi controller on purpose since: It is only about half the price of a Z-Wave WiFi controller. You can control the device as well via smart phone (like light to music feature of the app)But some things you have to be aware of using WiFi LED instead of Z-Wave LED: You have to have a WiFi network to which your Raspberry and your WiFi LED controller is connected. You have to manually install a beta / snapshot version of openHAB2 or manually install the WiFi LED Binding on top of the package based installation of openHAB2 (see tutorial).|![image](\images\ledwifi.jpg)| +|RGB LED stripe incl. power supply 12V DC bundle. While you can buy the stripe and the power supply bundle separately, most of the times the bundle will come at the same price or even cheaper. The included power supply plug should directly fit into the power inlet socket of the WiFi controller. *REMARK:* It also allows you to attach the stripe without soldering since you can just cut the cable of the RGB bundle controller and use it to connect the LED stripe to the WiFi controller.|![image](\images\rgbledstripe.jpg)| +|*Optional:* White LED stripe. Since the WiFi LED-Controller is allowing you to at additionally control plain colour LED stripe (or in case of controller type LD686 even two) you might want to get an additional strip in e.g. plain white to create ab clear white illumination. *NOTE:* You might be fine with just the stripe if you already got the power supply with the RGB stripe|![image](\images\whiteledstripe.jpg)| +|*Optional(in my case it was already there and I just included it into my project):* Yamaha Receiver RX-V581|![image](\images\rx-v581.jpg)| +|*Optional(in my case it was already there and I just included it into my project):* **Samsung TV Details MISSING** *NOTE:* Even when the binding is not officially supporting your TV you might be lucky|![image](\images\samsungtv.jpg)| + +##Software list: + +My tutorial is using a MS-Windows windows machine for the PC part (You should be able to get it done with Mac or Linux PCs as well, but you have to go online to look up the differences and do some adaptions on the tutorial e.g. mounting the Raspberry file system to PC) +###Windows Download list: +|Description|Image| +|---|---| +|The latest **Raspbian** (Raspberry OS) image. You have to download the “Raspbian Jessie with PIXEL - Image with PIXEL desktop based on Debian Jessie” since this tutorial is using PIXEL|https://www.Raspberrypi.org/downloads/Raspbian/| +|**Etcher** (to write the Raspbian image to the SD-Card)|https://etcher.io/| +|**Eclipse Smart HomeDesigner** (optional but strongly recommended for easy editing of OpenHAB2 configuration files; incl. syntax highlighting) You have to choose the right version for your PC|https://www.openhab.org/downloads.html| +|To use Eclipse Smart HomeDesigner you need **Java Runtime Environment JRE** (if not already installed on your PC)|https://java.com/| +|**PuTTY** or **KiTTY** portable to access the Raspberry console from your PC|http://www.putty.org/ or https://portableapps.com/apps/internet/kitty-portable| +|**WinSCP** portable to access Raspberry file System directly from your PC (might become obsolete if you use a SAMBA server on your Raspberry, see tutorial)|https://winscp.net/eng/download.php| + +###Raspberry downloads: +How to download software will be explained in the tutorial, but as a reference you will use: +- **openHAB2** Package repository based installation or manual installation (be aware that the file locations on the Raspberry will be different based on which kind of installation you choose) +- **Samba** server(for access of Raspberry files from Windows machine; needed for Eclipse Smart HomeDesigner) +- **xscreensaver** (optional if you are using the display setup, to easy control screen blackening or screen savers) + +--- + +#Chapter 3: Raspberry hardware and Raspbian OS installation +##General information about Raspberry interfaces and GPIO pins: +###Raspberry input Overview: +![image](\images\raspberrypi3interfaces.jpg) + +###Raspberry GPIO pin Overview: +![image](\images\raspberrypi3gpio.jpg) + +###Preparing MicroSD card - writing Raspbian image to MicroSD card (PC required): +|Description|Image| +|---|---| +|Download latest Raspbian Release (*.zip file) to a Windows folder|![image](\images\raspbiandownload.jpg)| +|Extract *.zip file to receive *.img file|![image](\images\writeimage.jpg)| +|Use Etcher to write image to a MicroSD card: 1. select image 2. select drive with MicroSD card plugged in to 3. start flashing|![image](\images\writeimage2.jpg)| + +- +- +- +- +- +- + + + + + + + + + + Markdown syntax examples start from here: ---