Raspberry Pi, Arduino, Sensors and the data they produce

A Fork in the Sensor Road

As you have seen in the prior posts, our group has been delving into sensors that we can use to secure our homes, as well as provide knowledge about what is happening in the home environment.

To recap the efforts to date:

  1. Created a group of sensors based on the MySensors.org information:
    1. Sound Sensor
    2. Temperature  Sensor
    3. Motion Sensor
  2. Created a Gateway device, to aggregate the sensor data and deliver it to the “controller” product (PiDome, openHAB)

Controller – the GUI-Dashboard  and Data Processing Engine

After some research, the prior post was about PiDome as the Dashboard for a group of sensors we have build based on the MySensors.org site.  One of the guys also had looked at openHAB project, and suggested we also evaluate that application and compare it to the PiDome.

At the end of the last effort, I was struggling to get enough info on the PiDome / MySensors gateway connection, which left me a bit frustrated.  Both parts seemed to work, but ran into trouble with the integration, so I decided to create a parallel environment with openHAB.

Now, I don’t want to disparage PiDome, in fact, I think it is a solid product, and intend to continue to learn about it and build on it, I just need to dig in and get better with it.

So the fork in the road led me to look for information on the openHAB installation on a Raspberry Pi, and I was rewarded with several different methods on installation, and multiple sets of documentation on how people did so (blogs, instructables, etc).

I started with this instructable as a reference:


This got me the demo system on Raspberry Pi, and I was able to do the demo setup and play around with it. I then went looking for details on how to use mysensors units and gateway with openHAB.  A “google” later, and I had a dozen good links to work with.

My next step was to delete the environment, and I  used the rmdir -Rf to wipe out the openHAB directory.

I then followed the installation steps (I will detail these in the next post) to get a much new release installed.  Basically requiring a directory creation, download of two zip files, and then hooking up the sensor “gateway” to the usb port on the Raspberry Pi.

Next, you need to setup the items & rules for the sensors you are monitoring.  A couple links here for reference materials:



All that being said, it is fairly easy, once you know the secrets!

Here are the basics to get you started (assumption you have loaded the demo configuration):

Check out the directory /opt/openhab/configurations

Note the sub-directories, /items & /rules, you will need to make sure they have what we need to get rolling.

TO “bind” the mysensor gateway, openHAB need to know about the device, and how to talk to it. TO do this you bring in the appropriate .jar file, in my case I brought in the entire group of these. I hope that later in the effort I can remove those I do not think are necessary.  so I have deployed the following:


These are all the components that are necessary to get the environment up and running.  Additional details to follow on the configuration needed to get this off the ground, but we can start by updating the demo.items to include a couple of sensors. we label them and give them an ID. Next we update the demo.rules to define the variable names for these items, as well as what to do when an item (sensor) delivers data.

Once that is completed, you start up the server, plug in the arduino gateway, and do some checks to make sure we are “seeing” the gateway, and then receiving the data:

Here is an example:

2015-04-02 20:19:47.057 [INFO ] [runtime.busevents ] Arduino state updated to 0;0;3;0;9;read:1011010s=0,c=1,t=1,pt=7,l=5:44.7 101;0;1;0;1;44.7 2015-04-02 20:19:47.114 [INFO ] [runtime.busevents ] livingHum01 state updated to 44.7 Hum item: livingHum01 hum: 44.7

Finally, you create the Dashboard page that relays the received sensor data to the user by configuring the “sitemap”.

Once this is completed, you can open a browser and see your data. It is running on Port 8080, which is a standard port.


SO that is in a nutshell what it takes to get openHAB up and running.  There is a bit of configuration to do to get a final setup completed, but most of those steps are just repeats of what was outlined above.  The next post will give the nitty-gritty detail of this installation.





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: