Copying thing with channels blocks further activity

OH 4.3 snapshot

Hello again
I just pressed the copy button in a thing configuration and created a new thing. It also copied all channels (without uid change) and locked them for further action , telling me they were created from file.
There is no way to delete this thing. I had to change all uid names in thing.Thing,json to use it later on.
Is that the way the copy button should act?

4.3 has been released with an additional point release (4.3.1). You should propbably be running that instead of an unspecified snapshot which could be up to six months old. That’s a lot of development.

Anyway, I was able to confirm this isn’t working in 4.3.1 too so please file an issue on the openhba-webuis repo. The copy command should change the UID of the Channels to match the UID of the new Thing it’s creating. It’s failing to do so which makes OH become confused and unable to manage the newly created Thing.

I don’t know how wide spread this issue it but it definitely applies to MQTT and HTTP Things.

At least for me, restarting OH seems to clear out the bogus copied Thing.

Thank’s, I used your words to file the issue

It does not show the thing in the thing list (main Ui) , but it’s still in the thing.Thing.json file

Have you already opened an issue for this behavior ?
I’m facing the same problem.

I am using OH 5.0, V 4464 , where the issue is been solved. In general I think, that it doesn‘t make sense to copy things with channels, because now, the channel uid is a mixture of old channel name and new thing uid. That makes it a bit confusing. Finale you can correct the thing.json file manually.

mqtt:topic:mqtt_nas:TH08:TH03_IstTemperatur

TH08 is the new thing and TH03 is the old channel

Yes, you are right. The mixture within the thing UID and the channel UID is not useful.
Not sure why this function has been implemented at all.
I just gave it a try in OH 4.3.1 and afterwards it seems to be better using the ‘code’ tab and copy/modify/paste the code to a newly created thing…
Will do the cleanup now :kissing:

How did you have the thing id ending up as a part of the channel id?

It might be my fault, when I started with OH. I created a thing with UID ‚TH03‘. On the channel side OH has a comment at UID , that the UID should be unique. I didn’t recognise that this is only valid within the actual thing and not for overall. So I decided to use ‚TH03_Temperatur‘ instead of just ‚Temperatur‘. That gives the complete UID TH03:TH03_Temperatur.