I just started recently with OpenHAB and yes, I am a newbie regarding this. But the docs did not bring any light here…
I create with the site builder UI a sitemap which I copied to ./sitemaps/LOCATION.sitemap. According to the log the sitemap is read and I can see it in my Basic UI.
On the paper UI I have several things already discovered and configured (mostly Enocean devices) and I can switch the (experimental) light on and off through PaperUI. Perfect so far.
But how do I tell the Basic UI (which shows the sitemap) which item is in which room? Soory, I do not get it here…
I thought I have to use the device ID or stuff like this. But where to add it? And what to add?
Well, I thought I use the HomeBuilder to create my site. And then edit the sitemap file to add the correct things/ items to the file.
But again: I have things in my PaperUI which I want to add to a room in my sitemap.
How to do this? (command line preferred) If not command line- HomeBuilder is not really useable as it appears to me it always creates a sitemap from scratch so I would have to re-build it every time when my smart home grows… I think this is not the way it is supposed to work…
Use site builder to create a sitemap once and then edit it on command line. Adding things and stuff… but again: how and where?
I have a sensor (enocean) which is on my door. I would like to see my house in terms of rooms, not items. Therefore I have a sitemap. And now you say I can not add any devices there? So the sitemap is useless as it is just a map without content?
This might be the point. And no, this is not mentioned in the docs (or I do not understand it there). They mention groups as a special Item type that can be used to define a category. Which I do not want (nor need currently).
I shortened the sitemap now an hopefully you can tell me where and how to add the item from PaperUI to the sitemap:
So I have a single location defined. Within this location I have a frame called “EG” and one group called GF_Wardrobe.
So you say I have to define the group items here?
In the docs I read about configuring group items which is not really helpful as it simply groups groups together (livingroom, temperature) but still not having a clue how to tell about the door contact…
Number Livingroom_Temperature "Temperature [%.1f °C]" {channel="..."}
Appears I have to add something like the channel paramer to the line (as an item? as a switch?).
That is essentially it, yes.
A sitemap only describes which Items to show and how to show them.
It has no influence at all over what Items actually exist in openHAB, what kind of Items they are, how they are linked to any Things representing real devices, or how the Items might be arranged in Groups.
All that happens elsewhere.
You will references to managing Items, links, and Things with both PaperUI or with a text file based method of xxx.items and xxx.things files.
What you do when using Sitebuilder I do not know, but therelationships will be the same.
Real devices -> Things -> channels -> idealized Items -> sitemap for display of Items.
Still don’t get it, sorry.
I see screenshots from sitemaps where i.e. current degrees are shown. In my sitemap above I see a slider for the light.
Am I right these values change depending on what the devices (temperature measuring or a Enocean switch for the light). But for this the sitemap needs to know WHICH device it should show.
And this is what I am missing here… How the heck do I tell my sitemap to use the value from device foo?
I mean, if it would not have this linking there would be absolutely no sense in a sitemap as I do not see any current states…
Well, this looks more or less what I am looking for. I guess I alread have the first two links somehow through PaperUI (real device [door contact] to a thing [in PaperUI] which is connected to a channel.
Now I am looking for a way for the next steps. What means “idealized items”? Where do I define them? And how do I tell my sitemap to display the values of these items?
You don’t.
You tell the sitemap to interact with an Item.
An Item is an idealized model device, like a dimmer, which are at the heart of openHAB.
A logical, imaginary, perfect device. All dimmer Items look and behave alike, whether they eventually link to a zwave dimmer or a modbus motor speed controller or an ethernet relay board or a remote webpage.
So it becomes easier to manage Items in rules and displays.
Things are the representation of real devices in openHAB, like a zwave dimmer device.
Things have channels, like a brightness % channel or an on/off channel.
Things take care of all the differences between real world devices, whether they dim 0-100%, or 0-254 steps, or 0-10. Whether they have different commands for on/off and setting brightness, or just the one setting. Whether they give feedback about changes, or none.
To do anything useful, you’d link an Item, using a channel, to a Thing.
When that chain has happened … your sitemap will be able to show and command a zwave dimmer.
I suspect that you didn’t see the New User Tutorial for “Creating a sitemap”. There’s a crucial statement in it, which I’ve bolded below.
Controlling your things via Paper UI is nice, but currently you can sort them only by editing the “Location” in the thing configuration. If you want to create your own view you can use a so-called “sitemap” which can be displayed in the Basic UI (you remember, it was automatically installed at the beginning).
But before that, you have to create an items file.
I think what you’re trying to do is go straight from PaperUI to a sitemap. Per @rossko57’s comments, there’s an in-between step of creating text-based items files. The tutorial above will take you through the entire process: take the things from PaperUI, link them to items you define in text files, and then show those items in a sitemap.
I read the Beginenr’s Guide. But it did not really explain it (well, somehow it does once you know…).
Ok, I think I understood how it should work…
But I am still struggling with it.
So this is the current state:
Having a thing in PaperUI which is a door contact:
From the edit icon in PaperUI I copied the channel (?) of “Contact”:
Now I am not getting any errors in openhab.log and I can indeed see my network device in my Demo site:
Appears to be working so far now. But why can I not create a Contact item? I want to see if my door is open or not. Using a Switch is not correct as I can not send a command to my door: “Close”…
Nothing wrong with your Contact type Item, of itself.
As we covered before, the sitemap is just a bunch of instructions about how to display Items. It’s structured list of widgets, each with additional details about how to configure that widget.
So here’s your sitemap. Frame is a widget with no associated Item, it just makes a box graphic. Contact is a … error. There is no Contact type widget in sitemaps.
While some have similar names, there is no relationship between sitemap widgets and the Item types you can associate with them. It’s common for example to use a Switch sitemap widget with a Number type Item, presenting buttons 1 to 4 and suchlike.
So, if there is no Contact type widget, how do you display a Contact type Item?
Use a Text widget, which shows Item details without any user buttons. You can use a Text widget with any Item type.
It’s hard work getting started in openHAB, because there is lot of different concepts and things to get right from end to end to get just that first device working.
Stick with it, it comes together.