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 ;-).
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).
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.
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?
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.
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!
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).