Raspberry Pi, Arduino, Sensors and the data they produce

OpenHAB Install and Configuration


The installation for openHAB is fairly simple.  You can use different methods, such as apt-get and download/extraction.  I chose the download/extraction method. I will use quotes to “bring” attention to specific entries, just know that they are not part of the text to be entered.

I started up my Raspberry Pi (RPi) and I established a session via putty from my PC.

Next I logged in with the default pi account.

I recommend using a version 1.7.1 (or higher if available).

Create a directory under /opt, label it “openhab”

sudo mkdir /opt/openhab

Now, how ever you want to do this step, you can.  I am lazy, so I started up a browser on the RPi, and went to the openhab web site [http://www.openhab.org/getting-started/downloads.html], and downloaded the following files:



Now you want to extract these. Change to our new directory.


sudo unzip /home/pi/downloads/distribution-1.7.1-runtime.zip -d /opt/openhab

Now make a directory for the addons:

mkdir addons

sudo unzip /home/pi/downloads/distribution-1.7.1-addons.zip -d /opt/openhab/addons

Okay, you now have an installation.

Let’s get the configuration started. change to the configurations directory.

cd /opt/openhab/configurations

Now we will edit the demo items to get our first sensor setup.

sudo nano items/demo.items

insert the information about your arduino gateway/ftdi interface, [Note this /dev device can be verified by examining dmesg];

String Arduino “Arduino” { serial=“/dev/ttyUSB0@115200” }

Next populate some sensor information:

Number      baseTemp01 “Temperature [%.1f °F]” <temperature>    Number      baseHum01 “Humidity [%.1f %%]” <temperature>

Now startup the environment, and watch for the INFO event to show up:

[INFO ] [runtime.busevents ] Arduino state updated to 0;0;3;0;14;Gateway startup complete.

Next post we will look into rules.

Most of this information came from TimO, within the mysensors.org forum:







Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: