Installing Raspbian and openHAB on my Raspberry Pi
So, my smart house project has just begun. Luckily I had an unused Raspberry Pi lying around waiting to be used. I stopped using it earlier 'cause the SD card got corrupted all the time, and I forgot to backup it up after doing the final configurations. But now it's time to try again.
I assume you got a Raspberry Pi and an SD-card. What you'll also need is a keyboard and a connected monitor/TV. Then, let's get started:
To install Raspbian I downloaded NOOB, if your SD card is 4 gb or less (less is not recommended) you should download the NOOBS Lite, otherwise the install might not have enough disk space available. Follow the instructions on the page, including the formatting of the SD card.
If you have bought a Razberry card to talk to your Z-Wave components as I have, you should connect it now, before inserting the SD card and powering up your Raspberry Pi. My plan is to write a review of the Razberry card when I've tested it for some weeks.
Once the SD card is formatted and NOOBS-files have been copied over, insert it into your Raspberry Pi and install Raspbian from the menu.
When you have logged in to your raspberry (via ssh or directly) there are a couple of things you should do before installing openHAB or Z-Wave software:
To avoid corruption of your SD card, please follow this step-by-step guide
When you've finished this, you'll currently (when this was written) have to downgrade Raspbian to 3.6.11+ to get the Razberry-card working. On the Razberry site the recommend you to run a command to downgrade the kernel, but for me this only got me into trouble as my wireless USB-dongle stopped working, so I'll recommend that you do the following to downgrade:
-
Install rpi-update (from the command line):
- Let rpi-update install the correct version (hash found in the git repository on github, last commit on 3.6.11+)
Now that this is done you can install your wireless USB-dongle, if you have one, please follow this guide:
The next steps are based on a blog-post i found earlier
-
Install Z-way:
- Start a browser on a another machine and go to http://raspberry-ip:8083
- Add your Z-Wave devices, and write down the node-numbers (if you have trouble doing this, check out the documentation here: http://razberry.z-wave.me/index.php?id=5)
- Select Network management under the Network tab
- Click on (Re-)include device (make sure the devices are close and powered)
- Repeat to include all your devices
- Stop Z-way as it cannot run at the same time as openHAB:
- Java should already be installed, check it by typing
- if it is not installed, please google it and install the newest version
- Now download openHAB, I got the newest version available from here . But if 1.4 is out, you should find the link to it here. Download runtime, addons and demo-configuration
- Download by using wget, for example
- create a folder called openhab in your home-folder
- unzip the runtime file to this folder
- unzip the addons to a different folder an copy only the z-wave binding into the openhab/addon-folder
- unzip the demo-configurations into the openhab-folder
- create the file openhab/configurations/openhab.cfg with the following content:
- add the following to the openhab/start.sh script (line starting with java, not at the end, but somewhere in the middle:
- Move the openhab/configurations/rules/demo.rules out of the openhab folder, or remove all the rules that include "say" (not yet implemented)
- Make sure the openhab/start.sh is runnable:
- Make sure the user starting openHAB is in the dialout-group:
- Start openHAB by running
- If something goes wrong, look at the post i refer to at bullet points 12 to 14
- Open a web browser and go to http://raspberry-ip:8080/openhab.app?sitemap=demo
That should be it. The Raspberry should be up and running with your Razberry card and openHAB. Next up is configuring the nodes, stay tuned.