-
-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new doc page for Main UI‘s special features #2188
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4ccb08c
Add new Main UI docs page
florian-h05 d16e965
Add Web Audio sink and UI Command Item sections
florian-h05 f543582
Fix links
florian-h05 ba78af6
Improve styling
florian-h05 1b02691
Minor wording improvement
florian-h05 1fe34dd
Fix more links
florian-h05 46d792c
Merge web audio section from about page docs
florian-h05 81d34b9
Link Main UI Web Audio docs from Multimedia docs
florian-h05 99cccef
Address review
florian-h05 7cb95c1
Fix markdownlint
florian-h05 9ff1e15
Add link to developer sidebar
florian-h05 75fca5f
Improve formatting of widget-expressions-variables.md
florian-h05 7847178
Improve grammar
florian-h05 910ae8c
Fix minor typo
florian-h05 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
--- | ||
layout: documentation | ||
title: Main UI | ||
--- | ||
|
||
# Main UI | ||
|
||
Since openHAB 3.0, the so-called "Main UI" is the main web user interface of openHAB. | ||
Main UI allows the administrator (you) to set up and configure openHAB, and provides many types of pages to visualize data and control Items. | ||
|
||
This page aims at providing an overview over Main UI's "special" features, which means it does not try to document Main UI in general or provide a comprehensive overview over all its many capabilities and configuration pages. | ||
If you are new to openHAB, please refer to the [Getting Started guide]({{base}}/tutorial/), which is introducing you to Main UI by using it to set up openHAB. | ||
|
||
[[toc]] | ||
|
||
## Developer Sidebar | ||
|
||
Main UI provides a developer sidebar for administrator user(s), that is accessible from anywhere in the UI. | ||
The developer sidebar is split into a "tools" section with several useful tools including a universal search across nearly all UI-configurable entities and a widget expression tester, and a "help" section aiming at providing help and useful information regarding configuration and setup. | ||
|
||
If your device's screen is wide enough (it has to be at least 1280 pixels wide), you can open the developer side-panel by: | ||
|
||
- Opening the **Developer Tools** page from the menu and enabling the developer sidebar. | ||
- Clicking on the help icon displayed in the upper right corner of most pages. | ||
- Pressing the key combination <kbd>Alt</kbd><kbd>Shift</kbd><kbd>D</kbd> on your keyboard. | ||
|
||
### Developer Sidebar Search | ||
|
||
As already mentioned, the developer sidebar provides a universal search across nearly all UI-configurable entities. | ||
This means, you can search through most configuration available in Main UI, including Things, Items, pages. | ||
|
||
Imagine you need to find all usages of an Item. | ||
You could start to open all rules, scenes and scripts, check persistence configuration and have a look at pages and sitemaps to find usages of that Item - Or you use the developer sidebar search. | ||
|
||
The developer sidebar search ignores case (so it doesn't matter whether you search `LivingRoom_Light` or `livingroom_light`) and searches inside the following entities: | ||
|
||
- Things | ||
- UID | ||
- label | ||
- Items | ||
- name | ||
- label | ||
- tags (requires exact match, i.e. if the Item has a tag `Lightbulb`, only the search query `Lightbulb` (case doesn't matter) will match) | ||
- metadata | ||
- Pages (including Sitemaps) | ||
- uid | ||
- label | ||
- content (widgets, tabs, charts, etc. with their configuration)/slots | ||
- Transformations | ||
- uid | ||
- label | ||
- type | ||
- Rules, Scenes & Scripts | ||
- Item name & Thing UID of triggers, actions & conditions | ||
- script code (e.g. Rules DSL, JavaScript, and even Blockly) | ||
- script MIME types (requires exact match) | ||
- Blockly scripts (using `block`, `blockly` or `blocksource` as search string, where case is ignored) | ||
- tags (requires exact match) | ||
- Persistence Configurations: | ||
- label & service id of persistence service | ||
- Items persisted by persistence service | ||
|
||
## Web Audio Sink | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This Info is also available here: https://www.openhab.org/docs/settings/aboutpage.html#enable-web-audio-sink-support |
||
|
||
Main UI implements a web audio sink which allows the openHAB server to play audio through the web browser. | ||
|
||
To enable web audio sink support for a client, open the **Help & About** page from the menu and turn on the **Enable Web Audio sink support** option. | ||
As it is setting specific to your browser environment, web audio support has to be enabled for every client where it should be used. | ||
|
||
Please note that due to limitations in Safari (and possibly Chrome as well), a user interaction is required after the first audio stream has been sent to actually play it. | ||
This means, that after opening Main UI, the first audio that should be played on the web audio sink is only player after the user interacts with Main UI in any way (i.e. touching the screen is enough). | ||
For subsequent audio playback, that is not required anymore and the audio is played immediately. | ||
|
||
Please also note that you cannot address a particular web audio-enabled device. | ||
When you play a sound on web audio, it will be played on all devices where web audio is enabled. | ||
|
||
Web audio sinks can be used for example on wall-mounted tablets to make announcements using a [text-to-speech (TTS) engine]({{base}}/configuration/multimedia.html#text-to-speech) and play notification or alarm sounds. | ||
|
||
For more information about audio sinks as well as audio and voice actions, please refer to the [multimedia configuration docs]({{base}}/configuration/multimedia.html), where you will also find examples including UI-based rules and Blockly. | ||
|
||
## UI Command Item | ||
|
||
Main UI can be controlled from the openHAB server by setting up a so-called UI command Item. | ||
|
||
Similarly to web audio support, this is a setting specific to your local browser environment, so you have to define the UI command Item for each client, which also allows you to different UI command Items for different clients. | ||
To set up an Item as the UI command Item on your device, first create a particular Item of type `String`, then open the **Help & About** page from the menu and select an Item for the **Listen for UI command to** option. | ||
|
||
The command Item has to be a `String` Item. | ||
The UI is listening for commands to that Item, and if an Item command is a valid command string, the UI executes the given command. | ||
|
||
Currently, the supported commands are: | ||
|
||
- `navigate:$path`: | ||
Navigate to a given `$path`, e.g. `navigate:/locations` to navigate to the **Locations** tab of the home page or `navigate:/page/my_custom_page` to navigate to a page with the ID `my_custom_page`. | ||
For example, you can use this to open a video camera page of the door automatically when the doorbell is rung. | ||
- `popup:$target`, `popover:$target` and `sheet:$target`: | ||
Open a `$target`, which can be a page (`$target` is `page:` + a page ID), a custom widget (`$target` is `widget:` + widget ID) or any [`oh-` component]({{base}}/ui/components/) (`$target` is the component name), in a popup, popover or sheet. | ||
|
||
For example, to open `oh-clock-card` inside a popup, send `popup:oh-clock-card` to the UI command Item. | ||
- `notification:$text:$title:$subtitle:$titleRight:$closeTimeout`: | ||
stefan-hoehn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Display a notification inside the UI: | ||
The `$text` parameter is mandatory, all other parameters are optional. | ||
`$closeTimeout` is in milliseconds and defaults 5000, which means by default a notification will be closed after 5 seconds. | ||
To leave out a parameter, leave a colon space empty, e.g. `notification:$text:$title:::$closeTimeout`. | ||
|
||
For example, send `notification:This is the text.:This is the title.:This is the subtitle.:This is the right title.` to the UI command Item to display the following notification: | ||
<p align="center"><img style="max-width: 40%;" src="images/notification.png"/></p> | ||
- `close`: | ||
Close all popups, popovers and sheets. | ||
- `back`: | ||
Navigate back. | ||
- `reload`: | ||
Reload the current page. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From here on:
I have the feeling you deleted most of what I have written here. Please don't as I have put quite an amount of work by providing context, background and examples into it.
You move around redundant information but don't drop it, thanks.