Sitemaps - lesash/openhab GitHub Wiki

Explanation of Sitemaps

Sitemap Definition

Introduction

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.)

Syntax

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

Element 'Colorpicker'

Syntax: Colorpicker [item=""] [label=""] [icon=""] [sendFrequency=""]

Element 'Frame'

Frames are used to create a visually separated area of items.

Syntax: Frame [label=""] [icon=""] [item="<item">] { [additional sitemap elements] }

Element 'Group'

Syntax: Group [item=""] [label=""] [icon=""]

Element 'Image'

Syntax: Image [item=""] [icon=""] url="" [label=""] [refresh=xxxx] refresh is the refresh period of the image in milliseconds

Element 'Chart'

Syntax: Image [item=""] [icon=""] [label=""] [service=""] [period=xxxx] [refresh=xxxx] refresh is the refresh period of the image in milliseconds

Element 'Switch'

Syntax: Switch item="" [label=""] [icon=""] [mappings=""]

Element 'Selection'

Syntax: Selection item="" [label=""] [icon=""] [mappings=""]

Element 'Setpoint'

Syntax: Setpoint item="" [label=""] [icon=""] minValue="" maxValue="" step=""

Element 'Slider'

Syntax: Slider item="" [label=""] [icon=""] [sendFrequency="frequency"] [switchEnabled="switchSupport"]

Element 'List'

Syntax: List item="" [label=""] [icon=""] [separator=""]

Element 'Text'

Syntax: Text item="" [label=""] [icon=""]

Element 'Video'

Syntax: Video item="" [icon=""] url=""

Element 'Webview'

Syntax: Webview item="" [label=""] [icon=""] url="" [height="<heightvalue"]

⚠️ **GitHub.com Fallback** ⚠️