[SOLVED] Switching from PaperUI based config to Text file config only

Tags: #<Tag:0x00007f616fcb1b50>

Hello,
i’m running OH since 2.3 and recently upgraded to OH 2.5. Running on a RaspPI 3.

I started OH configuration for addons and things and even some items through PaperUI and now want to switch to text file based config only.

From what I understood in the docs this can be achieved by modifying

/etc/openhab2/services/runtime.cfg
/etc/openhab2/services/addons.cfg

plus

add on / binding specific *.cfg files in /etc/openhab2/services

Now a couple of questions:

  1. Inside the /etc/openhab2/services/addons.cfg there is a comment Note: This is only regarded at the VERY FIRST START of openHAB. Is “start” referring to starting the OH service (which may occur several times) or with the installation of OH and the first start of OH service?
  2. Are addons which i configure in /etc/openhab2/services/addons.cfg reflected in PaperUI?
  3. Some addons are added through PaperUI. How do I effectively remove the addons i added through PaperUI?
  4. How do I effectively remove things and items I’ve added in paper UI?

Thanks in advance!

Why?
I strongly recommend that you do not
Use the PaperUI for bindings, add-ons and things
Use files for items, rules…

1 Like

Because I can version the text files, keep track of changes and revert or re-setup easier and through clicks in the (Paper) UI

1 Like

If you choose to use text files, like I do, I recommend not using text files for Things unless required. Discovered Things usually work well and are accurately configured. Text file Things can be problematic.

PaperUI configured Things are also textfiles, version them on git or whatever tool:

1 Like

They cannot / should not be altered with OH running though.

Why exactly can they be problematic?

Give it a try with Zwave, and you´ll never ask again :slight_smile:

2 Likes

I have everything configured through text files only as well. In regards to your questions

  1. This note is only about the package definition in the addons.cfg. As with the very first run of OH, when you select the required package once (simple, standard, expert, demo)
  2. Yes, they are reflected in the Add-ons section as installed under the various headers - actions, bindings, misc, persistence, transformations, uis and voice. Additionally the Bindings are also listed in the Configuration - Bindings section.
  3. You can UNINSTALL them in the Add-ons section
  4. You can delete them by using the trash can icon - the things, the linked items will follow

Hope this helps.

Well I don’t have zwave things yet. Is it “problematic” because text based config are not well documented and error prone, because of the strict syntax required?

It is not well documented for all bindings, which attributes are necessary to set. So, for each binding you need to figure, which attributes to set. And, of course, you can make errors.

They work currently fine for (i use these bindings with things files):

  • homematic
  • hue-bridge
  • mqtt
  • kodi
  • squeezebox
  • harmony hub

I use them because i like to have control over the thing names and usually have multiple instances of the same types. Copy/Paste in a text file is much more convenient then clicking in PaperUI. Additionally, if you need to remove the bridge, you do not need to rediscover all things again. (Not sure if that is still the case, i am using things files since OH2.3.)

This can be changed in the UI for discovered things.

image

Sometimes its difficult to tell which channels to create. If you know for sure, there are no problems in using things file.
Zwave can become a huge problem cause the channels are not documented. Same goes for Zigbee.

However I do use some things files, but only for devices where I know for sure which channels to create or if the binding doesnt support auto discover. I personally prefere things files, because it´s easyer to handle. Often one can make use of copy/paste, which isn´t possible in PaperUI. And its alot better overview having things in seperate files, rather than scrolling down on tons of devices in PaperUI. PaperUI items makes that issue alot worse. If you have a ton of devices, you´ll probably have a zillion items as well. I really hate PaperUI on this matter.

I know. Changing about 200+ thing names via PaperUI will make me think of moving away from openHAB. And i also know about json being a text file as well. And i also know about the Rest API.

Still it is far more convenient to me to use text files.

For each Thing type, initially discover a Thing and use the REST API so get its parameters. Then delete the Thing and use a text file based on the parameters of the discovered thing.

Hmm… Sounds a bit more ackward rather than just to use a textfile :slight_smile:

I prefer text files for quite the same reasons mentioned above. That also includes text files for things.
If the docs for a binding a not up to all the possible channels for a thing it can help to add things via PaperUI, create your text files for things / the bridge & items and delete the PaperUI things again…

It’s also possible to go through the binding on github to discover some of the possible channels and their correct names. Either way, in the end it is best to make updated changes to the binding docs, so that these discoveries can be shared with other users who prefer text file definitions :slight_smile:

2 Likes

Thanks for all the thoughts

You’re welcome.

I use PaperUI for installing Bindings/Addons, since this is a single simple task. (I only would use files for that, if i had to build several identical OpenHAB instances or would plan to rebuild from scratch quite often.)

For all other stuff i use files.
If you know you have to accurate with the syntax it’s quite easy to use files, at least with the bindings i am using.

Which bindings do you use?