Sitemaps - lesash/openhab GitHub Wiki
Sitemaps are used to create elements of a user interface for making openHAB items accessible to various frontends.
Sitemaps are a declarative UI definition. With a few lines it is possible to define the structure and the content of your UI screens. Sitemap files are stored in ${openhab_home}/configurations/sitemaps
.
The openHAB runtime comes with a demo sitemap file, which should let you easily understand its structure.
For easy editing, the openHAB Designer brings full IDE support for these files, so you can easily check the syntax and find out about the options you have. (Again, for the technically interested, this is also an Xtext DSL.)
Sitemaps can be composed by grouping various user interface elements into areas, which will be rendered by openHAB.
The following elements can be used in a sitemap definition file (alphabetical order):
**Element name** | **Description** |
Colorpicker | |
Chart | |
Frame | Area with either various other sitemap elements or further nested frames |
Group | Renders all elements of a given group defined in an items defintion file |
Image | Renders an image |
List | |
Switch | Renders a switch item |
Selection | Renders a selection item |
Setpoint | |
Slider | Renders a slider |
Text | Renders a text element |
Video | Displays a video |
Webview |
Syntax: Colorpicker [item=""] [label=""] [icon=""] [sendFrequency=""]
Frames are used to create a visually separated area of items.
Syntax: Frame [label=""] [icon=""] [item="<item">] { [additional sitemap elements] }
Syntax: Group [item=""] [label=""] [icon=""]
Syntax: Image [item=""] [icon=""] url="" [label=""] [refresh=xxxx] refresh is the refresh period of the image in milliseconds
Syntax: Image [item=""] [icon=""] [label=""] [service=""] [period=xxxx] [refresh=xxxx] refresh is the refresh period of the image in milliseconds
Syntax: Switch item="" [label=""] [icon=""] [mappings=""]
Syntax: Selection item="" [label=""] [icon=""] [mappings=""]
Syntax: Setpoint item="" [label=""] [icon=""] minValue="" maxValue="" step=""
Syntax: Slider item="" [label=""] [icon=""] [sendFrequency="frequency"] [switchEnabled="switchSupport"]
Syntax: List item="" [label=""] [icon=""] [separator=""]
Syntax: Text item="" [label=""] [icon=""]
Syntax: Video item="" [icon=""] url=""
Syntax: Webview item="" [label=""] [icon=""] url="" [height="<heightvalue"]