Problems with Items/Things in Habmin/PaperUI

@chris yes, that’s what I meant. Looks great!

Given that there’s no GUI editor for sitemaps at the moment, I think this is pretty much the only thing that can be done (other than using only text files of course). Personally, I think this is also a good approach :slight_smile: .

Hi all.
I’m a complete newbie here. Installed OH2 yesterday (using repository packages on a Debian server) and I’ve spent most of the day today trying to understand the concepts and tools of this beast. I’ve read numerous threads in this forum with other users that seem as confused as I am. I’ve ended up doing some configuration in PaperUI, some in text files using Designer, some using habpanel and some using habmin. So now I’ve got some Things in text files (which I can’t seem to edit in any way from PaperUI) and some Things in the database (created from PaperUI). I think the thing that is needed most here is some kind of official recommendation. What is the correct and future proof way of creating a Thing, an Item etc. What I’m most afraid for is that I’ll build my configuration up in a way that suddenly is obsoleted and I’ll have to start over from scratch again.

If I understand the discussion above the best way is to create most of the stuff using text files, with the exception of Z-Wave. Is that correct? Is it a good idea to only use Paper UI for installation of bindings, manage Z-Wave through habmin and do everything else using Designer?

I’d also like to note that this seems like a very nice and helpful community. The stupid newbie questions I’ve asked in the forum this far have all got quick and good answers!

Unfortunately OH is in a period of transition right now. We have a mix of OH 1 bindings and OH 2 bindings. For the older 1.9 version bindings the only way to use them is through text files. For the 2 version bindings you have the option of creating and managing Things and Items from text files or through PaperUI.

Eventually PaperUI and/or Habmin will become fully capable and at that time these UIs will become the “official recommended approach.” But until that occurs what you have done thus far is perfectly fine. Do not worry too much about breaking changes to your config at this point. The config is pretty stable and the database is stored in a JSON database so you can, if needed, go in and fix things yourself. And likely if there are any such changes from this point forward, there will be a script or something that will be developed shortly after the change, if not published with the change, to migrate your config.

There have been a lot of changes since last October. So a lot of the discussion above has become OBE. For example, the old MapDB that used to store the config changes made in PaperUI has been replaced by a JSON Database. The upgrade process has been fixed so upgrades no longer wipe out your bindings, requiring them to be reinstalled. And many more improvements.

So, at this point I think you will find that many/perhaps most new comers use PaperUI for all OH 2 things and Designer/text files for all 1.9 bindings stuff and the sitemap.

I personally am a little bit of a special case as I run OH inside Docker. And this means that every time I upgrade I need to wipe out some of my config anyway in order to force the add-ons to update as well. As a result I do the following:

  • I use PaperUI to manage autodiscovered Things.
  • I use text files for everything else.

As a result I can, if needed, completely wipe out my userdata folder and restart openHAB and I’m back to where I started with minimal effort.

However, now that the configs are stored in a human readable and editable form I will probably change my approach some in the near future. Once there are 2.0 versions of all the core bindings I use I will change to using PaperUI for all Things and Items, perhaps even for writing Rules.

So, in short, there really isn’t a best practice right now.

There are no stupid questions here. Home automation is hard and OH is complex. We are happy to help!

1 Like

Thanks a lot for good explanation! It kinda seems I’m entering a very fast moving boat here, I guess I’ll learn to ignore any information that is more than a month old :innocent:

One thing I’ve yet failed to configure is the persistence, all guides I’ve stumbled upon seems to use text files for this. Any good pointers on how to do?

I think persistence is another area that requires the use of text files. However, if you follow this you will only need to set persistence up once and they you can forget about it.

Persistence is one of those things that tend to be forgotten about when talking about these higher level topics. Its important though and shouldn’t be.

Since you are looking at persistence right now, I’ll go ahead and point you to the InfluxDB+Grafana Tutorial if you have any interest at all in generating charts in the future. There is charting built in to OH but it is very much what-you-see-is-what-you-get with no real ability to customize it. Grafana has full customization abilities.

2 Likes

First question: Is there a way of splitting threads in this forum? Feels like we’re leaving the topic now, don’t want to hijack the thread…

Anyway, I still don’t get how to get the data to my database. I thought I’d try with mysql. So i installed the mysql and jdbc mysql persistance bindings, created an empty mysql database, set up a user and put the username and password into jdbc.config and mysql.config. And made a minimal mysql.persistance with the below contents and then restarted entire openhab. But the database is still very empty. Don’t really know what’s supposed to happen…

Strategies {
everyMinute : “0 * * * * ?”
default = everyChange
}

Items {
* : strategy = everyChange, everyDay, restoreOnStartup
}

There used to be. Can’t figure out how to do it now. You can create a new thread and post a link to it here.

Errors in the log?

I don’t think it will create tables for Items until those Items need to be saved (in this case changed). Have any of your Items changed after the reboot?

I’ll warn that MySQL and Maria DB are the two most frequently occurring problem persistence engines I’ve seen on this forum. I don’t know why but but it seems to cause a lot of people problems.

Can’t really understand why I didn’t look there earlier, but yep, there were errors in the log. Starting another thread about this now…

Tnx, this explained a lot !