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:
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:
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?
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.
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.
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.