Starting with openHAB2

There are many reasons that my smart home solution will be based on openHAB:

  • its an open system,
  • contributes and colloborates with Eclipse SmartHome,
  • is based on Java (i.e. available on several platforms) and
  • supported by large community.

Its my first attempt with home automatization and currently I’m not involved in openHAB community. Therefore, all statements here are my personal views and interpretations. I decided to start directly with openHAB2 due to introduction of new features such as Discovery Service and PaperUI.  I’m aware that currently openHAB2 is still in beta phase implementation, i.e. not all bindings/plugins are ported (but the old ones are compatibel) and – more important – documentation is not mature at this phase.

Therefore I want to share my learnings in this blog. Initially I failed with setup of online distro on Raspberry Pi, therefore I started with offline distro on Windows 10.

Installation of offline distro is very easy – just unzip the downloaded file into C:\openhab folder. Do not forget to install/update the Java environment as well the JAVA_HOME environment setting. A good overview about installing openHAB2 is given in this tutorial.

You should install the demo package to get a first impression of openHAB2 by changing the first option in file “addons.cfg”  located in C:\openhab\conf\services

demo

By the way, its very simple to get the same controls via Android app (picture taken from Google play store):

AndroidOpenHAB

My first exercise will be the integration of my Mi-Light RGB lamps. Later, I intend working with several sensors, integrating of ESP8266 modules, my FritzBox etc.

Before we start I would like to refer to some important general links:

… and we need a basic understanding of terms used in openHAB2.

TermsOpenHAB2_slide01

In  IoT context we talk about “things“. This are physical devices connected to the network that should be controlled and observed, e.g. electrical consumers, sensors but also calls or media. A special type of things are “bridges” that support the communication, e.g. IP gategays or Wifi bridges.

On the right hand side we have the “virtual” computer world. Here we find “items” as a kind of control elements, e.g. switches, display elements, color picker, sliders etc. This are the means to operate our smart home solution. Items are abstract view for the things properties. You can implemet automation scenarios based on items and later exchance the things or link the items to new or updated things.Of course there are several applications using items possible that are represented by WebPortals, Android application or own GUI. The control logic for automatisation is expressed by rules (engine) for describing dependencies, time slots, thresholds etc. to start some actions.

Items can be collected in goups, e.g. all windows contacts, all rollerblades in first floor. In this way you can operate with groups: “All windows are closed?”

Between Things and Items a logical connection is established in order to exchange some commands or events. Of course, this communication is physically performed via the Internet, but we will see that there are logical channels defined for talking of Items with Things …

More information can be found in openHAB2 concept chapter.

2 thoughts on “Starting with openHAB2”

Leave a comment