I want to have the full control of my items and their links to the channels. But after some work openhab2 showed me also “old” or “auto items”. I switched off the “item linking” and tried to delete all items and links with karaf. Only the items in my.items file have to be active in the future. But when I tried out smarthome:items clear or smarthome:links clear the system accepted the command but nothing happened. The items and links are still active.
So what is the trick to have only the values from the my.items file active?
openHAB 2 will re-read your .items file(s) and display the info correctly afterwards.
It should not create any new items and/or links that you have not defined manually in your files if you have “Simple Mode” disabled in Paper UI -> Configuration -> System -> Item Linking
Can you post your “my.items” file to check the syntax?
Have you defined links to the channels there?
If you want full control, disable “Simple Mode”
You have it currently enabled
Anyway, this setting affects only new Things (not existing) and their associated items and links
The output of your karaf console looks to be ok
After you deleted the already stored items and links, your “my.items” file was re-read and the correct items and links were re-created.
Example: Node_2_Smoke is manually linked to the zwave:device:252cfaa7:node2:alarm_smoke channel
This is what the karaf console shows and it is correct.
I don’t see in your “my.items” file anything related to “RM_2_Temp” and “RM_2_Batterie”…
Do you have them in there or this is the issue? (that these 2 items should have disappeared but they haven’t?)
RM_2_Temp and RM_2_Batterie were old named items. I renamed them to the new one and saved the file. They are not in my.items file anymore - they are renamed in Node_2_Temp and Node_2_Batterie. The question is why does karaf show me the old ones again and again?
I think I solved the problem with a restart of openhab. After it all vales were killed. So I have to restart my system when I use such commands in the future.
Thanks to all
hmmm… that’s strange… (and you are running a very recent version of OH2 Snapshot (642)
In my system, when I delete the old items and links from karaf… they go away
check in your /var/lib/openhab2/jsondb for any stale references of the old items and links…
New openhab user here, just starting to get things going on a test setup, I can confirm the exact same behavior. Stale links are hanging out and are present even after running ‘smarthome:links/items clear’. Restarting my OH service seems to have remedied.