Inhaltsverzeichnis
< Alle Themen

openHAB fundamentals

openHAB stands for open Home Automation Bus and is one of the most popular open source SmartHome solutions worldwide. Furthermore, it is also used in smart Building Technology environments. It’s developed in Java, leverages OSGI as runtime environment and is independent of any specific protocol or vendor of smart actors and sensors. While it is written in Java it can run on multiple platforms. It’s main openness reaches openHAB with the ability of the community to develop and provide so-called ‘Bindings’ in order to let openHAB communicate with external systems.

The complete openness, low footprint, huge community and interoperability with all other software components used in the Natrix Project made us the decision easy to go with openHAB to inject smart Building Technology functionalities into the Natrix Project.

At the technical level, so-called things represent devices with their sensors and actuators. As an abstraction, openHAB offers the concept of items as a comprehensible description of the unit.

Each item has the four properties location, equipment, point and property, which in turn are interconnected. The former describes the location like living room, and the equipment contains information about the associated equipment, including battery, remote control or motion detector. Point describes the type or function such as alarm or measuring device, and property contains the associated information or the measured or controlled value, for example the temperature.

There is one uniform rule engine that integrates the rules written in openHAB’s own Domain Specific Language (DSL) into the user interface. In addition, rules can now also be created in JavaScript, Groovy and the Java implementation of Python Jython, formerly known as JPython. Those who prefer a visual approach can also create scripts for home automation using the Blockly programming language developed by Google, which enables code to be built in a graphical environment with predefined blocks.

openHAB 3 comes with a state-of-the-art user interface. It is designed to adapt automatically to different devices, from phones to desktops.

openHAB Design Patterns

The beauty of openHAB is its almost infinite possibilities to configure it, and hence to reach a level of flexibility which is unbeaten in the industry. However, with this flexibility we are also faced with an increasing level of complexity. Therefore, the Natrix-Project comes with some openHAB3 design patterns which makes it a bit easier to implement certain functionalities. Design Patterns means in this case that it represents one(!) way to achieve a user requirement, while there may be many other ways how to get there.

openHAB Semantics

openHAB3 introduces the concept of Semantics.

The semantic modeling for the management of Locations, Equipment and Points which are basically all items with particular characteristics. Locations and Equipments are group-type items, therefore containers of other groups or items, with particular tags that allow openHAB to automatically understand what they represent. The Locations allow us to model our home from a physical point of view, defining areas, floors and rooms; Equipments instead model the physical devices present in our system, such as a thermostat, for example.  The Points, on the other hand, are the real items that have their own state (for example temperature and / or humidity values) and can become interactive (for example switches) and can be considered as the leaf of our hierarchical modeling tree.

In our Design Pattern for Semantics we will mark the name attribute of each item Location, Equipment and Point according to its meaning with a prefix ‘Loc_’, ‘Equip_’ or ‘Point_’.