(Another) Persistence in OH2 issue (weird behaviour)

All,

I am running OH since a short while and am still missing reliable persistence.
My previous OH1 setup ran smoothly using just rrd4j, but in OH2 I followed the recommendation of @rlkoshak separating number items from the rest.

Anyway this new thread is because some threads became too long and confusing (for me ;-).

My setup:
rrd4j and mapdb are installed using Paper UI. Default is mapdb (set in habmin).
Beside those I have myOpenHAB (also ported from my previous OH1, but not connected yet).
In Habmin:
When I check Configuration -> persistence, I don’t see anything (selected by default is rrd4j).
If I change to mapdb… nothing. If I change to myOpenhab, I see many items (possibly all).
If I choose one of these I get:
Error while getting item persistence data
That’s kind of weird…

Next try Habmin: Charts -> Chart Editor
I can select one db (mapdb, rrd4j, …) but I don’t see which is selected.
So if I select rrd4j, no items to choose.
mapdb -> same, myOpenhab -> same.
Completely new loaded webgui (habmin again):
I still don’t know which db I have selected, but it seems all (or at least many items are there).
I even can create a new Chart with good looking data.

How can I use the newly generated chart in my sitemap and does anybody experience this strange behaviour (error message mentioned earlier.

Same here (OH2 online build #520, manual install) , but rrd4j and mapdb are working fine.

Same here, and I also don’t use my.openhab persistence at the moment.

Thanks @sihui,

so you mean - it just looks weird?
In the background it might run well - like in your case?
Hmmm… how to check, if this is the case for me as well?

Do you have an idea about my last question?
How can I use the newly generated chart in my sitemap?

Because me previously used graphs (from OH1) do not show anything…

The error is because my.ooenhab is not a queriable persistence service. You can’t get historic data not can you generate charts using it. It is strictly fit exposing your Item’s to third party services like IFTTT and to proxy the REST API through my.oprnhab.org.

I don’t think you can use Habmin charts in sitemaps.

If you are using mapdb to restore items on startup the check is easy: switch a light serveral times, leave it on, restart openhab: the switch should still be on. At least that is the case for me.

I really don’t know, but my initial guess was: I don’t use any of the UI’s for my setup, so nothing is stored in the systems mapdb (not to be confused with the persistence mapdb), all my setup is done through the old way with text files. Maybe habmin grabs the data from the systems mapdb … but that is just a guess.
Are you using text files or PaperUI/Habmin to configure your system?

Good point, @rlkoshak - thanks for the hint.
So that means - according to the graph - that the number items seem to be stored in rrd4j correctly.

I thought I could generate a graph layout and store it under a specific name and just integrate it with this name like a channel of a thing.
Thanks for the clarification.

Thanks @sihui - I will check it out to verify.

That was exactly my though in the beginning, because the mapdb for things an such are totally intransparent.
During half a year OH1 experience I thought to be quite familiar with most of the architecture, but OH2 is a new challenge.

I see the UIs simplicity for beginners, but the transparency is lower (I think).

I just took the path through Paper UI to generate the things, because there is no other way (or at least I don’t know about a “textual” method to generate the things (and channels).

The biggest struggle is: What to put into text files (service.cfgs, rules, items, persist files an more) and what do by UI.
Again - thanks for your help.

There is a things folder where you put .things files. The format of the entries is binding specific so see the binding’s readme in the OH 2 docs for details.

I recommend using the PaperUI or Habmin to install bindings and manage Things and use text files for everything else.

Thanks, @rlkoshak - that’s possibly the best way.
But I am still confused about the files beeing generated by Paper UI in the “/etc/openhab2/service” folder. There are many cfgs, but according to some other threads I just don’t need to add features that have been installed with Paper UI.
So, this confuses me as well (about persistence), because I played around with putting them into the addons.cfg, which did not have an (obvious) effect.

In OH 1 each binding and add-on has a section in openHAB.cfg. In OH 2 that file has been broken up into separate files, one for each add-on. In OH 2, some addon’s can be configured through PaperUI but I recommend configuring them in the cfg files instead.

The fields to enter are essentially the same as they were for OH 1, only you no longer put the binding name in front. For example, nest:refresh=120000 would be simply refresh=120000.

So if you have any custom settings for the persistence they go there. Your .persist files go in the persistence folder like always.

Thanks, I am aware of the cfg files beeing separated from the previous openhab.cfg.
However, changing the binding specific parameters (e.g. for telegram, weather, …) is ok, but the addons.cfg was (is) a little more confusing.
Anyway, thanks for your support!

Addon’s.cfg is an alternative way to choose which addon’s are installed. For those who wish to forego UIs entirely that is the most convenient way to install bindings.

So, if I am able to install the Bindings regardless if they are 2.0 or 1.9 or whatever, there is no need to mention any binding in the addon.cfg.

For 1.x bindings which are nocht coming with the OH2 and cannot be installed by Paper (or any other) UI, it’s required to make it run…
Now I got it :wink:

No, bindings which are not part of openHAB2 have to be manually copied to the addons folder.
addons.cfg can be used for 2.0 bindings and 1.9 bindings which are already part of openHAB2.
It’s just an alternative install method (if you don’t want to use UI’s).

Alright - now it’s clear :wink:
Thanks