Okay so i’ve installed openHABian on a PI3, the “hassle free ISO”. everything’s fine, i’m trying to follow the tutorial and i can’t, for the life of me, have My basicUI up and running, it keeps telling me
It seems like you have not defined any sitemaps yet. To build one, please check the documentation for guidance.
I’m following this guide, except i do not have Zwave device, so i skipped that part.
There is no need to redefine the label, if already set through items file.
If changing the label to "Gyz's Phone [%s]" you would see the item’s state as text. As this item (network binding) is read only, I would suggest not to use a Switch but a Text widget, so:
After a fresh installation these directories are empty (except for the readme files), so you have to create a file there. We’ll use “default.items” as the items file and “default.sitemap” as the sitemap file in this tutorial.
i understood there had to be a conf folder somewhere, not that “conf/” meant “/etc/openhab2/”
Any how, I’ve moved everything where it belongs ( /etc/openhab2/items and /etc/openhab2/sitemap) and now I do see the default sitemap available in BasicUI.
I don’t get it, in your example, isn’t Presence_Phone_Gyz still a Switch Type ? If i apply your modification (ie insert [%s] in label) the only difference i can see is a ON text next to the slider
This only reflect the state of the slider at the right (if i slide it off and refresh the page, network icon goes red and text changes to OFF) what i’d like is to have this line reflect if my phone is or isn’t connected to network, i tried turning off / on it’s WiFi but changes are not reflected on this line. (i did check when turning on WiFi on my phone that it was given the same IP as before and i waited enough time for openhab to poll phone connection status)
Okay, i think i get it a little bit better now, tell me if i got this straight.
so in this case i have a thing called gyz’s phone created from the network binding
That thing has two channel, online and time.
in default.item i declared an item called Presence__Phone__Gyz, of the type Switch, that reflects the state of the channel online, of my thing gyz’s phone
In sitemap, i define how i want my UI to present me this information. I’m only displaying the item Presence__Phone__Gyz and i use for that a type Text, since all I care is knowing if the state is ON or OFF.
is it better to define label in .items or .sitemap ? which one has prevalence ?
So once again if i get it straight, what paperUI does, is let me create things and link item, and when i go to control it automatically create the .item and .sitemap with one frame per things, that display an item for each channel of that thing. is that it ?
Right now, my sitemap for BasicUI is OK (as in it loads and i get to see the item represented as text), but the item state is always OFF, even when my phone is connected to my network
I would always define the label in the item most detailed (including type & location), and override it in a sitemap if neccessary.
For example if you have a functional view of all your temperatures for example, it is neccessary to include the location in the label, but maybe not “temperature”. If you view all sensors/switches of a special location, it is neccessary to include the sensor type (temperature) more than the location.
Better not think of PaperUI day to day UI. It is more of an configuration UI. You only are able to group items by location (defines the tabs on top) , everything else is undefined.
Regarding the presence via network, some devices work for me, some not. My phone does not work, my smarttv works perfectly. Some devices just don’t answer on all requests, maybe the router decouples wlan devices from the lan. Try another device on your lan to check if it is device or connection dependent.
The idea of defining the label in .items file is, you can use items more than once in a sitemap, and you can use items in more sitemaps, so, no need to redefine the label over and over again.
But of course, the label defined in .items is only a “default” label for this item, so you are free to change the label,
e.g. if you have a sitemap which lists all your lights in a subpage, and other subpages for every single room, then you certainly would prefer a label which includes the room’s name for the former and a label without the room’s name for the latter.
In question of false state of an item, please keep in mind that sometimes the UI is not updated properly, so please try to reload the page. If this does not help, take a look at openhab.log, if there are errors and events.log if the item was ever updated.
I second that explanation. The Item label should be unique and meaningful while the Sitemap element label should be specific. Here is an example of how I do assign labels, on the example of one temperature sensor:
item label: Living room Heater1 Temperature Probe
sitemap label inside the “Left Heater” frame: Temperature
sitemap label inside the “Temperatures” frame: Living room (left)