Cannot link channel to item issue

Hi all,

Here are my working flow by rest API,
1 discovery scan
post /discovery/bindings/{bindingId}/scan

2 inbox approve discovered thing
post /inbox/{thingUID}/approve

3 links link
put /links/{itemName}/{channelUID}

The first two steps are ok, but the link step, I always get
"Cannot add element, because an element with same UID (S20 -> orvibo:s20:ACCF2392F5BE:power) already exists."
If I do this on Habmin, I got no respose from Web GUI.

However, if I delete the two automatic created items during this device discovery scan -> inbox aprprove process.
I can link the discovered thing’s channel to S20 item which I pre-configured on my sitemap, meaning I edit the sitemap previously.

1 My question is, is it necessary to delete these automatic created items during the device discovery scan -> inbox aprprove process, to make the linking channel to pre-configured item on sitemap working?

2 I mean, is it the deleting action is something have to do for now? Or I have made some mistake for that?

Thank your very much.

Below are my sitemap for reference. Thank you.

sitemap demo2 label=“demo2”
Frame {
Switch item=zwave_device_153bea5a84f_node15_switch_binary
Switch item=S20

No - these items do not actually exist. The system creates the items on startup if you are running in this “simple” mode and it finds that there are no items atached to a channel. However if you try and edit these items, you will get an error as they can’t be managed.

If you simply create an item yourself, then next time you start they will not be created (at least that’s my understanding.

It’s also possible to have multiple items connected to a channel, so in any case you don’t need to delete one item to get a new item to work.

Hi chris,
Thank you very much for your response and information.
Below my understanding, experience and some questions.

1 As you mentioned “simple” mode,
is there some other modes?
if so, how can I start by different modes?

But in addition, you may need to link the channel to item.
And as channel has been linked to auto created item, I can not link to my sitemap item until I delete auto create items.

Again, And as channel has been linked to auto created item, I can not link to my sitemap item until I delete auto create items.
So this description is different from my experiment experience.

Thank you.

Please refer to the link I posted - this shows the setting to disable simple mode.

Why? An item is linked to a channel - not the other way around. As I stated earlier, you can have multiple items linked to a channel.

I’ve just tested this and I can create a new item and link it to the channel in this mode - you end up with two items linked to the channel, but it does seem to work.

Hi chris,
Thank you very much for your response.

I guess you were talking about.
This feature can be deactivated by setting
1 However, if I use env in shell. I got null
openhab> env org.eclipse.smarthome.links:autoLinks

2 UIs can check whether this service is active or not by accessing /rest/links/auto. which is also mentioned in the link
I got error from http://localhost:8181/rest/links/auto
“error”: {
“message”: “HTTP 404 Not Found”,
“http-code”: 404,
“exception”: {
“class”: “”,
“message”: “HTTP 404 Not Found”,
“localized-message”: “HTTP 404 Not Found”

Do you have some idea of my problems?
Thank you very much.

I’m not familiar with this console command - why not just add it directly into the configuration file?!?

Not really. What version of openHAB are you running?

chris, thank you very much for your response.
I use 2.0.0-SNAPSHOT.

____ ____ ___ ____ / / / / | / __ )
/ __ / __ / _ / __ / // / /| | / __ |
/ /
/ / // / __/ / / / __ / ___ |/ // /
_/ ./_// /// /// |/_____/
/_/ 2.0.0-SNAPSHOT

Yes, but what version of the snapshot. It’s built every night - please confirm the version that is being run.

Hi Chris,

I can NOT find the nightly version in the boot up message.
Is there any simple way to find that info?
I believe I set up my environment a month ago.

Thank you.

Log on to the karaf console and perform a ‘list’ command.

I suggest you simply update to a more recent version.

Thank you, chris.
There is a long list, which one I should post?
188 | Active | 80 | | HABmin User Interface

Would you please suggest some links for the instructions for update if possible?

Thank you very much.

One of the core bundles would be best, although this version of HABmin is VERY old, so if the rest of the system is just as old, then it won’t support the features you want to use.

You need to download and install the recent nightly snapshot. You can keep the userdata and config folder, but the rest should be replaced with the most recent data. There is a thread on the forum about upgrading but I cant find it right now sorry.

1 Like

I pick some as below.

132 | Active | 90 | | openHAB Core
133 | Active | 80 | | openHAB Karaf Integration
159 | Active | 80 | | openHAB 1.x Compatibility Layer
160 | Active | 80 | | openHAB REST Documentation
161 | Active | 80 | | openHAB RRD4j Persistence Bundle
162 | Resolved | 80 | | openHAB Basic UI Fragment, Hosts: 152
163 | Active | 80 | | openHAB Classic UI Fragment
164 | Active | 80 | | openHAB Dashboard UI
165 | Active | 80 | | openHAB Classic Iconset
166 | Resolved | 80 | | openHAB Paper UI Theme Fragment, Hosts: 154
168 | Active | 80 | | openHAB Serial Transport Bundle
170 | Active | 80 | | Network Binding
171 | Active | 80 | | SomeSystem2 Binding
173 | Active | 80 | | SomeSystem Binding
179 | Active | 80 | | ZWave Binding
188 | Active | 80 | | HABmin User Interface
189 | Active | 80 | | Orvibo Binding
190 | Active | 80 | | openHAB Weather Binding

Thank you very much for your information.
Are you talking about below one,

Yes - so your system is very old - approximately 5 months old!

Yes - that’s the one. There is a script that I use for upgrading from @xsnrg in one of the first few messages in that thread.


But xsnrg have NOT posted in the thread.

Thank you.

sorry - wrong thread.

1 Like

Chris, thank you very much.

The latest version can always be found here:

1 Like

Thank you very much, xsnrg.