BUG with paper UI

The other day I decided to change LivingRoom to Livingroom. So I took a replace all in openhab config dir.

The problem is that by doing this it did not make the paper UI linked items broken, so I had to manually remove all the linked items. I was expecting the paper UI to complain that it could no longer find the items LivingRoom_xxxxx, but NO errors at all!!, log were still producing nice outputs.

In my opinion if you edit items files like this it should remove those from the paper UI DB when it reloads the .items files.

To manually relink is fine, but the removal should be automatic in my opinion not to confuse the beginners. I just had a glimpse at the log and knew immediately what the problem was with the sitemap.

Did you manually added those items in the first place in PaperUI? otherwise those items in PaperUI were the once generated due to simple linking enabled and had nothing to do with your items in the item files.

And please use a better topic description and tag your topic with the right tags. This has nothing to do with development nor IDE or build process. thank you.

Moved to “Items and Sitemaps”.

Nope, I write all my items in files and use Paper UI to create things and then link the things to correct items. Then I use sitemaps to visualize my setup. This seems to be a pretty standardize way to do it here on the forum.

I thought development were a suitable tag, since it has to do with the core of OH and how items are stored i.e not directly visible for the user in the openhab config folder(which is the folder that comes mapped up with samba when you use openhabian…).

I don’t know what your exactly did or what version of openHAB your are using? But if I remove an item from the item file it vanish in PaperUI from the items list and on a channel of a thing that is linked to this item, the item disappears and the channel becomes unlinked. Maybe you mean something different. Or is it something specific due to the renaming. Could you provide some more details on the steps you took and what you did see.

In the end everything has something to do with the core. The tag is intended for questions about the internals. If you had posted a code snippet from the core that points to the problem you are seeing then it would have been appropriate. Until then it’s something that doesn’t do what you expect, and unless we can pin point the specific problem it can be claimed to be a bug. Just please don’t call fire when you see smoke, it just distract from the actual problem

2.4

Maybe that’s the bug, I didn’t remove it, I just renamed it. So maybe the rename doesn’t behave same way as removing. It would be awesome if @hilbrand can try to just change case of a letter in a linked item to confirm that the same behavior can been seen.

I just wanted to point out this minor bug, to help beginners which are not used to look at the logs… For me not a problem at all. I just have seen so many OH user switch over to homeassistant due to these minor bugs over the last few years.

I tried renaming the item. It still keeps working, because the linking is not done based on the item name, but the channel configuration of the item. If I have PaperUI open, do the rename, I see is that the name of the item is not refreshed to the new name when I show the channel of the thing it is connected to. I have to do a refresh of the page to show the new name. This is a refresh bug of PaperUI. I’m not sure if this is the same as you described because you mentioned you had to remove all the links, which would suggest something different.

That’s nice of course. But it doesn’t help if you shout ‘Bug with paper UI’ in the topic title :wink:

It would certainly be interesting to know why people switched. I was under the impression HA is more small bugs related to the frequent releases.

We have to be careful here. The linking is actually depending on the item “name”, which serves as a unique ID. It is not depending on the item “label”. While developing Paper UI NG I fell for that quite a few times. Because for rules the label is “name” and the unique id is “uid”.

Yupp, so when the item name change from LivingRoom to livingroom it should have failed, but log kept saying LivingRoom_Temperature updated to xx and of course in my sitemap it was UNDEF because sitemap used the item Livingroom… And PaperUi still showed that Netatmo Temperature were linked to LivingRoom_Temperature, so I clicked + linked it to to Livingroom_temperature then deleted LivingRoom_Temperature and all good.

BTW I can happily change the title to something else, like Minor bug or do you have any better suggestion @hilbrand.

@David_Graeff I have looked at your new PaperUI a few days ago, and will give you some feedback of your great work next week hopefully…

Close. The standard way is to define the Link in the .items files, not in PaperUI. The problem is the text configs and the JSONDB files are completely separate. They really have almost nothing in common and they do no interact. They are two completely separate configurations for OH and except for the fact that text configs take precedence, they do not influence each other.

Thus, changing the name of an Item in a .items file will not change anything in the JSONDB.

Development is a place for those who are working on the actual code to discuss issues like how to get their build working, coding style, and other development focused issues. General user posts like this belong in the other parts of the forum. The Development category was created as part of the merge of ESH back into OH to replace the function served by the ESH forum.

In my experience this does not work. The Link remains and because the entry in the links database remains OH thinks that Item still exists. I’ve seen several people run into this when trying to migrate from PaperUI to text configs. The only way I’ve found to fix it is to close OH and manually edit the links JSONDB file to remove the links.

It’s not a bug. It’s a known limitation. I recommend either defining all your Items in PaperUI or defining all your Links in .items files. In the mean time, you can stop OH and manually search and replace in /var/lib/openahb2/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink.json to fix the links.

If there is a bug here, it is that OH appears to assume that Item names that appear to exist in the Link DB entries actually exist even when they do not.