Getting started when knowing nothing

Hey Neil,
as I understood it you already have OH2 up and running and you got all your things and items defined by adding them in PaperUI. Good so far :wink:

I would recommend to start off with an empty configuration folder (addons.cfg: package = standard). You should still hold on to the demo files and possibly have a lookout for other configuration examples. Here you can find my configuration.

Start out with a small sitemap called default.sitemap. Follow the instructions in the wiki on how to build a sitemap.
You should quickly see some nice results in BasicUI/ClassicUI or in your smartphone app.

If you are not sure about names and datatypes of your items, the karaf console is your friend. Use the commands smarthome:things and smarthome:items to get more information about all registered things and items.

Additionally it’s a good idea to look into the events.log file to get a better understanding of which data is stored in which item at certain events. On Linux do the following (path may differ):
tail -n 100 -f /opt/openhab2/userdata/logs/events.log

After you got the basics of your sitemap content covered, you might want to think about “transformations”, “persistence”, helper items (to display summarized information or similar) or rules… Check out the very good wiki and docs articles on these topics (most information in the openHAB1 wiki is still valid for openHAB2). My recommendation is to have one sitemap but many small configuration files for rules and such. Have a look at my config for examples in the items or rules folders.

You might also want to work with more bindings. Be sure to read up on them in the documentation (either in the new docs.openhab.org or if needed in the old wiki) - in the beginning restrict yourself to OH2 bindings with an existing docs article if possible.

If you run into problems with things and items added via PaperUI, you may want to define all of them in config files. I found peace in that as it bears a few positive side effects. You will however need some time to do so (example).

Good luck!

3 Likes