Setting up openHAB2 from scratch

Take a look under the directory …\conf\services\ for a file called rrd4.cfg

Okay… but I’m not finding much instruction on what to put in that file?

This is what would have been in my old “rrd4j.persist” file on OH 1.x…

// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
	// for rrd charts, we need a cron strategy
	everyMinute : "0 * * * * ?"

Items {
	// rrd4 database are good for short term storage so we store AllItems mainly for the restoreOnStartup feature.
	AllItems* : strategy = everyChange, everyMinute, restoreOnStartup

Thought I may as well try just copy my rrdj4.persist file from my OH1.x system… No luck though :slight_smile:

2017-01-26 15:10:32.645 [ERROR] [.eclipse.smarthome.model.persistence] - [org.eclipse.smarthome.model.persistence.manager(79)] The unsetModelRepository method has thrown an exception

Configuration and use of persistence in OH 2 is almost identical to how it worked in OH 1. The only differences are:

  • instead of putting configuration parameters for the persistence (e.g. URLs, logins, etc) into openhab.cfg one uses a separate config file (e.g. rrd4j.cfg).
  • setting the default persistence engine is done through PaperUI or in runtime.cfg

.persist files and calls in the rules are all identical to what you are used to. If you have made no customizations to the rrd4j configs in your openhab.cfg, you can ignore rrd4j.cfg.

What about the Strategies and Items we used to define in the old .persistence files?

It’s all the same. Same strategies, same way to assign Items to strategies. In fact, the OH 2 docs right now just point to the OH 1 wiki.

When I migrated I didn’t have to change one character in my .persist files.

OK, I added the persistence service step! :slight_smile:

Hello Community!

DocFraggle, thank you very much for this tutorial!!! I am new to openHAB, in this help me to understand what happens under the GUI!

1 Like

Can I pay one of you to port my openHAB 1 to 2? :joy: But yeah, I mean it :grimacing:

Thank you man… this is really helpful i learn a lot and understand it very well especially I am a beginner on openhab2. I am looking forward for the continuation of the next part of this tutorial.

Cheers mate.

Great tutorial! But still missing something. In the tutorial, you mentioned configuring z-wave, but there was no mention of a Z-Wave Controller (physical hardware) that was installed. I’m just starting out with OH/2, in general. So please pardon my ignorance.

Wondering if the following setup is possible:
Raspberry Pi + OH2 + Smartthings Hub (that acts as a controller for all Z-wave devices)


I am trying to find any documentation which have some example how-to use MQTT, Arduno on Openhab. There is lot of videos on youtube but no description how they build there project. If I can get a link on tutorial then I can start my project.


thanks for the tutorial. I’ve started using OpenHABian and followed the beginners tutorial in the docs. But I am a little bit confused if I should configure things in Paper UI or in textfiles to also have it available in the Basic UI.

I configured Philips Hue in Paper UI. Works great, easy to configure. Then I wanted to adjust my sitemap for basic UI. Do I really have to configure everything again textbased (.things file, .items file and .sitemap)? Because if I do that these configs also affect the Paper UI and I will see i.e. the Hue Bridge twice. Also the lights which I configure are visible again in the other tab in Paper UI.

In my opinion the things and items are already configured through Paper UI - I only want to have it visible in Basic UI. What did I misunderstood here?

Best regards,

Only the sitemap needs to be in a textual format. It can refer to the items that you’ve made in paper UI.

sitemap default label="Main Menu"
  Text label="Bedroom" icon="bedroom"
    Frame label="Bedroom Light"
      Switch         item=Bedroom_Light_Switch
      Slider         item=Bedroom_Light_Dimmer
      Colorpicker    item=Bedroom_Light_Colour

Hmm I thought that I’ve tried that…but now it works!

Thank you!

1 Like

I’ve got open hab 2.2 installed. In paperui add-ons have no tab for persistence. Should I have one like in your screenshots or has this functionality been removed?

Is there an update to this tutorial? I am trying it and I didn’t get the page with “Simple, Standard, Expert, Demo”. It went straight to a page with "Home, Basic UI, Paper UI, and Habpanel. (Next step of tutorial shows just the first three). I blundered along trying to guess what I should do next to try to follow.

I got to adding my cellphone and I didn’t get to select Online and Time. I got Online, Latency (ms), and Last Seen. When I went to Control My phone shows up but it indicates “Online (not). Latency (ms) -NaN, Last seen -”

I have gone through the tutorial many times in case I missed something but the results are always the same.

Color me confused.

Which tutorial are you referring to?
This one?

You may always change your first choice later by editing your addons.cfg:

# Valid options:
#   - minimal  : Installation only with dashboard, but no UIs or other add-ons. Use this for custom setups.
#   - simple   : Setup for using openHAB purely through UIs - you need to expect MANY constraints in functionality!
#   - standard : Default setup for normal users, best for textual setup
#   - expert   : Setup for expert users, especially for people migrating from openHAB 1.x
#   - demo     : A demo setup which includes UIs, a few bindings, config files etc.
# See for a detailed explanation of these packages.
#package = expert

I am referring to the tutorial described in this thread.
I can’t get my installation to math the tutorial.

I’ll try to see if I can understand your link.


#package = expert


package = expert

and restart openHAB