Openhab2 - auto discovered things - Sitemaps / Item files

I hope this is the right section of the forum, else direct me to the right one please

Hi, i’m a bit confused
I run Openhab 2, It auto discovered my z-wave nodes and my Sonos speaker. Fantastic!!!

I understand that for sitemaps we still have to use the technics from openhab 1.x

I see that for my Z-wave nodes I can directly copy the channel information from paper UI in my sitemap

e.g.

Switch icon="light" label="lamp 1" item=zwave_device_ba708ab2_node8_switch_binary

and that works!

But the Item names are difficult to read, remember and trace back to a specific lamp or speaker

And if I look at examples of the Sonos speakers, the items are declared in the item file and I cant get it to work properly with my auto generated item names. when i use them in a sitemap

Wat is best practice and how to handle auto discovered things/Items/channels?
In item, sitemap and rule files

In PaperUI, go to “Things” “Your Binding”, click on it, then unlink the autogenerated channel, click on “+” to add a new channel, in the pop-up scroll all the way down and click on “Create new item”, then you are able to create an individual name for your item.

Edit:

Hi thx for your answer Sihui,

In paper UI:
If I go to Configuration > Things > e.g. Sonos speaker, I can unlink and link the same channel but I have no option add a channel (not plus symbol or icon)

Is my openhab 2 version to old or I’m I looking in the wrong place

That’s “my” plus-sign (latest openHAB 2 snapshot). I don’t know if that was implemented recently, I changed to openHAB2 a couple of weeks ago.

Edit: ahhh, maybe this is your problem: you first have to unlink the channels, THEN the plus sign will appear.

Do we have to unsign/unlink a thing to be able to change label name ?

No, just the autogenerated channels.

1 Like

Strange, I updated Openhab 2 to Build #600 by just copying the new files over the old ones in de ophab2 folder.

Started Openhab (it shows Build #600)

I get no Linked items +

And I’m missing the copy symbol after the item name as seen in your screenshot

I’m rendering the page in google Chrome and clear my browser cache

I don’t think that is a good way to update. At least you should delete the contents of

/userdata/cache/* and
/userdata/tmp/*

before upgrading.
Then restart and see what happens.

Official upgrading instructions can be found here:

for apt-get installation: http://docs.openhab.org/installation/linux.html#upgrade
for manual installation: http://docs.openhab.org/installation/linux.html#upgrade-backup-and-restore

1 Like

Thank you so much for this instructions Sihui

I didn’t know there was already suds a detailed documentation for installing Openhab 2
I see now that i made some critical mistakes in installing Openhab 2 manual and later on updating openhab manual .

i’m a Windows server guy so shoot me :wink: But my powershell skills are of little value in Linux

i will start from scratch so that i will have a solid base to work of , i wil go the apt-get way

i will comeback, hopefully stronger and more knowledgeable

At the beginning I had to do that three or four times.

Good decision.

By the way, maybe you are interested in

It provides you with a ready to use image. Although I personally still prefer the old school way of manual setup (it gives you a little bit more knowledge about Linux).

Thx Sihui,
The more i learn the better i can troubleshoot later on if something goes wrong
and i don’t want to use a PI

A intermediate solution with apt-get is the way for me :slight_smile:

One more thing, did you turn off Simple Linking Mode in Configurations - > System? I don’t think it lets you link Things to Items manually in PaperUI with this turned On.

Hi Rich,

i’m in the process off installing openhab2 the proper way as soon as i’m up and running again i will check that setting

txh

Reinstalled Openhab2.

When I go to Configuration > System > Item Linking, and turn of Simple Mode, I can then Add or remove a link
When I add a link, I can make my own item name and label.

Hi

I´m not really sure, if my topic belongs to this threat, but as it concerns UI things and sitemap it should be ok.
Yesterday I started with a completly new installation just for test purpose an a Win7 Notebook.
I added one autodiscovered thing, a Onky AV and createt a items file with one knx item.
The connection to knx works fine (tried it out with HABpanel) bus whe I open the basic UI, i just can see the thing (ON/OFF Onky etc) but not my sitemap.
I was wondering, how a sitemap and the things can be combined and how i would combine e.g. a knx item with an autodiscovered thing letzt say to control my AV via knx buttons. In OH i did that in the items file.

THX
Daniel

i’m not 100% sure, but i think:

  • we have a item defined in the item file
  • we have a item autodetected as you can see in paper UI

both are items you can refrens by there name

I do not know which one is first declared “automatically generated items” or the items in “item” file

if “automatically generated items” get proccesed first?? I think you can use them in you items file.

Maybe i’m wrong , i’m new to this and learning step by step.

You need to create Items that are linked to the Channels on your Things and then create a Sitemap just as you did in OH 1.x.

I’m told you can link Items to Channels in PaperUI or you can do it in an Items file using { channel="channelID" }.

The “default” sitemap you see that has the Things listed is an automatically generated view of your Things and can not show any Items.

Almost. Things are autodetected. A Thing represents a device or API. A Thing can have one or more Channels .One links a Channel to an Item. Everything else in OH uses Items.

In a sitemap, your rules, etc. Items are used.

THX

will try that soon. Kids, work, wife and study don´t leave that much time :slight_smile:

Regards