### About

openHAB - a vendor and technology agnostic open source automation software for your home.
openHAB integrated in the Tinkerforge RED Brick
The RED Brick as from v1.6 has openHAB integrated and is included in the Brick Viewer v2.2.3.
http://www.tinkerforge.com/en/blog/2015/3/11/red-brick-now-with-openhab-and-nagios
openHAB References
Homepage:
http://www.openhab.org
Quick Setup:
https://github.com/openhab/openhab/wiki/Quick-Setup-an-openHAB-Server
Getting Started:
http://www.openhab.org/getting-started/
Configuration:
https://github.com/openhab/openhab/wiki/Configuring-the-openHAB-runtime
openHAB Wiki:
https://github.com/openhab/openhab/wiki
https://github.com/openhab/openhab/wiki/Explanation-of-Sitemaps
openHAB and Raspberry Pi (German):
https://openhabdoc.readthedocs.org/de/latest/Raspberry/
openHAB Documentation (German):
https://openhabdoc.readthedocs.org/en/latest/
openHAB Examples (German,very good learning):
https://klenzel.de/3096
Eclipse SmartHome:
http://www.eclipse.org/smarthome/
openHAB TinkerForge:
http://www.tinkerforge.com/de/doc/Kits/WeatherStation/OpenHABOnREDBrick.html
http://www.tinkerforge.com/de/doc/Kits/WeatherStation/OpenHABOnREDBrick.html#starter-kit-weather-station-openhab-red-brick
https://github.com/theoweiss/openhab-tinkerforge-configuration-examples
https://github.com/theoweiss/openhab-tinkerforge-configuration-examples/blob/master/doc/Tinkerforge-Binding.md
Bindings
https://github.com/openhab/openhab/wiki/Tinkerforge-Binding
https://github.com/openhab/openhab-distro/blob/master/docs/sources/development/bindings.md
openHAB TinkerForge AddOns Note:
By default no openHAB addons are installed (like persistence, rrb4j, myopenhab)
Example addon installations apt-get install command:
$sudo apt-get install openhab-addon-persistence-rrd4j
$sudo apt-get install openhab-addon-io-myopenhab
openHAB Log Files
The openHAB log files can be found in /var/log/openhab.
openHAB Events Log
Every event is logged in /var/log/openhab/events.log.
Examples:
2016-02-20 11:29:20 - outa0 state updated to OFF
2016-02-20 11:30:00 - TF_AmbientLight state updated to Undefined
openHAB Log
The openHAB log file /var/log/openhab/openhab.log is useful to check for errors, warnings and info.
If f.e. a rules file has a syntax error, this is logged.
Examples:
2016-02-20 11:26:53.398 [ERROR] [.t.internal.TinkerforgeBinding] - COMMAND no tinkerforge device found for command for item uid: gkM subId: outa1
2016-02-20 11:29:59.343 [INFO ] [penhab.io.rest.RESTApplication] - Stopped REST API
2016-02-20 11:33:22.254 [INFO ] [.o.core.internal.CoreActivator] - openHAB runtime has been started (v1.8.1).
2016-02-20 11:34:15.024 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'io16test.items'
2016-02-20 11:34:34.668 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'io16test.sitemap'
2016-02-20 11:34:55.513 [INFO ] [penhab.io.rest.RESTApplication] - Started REST API at /rest
2016-02-20 11:35:02.731 [INFO ] [.o.u.w.i.servlet.WebAppServlet] - Started Classic UI at /classicui/openhab.app
2016-02-20 11:35:21.873 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'weather-station.rules'
2016-02-20 11:35:25.798 [WARN ] [c.internal.ModelRepositoryImpl] - Configuration model 'weather-station.rules' is either empty or cannot be parsed correctly!
2016-02-20 11:35:26.028 [INFO ] [c.internal.ModelRepositoryImpl] - Loading model 'io16test.rules'
2016-02-20 11:35:28.051 [INFO ] [.service.AbstractActiveService] - Tinkerforge Refresh Service has been started
2016-02-20 11:35:50.143 [INFO ] [org.openhab.model.script.FILE ] - 2016-02-20 11:35:48 - State OFF
openHAB Configuration File openhab.cfg
When making changes to the openHAB configuration file /etc/openhab/configurations/openhab.cfg, a reboot of the RED Brick is required to apply the changes.
Note that rebooting takes a few minutes.
To make a new openhab configuration file
$cd /etc/openhab/configurations/
$cp openhab_default.cfg openhab.cfg
$nano openhab.cfg
openHAB Configuration Files
The openHAB configuration files are created and maintained with the Brick Viewer:
Select RED Brick > Settings > openHAB.
The files are stored in the folder: /etc/openhab/configurations/ with Owner openhab.
openHAB Icons
These are found in /usr/share/openhab/webapps/images with owner root.
To copy an new icon, like switchinfo.png:
Set root after logging as user tf:
$sudo -i
Note: tf password is requested.
Move to the folder containing the new icon:
Example folder /home/tf/openhab with icon file switchinfo.png
$cd /home/tf/openhab
Copy Command example:
$cp switchinfo.png /usr/share/openhab/webapps/images
This icon can then be used in a sitemap, like
Text item=labelinfo label="LED Last Change [%s]" icon="switchinfo"
openHAB Addons
List of openHAB Addons:
$sudo apt-cache search openhab
openHAB Example
http://www.tinkerforge.com/en/doc/Kits/WeatherStation/OpenHABOnREDBrick.html
openHAB Configuration Example
Example uses the AmbientLight Bricklet with UID mdh.
Items - stored in /etc/openhab/configurations/items/weather-station.items
Number TF_AmbientLight "Luminance [%.0f lx]" { tinkerforge="uid=mdh" }
SiteMap - stored in /etc/openhab/configurations/sitemaps/weather-station.sitemap
sitemap tf_weather_station label="Weather Station"
{
Frame
{
Text item=TF_AmbientLight
}
}
Access a SiteMap
Accessing the SiteMap run http://red-brick-ip-address/openhab.app?sitemap=your-sitemap
Example based on previous configuration files
http://192.168.0.30:8080/openhab.app?sitemap=weather-station
openHAB Charts
See B4J HowTo > TinkerForge openHAB > openHAB Charts
B4J Examples
No B4J examples associated yet, but a possibility is to build a B4J Tool supporting the creation
of openHAB configuration files.

Changed: , Category: TinkerForge openHAB, File: T6C267M1983.htm, ID: 1983