Repeated elements in "PAPER UI/Control" section

Hello all,
I’m running Openhab version 2.54, on a raspberry 2. I’ve installed the internal MQTT broker, and using the graphic interface I’ve created the channels to retrieve data sent from the sonoffs:

Then I’ve created the item and sitemap files.

From item file:

Switch Sonoff_Basic_1_Switch "Sonoff basic" <switch> (gSonoffBasic)  {channel="mqtt:topic:sonoff_basic1:switch"}
Number   Sonoff_Basic_1_RSSI   "RSSI sonoff basic [%.0f %%]"       <qualityofservice>  (gSonoffBasic, gRSSIsonoff) {channel="mqtt:topic:sonoff_basic1:rssi"}

From sitemap file:

   Frame label="Sonoff basic" {
		Default item=Sonoff_Basic_1_Switch
		Default item=Sonoff_Basic_1_RSSI
	}

All works,
immagine

But coming back to the “PAPER UI/Control” section, I find the elements created by PAPER UI, plus the items declared in the item file. See below:

immagine

As you can see, the elements declared in the item file have been added to the already existing channels, but in fact they are duplicates.

The question is:
How do you avoid duplication? When you define in PAPERUI an MQTT element (like a sonoff), how do you use it in the sitemap file without declaring it in the item file? Where am I doing wrong?

Thanks for your answers.

See if you actually have duplicate Items. If you have simple mode on, Items will be autocreated (with gibberishy names)

Hello rossko57, and thanks for your answer.
Sorry, I probably didn’t explain it well. There are no repeated elements inside the item file.
The “Simple mode” function in item linkin is ON.
How can I use an item element (like the sonoff) inside the sitemap file without declaring it in the item file?

If the Simple Mode is ON, openHAB will automatically create items for each and every channel. The used named are “gibberish” and more important these items are NOT stored in your Items file! You can see them on PaperUI (Configuration-Items), those items can be deleted via PaperUI ( notice the dustbin icon), while the items created via file can’t.
In order to use an auto created item in sitemap, check its name on PaperUI and use it like the other items.

1 Like

How do you avoid duplication?

After declaring the item in the item file, you could simply press the Channel button (the white ring inside the blue circle) to unlink the auto created items. Then you should see only see the manually created item in the PAPER UI/Control section.

Alternatively, as @rossko57 pointed out , in PAPER UI/Configuration/System disable Simple Mode in the Item Linking section to avoid duplicates at all.

1 Like

You can create Items using xxx.items files or by using PaperUI.

1 Like

All clear. Yesterday I commented on the items created manually inside the item file, and in the Sitemap file I replaced them with those created through PAPERUI. It works, but I noted there is a greater delay in the sonoff response. I assume the problem is in the settings for catching the MQTT topic. I will study the problem more carefully as soon as possible, I think I have read something about it in the forum.
For the moment I stay tuned, thank you all and greet you.