I have the below item & sitemap files throwing the warnings in the log which result in not loading up the sitemap in the Basic UI. Any suggestions why?
To expand on what Bruce says, there is no Contact widget for sitemaps.
When you add lines to a sitemap, you’re adding elements that are really widgets to display this way or that way.
Some of those widgets have the same name as Item types - like Switch - but there is no direct relation. Often any given widget could be used with a variety of Item types.
A good starting point to display a Contact type Item would be to use a Text widget in the sitemap. That allows you to show the Item’s label, state, icon etc. but does not offer a way for the UI user to change it. https://www.openhab.org/docs/configuration/sitemaps.html
thanks @rossko57, I think this is the fix for my problem. I dont have access to my Openhabian environment now but I will definitely try this first thing I get hold of it this evening. The reason I was trying to use the syntax above was because this was part of the code generated for the sitemap through the UI Builder. If there is not widget named Contact, I guess its a bug in the UI Builder that needs to be fixed. Since I’m new to OpenHAB, I’m not sure where to post this so that the team can fix it in the next release. Once again, thank for the feedback.
Ok so I tried the below. Basically, I’m now using the Text Widget in the site map to display the status of the Contact type item in the items file. Unfortunately the status returned by FF_MasterBedroom_Door item is not shown in Basic UI. I dont see any errors nor warnings in the logs too. Are there any additional steps that needs to be followed?
That’s because you haven’t asked for the state to be displayed. There is an important part of the Item label which is the formatter, the part in [ square brackets ]. This telss the Ui how to display the Item state.
[%s] produces a simple string.
Contact myItem “my door [%s]” …
When you specify the label in an Item definition, that is the default label (and formatter) n the UI.
When you choose to give the optional label in the sitemap, this will override the Items label (and formatter).
Thanks @rossko57, you are the man :-). It worked finally! Would you be able to point me to the documentation related to what other formatter option we have?