OH2 installed, now what?

So, I’ve installed OH2 (Beta 4) on my RPi3 with apt-get as described in the OH2 docs.
I also set up my Samba share as described there.
I connected to my installation with google-chrome, and found my way to the ‘Paper UI’.
I added some bindings for stuff I own, ‘Systeminfo binding’, ‘Sonos binding’ and ‘YamahaReceiver binding’, and my ‘Things’ were found.
Looking at the ‘Control’ pane of the UI, my things have appeared and seem to show correct values.

So far, so good. But now what?

My end goal is to primarily to use some Z-wave sensors and switches to to some degree monitor my house and also be able to turn on and off some lights based on some time/sensor/gui-switch combinations, but for now I want to use what I have (my Things listed above) to learn.
What I was thinking right now is then to just have some stuff happen to one device based on what happens to another. (For example stop Sonos from playing if I turn the Yamaha Receiver on).

I just don’t know where to start.

I’ve seen postings mentioning items, rules, sitemaps, things and so on, and also using “Eclipse SmartHome Designer” to edit those files, but already there I run into problems.
I try to follow this guide, http://docs.openhab.org/installation/designer.html , but for some reason I cannot populate the Configuration tab. I have attached the Samba shares of /etc/openhab2 and /var/lib/openhab2 on my Win10 machine, but even though they are visible in Windows Explorer, they don’t show up in the Designer file chooser when trying to add the contents of the /etc/openhab2 share to the Configuration tab.
Any suggestions here?

Another thing, I was expecting my added ‘Things’ to end up somewhere in the /etc/openhab2 directory, but I can’t find any trace of them there…
Are they not supposed to show up somewhere on he file system?


Would manually creating item file(s), a sitemap file and rules file(s) as described for OH1 in the wiki pages the way to go?
Having some trouble knowing when it’s a good idea to read OH1 info and when it isn’t.


That’s where I would start. It’s a little hard to grasp how you might use Groups until you start using it. So throw a bunch of stuff in items and add them to a sitemap! See what you can control then figure out how you want to control it.

OpenHAB2 documentation[quote=“GeorgeCostanza, post:1, topic:18203”]
Another thing, I was expecting my added ‘Things’ to end up somewhere in the /etc/openhab2 directory, but I can’t find any trace of them there…Are they not supposed to show up somewhere on he file system?

If you configure them in PaperUI, no. The documentation isn’t very clear but if you set things up in the UI, they don’t edit the files, they throw it in the db. The files will overwrite the db though. I use Paper to install bindings and set some other settings but then go to the .items and .sitemap files and edit them through the Designer. As far as your problem there, I can’t help you. Everything for me in on the same machine (W10) and I just point it to openhab/conf.

Congratulations! You’ve made major progress.

It is important to understand some basics. I recommend looking at the Docs to get started, paying special attention to Things, Channels, Items, and Rules.

Enable the Demo and play around with that, modify it, and watch it change as you make modifications to start to get a feel for how all the pieces fit together.

This is exactly what I recommend for new comers.

I think I remember someone mentioning problems on Windows. Have you mapped the samba shares as a drive? That might be required for Designer to get to the files.

They are not. Anything you do through PaperUI gets stored in a database (which is on the file ystem so I guess it does). The DB is JSON so it is actually text you could read if you wanted to. It is located in /var/lib/openhab2/jsondb.

That is what I would recommend.

A rule of thumb for where to look for docs:

  • Look here for information about any add-ons. If the add-on is version 1.9 it will be listed in the “Legacy 1.x” section. These pages will link to the proper document for how to use it.

  • For sitemaps, actions, and rules you probably want to look both in the OH 2 Docs and the OH 1.x wiki

So here is some high level getting started advice:

  • For now install add-ons, manage OH 2 core parameters, and manage automatically discovered Things using PaperUI. Use the text files for everything else.

  • Things have Channels. A Channel is one piece of information or one control point that the Thing has. For example, a dimming light switch would be represented as a Things and that Thing would have a dimmer channel as well as a binary_switch channel because that Thing can dim or work like an On/Off switch.

  • Items are mapped to Channels. Everything else in OH works with Items. Persistence, sitemaps, rules, etc.

  • However, Things/Channels only exist for 2.0 Bindings. If you are using a 1.9 Binding, you do not create or use Things. Instead the configuration that would be part of a Thing becomes part of the Item definition.

  • Rules let you define behaviors, Rules are event based, not state based.

  • There are several UIs to choose from. PaperUI and Habmin are intended to be administration UIs. The rest are users UIs. Only BasicUI and ClassicUI use sitemaps.

To get started, you have Things that popped up in your inbox. You accept those Things. Now you must map Items to those Things’ Channels. This can be done in PaperUI or Habmin but I recommend creating an Items text file and edit it that way for you.

Once you have Items you can create a sitemap to show those Items and perhaps control them. You can also start to write Rules that define behaviors.

I feel like I’m randomly rambling so I’ll leave off here. Please feel free to ask more questions.

1 Like

Now I think I have a way forward.

Regarding the samba shares, yes, they’re attached as drives with drive letters Y and Z. I also have other attached drives that dosen’t show up in SmartHome Designer. It seems it only shows the “local” drives (or whatever they are called).


You should note that a Beta 5 is around the corner and will change a few things. Most importantly the jsonDB database…

…is mapDB in the beta4 build and will be replaced, so you may find you’ll have to add your things and items again through the paperUI. Although you might consider this extra practice in adding things as I did, I always learn best by practice.