"Imported" Items do not show in Paper UI

All,

even I claim to be somehow experienced with OH1, I struggle with the new OH2.
I copied the rules, items & sitemap into the OH folder (/etc/openhab2/…) and the runtime seems to digest them (many errors in openhab.log mentioning the rules and such).
However, if I try to link the things to my items (item file mentioned above), I do not see any of the items in the Paper UI (Paper UI -> Configuration -> items: No items found).
By the way I am in the complex Mode of Links (not Simple Mode).
Does this mean I need to create each an every item again and cannot import my (smoothly running) items into OH2 ??
Thanks in advance.

I had a similar behaviour in my OH2 environment. Until now I really don’t know why this has happened. In the end I did a clean new install (apt-get) and tried again. The only difference I was aware of was that I didn’t copy the items/rules…-files over to OH2, but made new blank files using a ssh connection and then c&p item per item line to the new file (adding each item with a channel=" command).

With the new installation I do see the items now in PaperUI. I also see the link of item<->channel in HABmin.

You could try the following command on the karaf console:

smarthome:links list

You should see all linked item-file based items in this list. If not, PaperUI also will not find them.

Hi @jaydee73,

thanks for your response.
Your approach sounds like a bunch of work creating the items all over again.
I somehow adapted to the files based config and am more than confused about the DB approach of the new openhab2 config.

Following your suggestion smarthome:links list doesn’t show up anything - which makes sense, because I do not see them in the Paper UI.

So how to let the runtime “scan” the item file as a basis for the new item handling.
Anyone else who could help me avoiding starting from scratch?

Futhermore I think comparing to text files to be sure not to miss any item is much easier than comparing my OH1 item file with the Paper UI items list.
Is there any other file containing the items in the new DB to compare or is this an opaque DB structure?

Another Thing is that I can see all my items in the persistence folder of OH2:
/var/lib/openhab2/persistence\rrd4j
So they must be recognized by OH2

Afaik you can use items or things configured in Paper UI in your .items, .rules or .sitemap, but you can’t use items configured in .items in the Paper UI.

Be aware that Paper UI is not meant to use it as a UI for daily use, this is what you would do with Classic UI, Basic UI or any other UI (except Paper UI ;)), because Paper UI is only for configuration (control panel is more or less to “test” if things and channels are working correct). Paper UI is for administrators only.

So, this “restriction” is not a severe one :slight_smile:

Hi @Udo_Hartmann,

thanks. Obviously you are right.
The question is where Paper UI puts the files generated during setup (with Paper UI).
I would love to have just .item files to c&p from them into my files (just to replace the OH1 specific {…} with the new channel configuration.
But I do not see any files in the oh2 folder beside my own ones.

So where do I get the syntax of the new generate items?
Do I really need to go into the UI and check each single item (instead having all of them in one file)?
Thanks

PaperUI doesn’t put any files anywhere. The data is stored in a database (e.g. the item and thing database).

Here is what I did:
Let PaperUI discover all your things (for me: mainly zwave devices). Furthermore, let it discover the appropriate channels ot each thing.
Then you have all the channel information you need.
C&P your item file (s) from your OH1 installation into the OH2 items directory (which indeed is empty!) (I removed all the binding data before)
Add the channel informations to the appropriate item data in your items file.

You do not need a new syntax. You can take all the data from your OH1 items file (except the binding part of course) and use it for OH2 (with the new channel data).

I also had difficulties with the differences between DB data and file data. I therefore decided to move away from the DB approach and use my OH1 files (just like you to have it all in one file). Nearly no need to use PaperUI (execpt for binding installation and Thing discovery).

Thanks, @jaydee73,

I will try that and hope that Paper UI really is able to generate all the channels to my items.

Wow that’s weird.
After I have changed some of my items to the correct “channel” definition, OH2 reloaded successfully ALL items (even those with the “old” {definition} and they are even available in the Paper UI.
:slight_smile:

Damn it…
Too early happy…
Now they are gone again… ALL of them…???

While working on the Migration Tutorial there was some discussion behind the scenes about PaperUI verses text based configuration. The recommendations from @kai and @ThomDietrich were to avoid PaperUI, at least for now and stick with text based configuration. Clearly PaperUI does make it easier to install addons than working in the Karaf console (if you are not used to the console) but beyond that, working with the Inbox and finding Channel Strings I would avoid PaperUI. I’ve reworked the migration tutorial to downplay PaperUI and emphasize text based and the Karaf console as a result.

Besides, text based and the Karaf console is actually a lot more like working with OH 1 than PaperUI anyway so the transition should be easier since it has more in common with what we are already used to doing.

PaperUI was developed by a third party company for ESH and openHAB 2 essentially gets it for free, but it is clearly not optimized for openHAB 2 and a mixed text file/database deployment. And given its origin I don’t think it is guaranteed to ever really become optimized for OH 2, but would love to be proven wrong.

If you want a web based admin I would recommend working with Habmin instead and stick to text based for Items and Rules and all the rest.

2 Likes

Hi @rlkoshak,

thanks for the clarification.
I agree that Paper UI on the first look is easier, but if you already have a working config it’s a lot of c&p from the UI to the text file.

Anyway - I did it so far for the (in Paper UI) visible bindings and things, but struggle a little to “guess” the other channels for e.g. weather binding, which are not available in Paper UI.

If I got you right, you mean these could be gathered by using the karaf console?
So there is more informationn than in the Paper UI?
I thought it’s just the same in a UI dress.

Anyway - I did it so far for the (in Paper UI) visible bindings and
things, but struggle a little to “guess” the other channels for e.g.
weather binding, which are not available in Paper UI.

Things and channels only exist for 2.0 bindings. The weather binding is a
1.9 binding so it therefore does not create nor does it support Things. You
configure these bindings with a binding config on your Items the same as in
OH 1.x. The Weather Binding is a 1.9 binding so there are not Weather
Binding Things to discover. Check the OH 1.9 wiki for these bindings.

If I got you right, you mean these could be gathered by using the karaf
console?
So there is more informationn than in the Paper UI?
I thought it’s just the same in a UI dress.

Tons more information and capabilities exist in the console. As a general
rule, the UI for ANY product is a greatly simplified (i.e. easier to use
but much less capable) dressing of the console/text based interface. See
the Karaf console doc
for more on working with the console.

Hi @rlkoshak,

Thanks for your help and patience.
I slowly get into the new structure of OH2.
My assumption was that bindings mentioned (and installed through) in the Papier ui would follow the “channel” architecture.

However, after playing around a bit I still like the “file” architecture better than the DB structure.
I guess it makes sense though because of other reasons I cannot judge.

Openhab rocks!

Thanks to all of you and this amazing community!!!

Just to be clear, the database verses text files configuration is a completely separate issue/concern from Things/Channels verses traditional Items binding configs.

Even with OH 2 bindings, one can manually define Things in a .things file. There is a separate thread on how to do this with Zwave (one of the few apparently that doesn’t handle text file Things very well) but most of the others should.

Hi @rlkoshak,

you’re right - sorry for beeing vague.
What was confusing me was that generated Things (by Paper UI) did not show up in the things.cfg.
This would have made it easier (for me) to follow.
Anyway - I got it now :wink:
Thanks for your help.