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?
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.
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.
I guess you were talking about. This feature can be deactivated by setting org.eclipse.smarthome.links:autoLinks=false
1 However, if I use env in shell. I got null openhab> env org.eclipse.smarthome.links:autoLinks null
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ā: ājavax.ws.rs.NotFoundExceptionā,
āmessageā: āHTTP 404 Not Foundā,
ālocalized-messageā: āHTTP 404 Not Foundā
}
}
}
Do you have some idea of my problems?
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.