Introduced many custom containers. (#1117)
* Refactored multiple 'Note:' occurances. Signed-off-by: Jerome Luckenbach <github@luckenba.ch> * Small fixes Signed-off-by: Jerome Luckenbach <github@luckenba.ch>pull/1120/head
parent
faf4bb1b51
commit
d4cc7be27e
|
@ -79,7 +79,9 @@ For example the bash command `touch -t 01010000 "some file with space.txt"` will
|
|||
- `sendHttpDeleteRequest(String url)`: Sends a DELETE-HTTP request and returns the result as a String
|
||||
- `sendHttpDeleteRequest(String url, Map<String, String> headers, int timeout)`: Sends a DELETE-HTTP request with the given request headers, and timeout in ms, and returns the result as a String
|
||||
|
||||
Note: All HTTP Actions can have a last `timeout` parameter added in ms. eg. `sendHttpPostRequest(String url, String contentType, String content, int timeout)`
|
||||
::: tip Note
|
||||
All HTTP Actions can have a last `timeout` parameter added in ms. eg. `sendHttpPostRequest(String url, String contentType, String content, int timeout)`
|
||||
:::
|
||||
|
||||
For example:
|
||||
```javascript
|
||||
|
|
|
@ -33,9 +33,11 @@ To reach the console using SSH, use the following command to connect to the loca
|
|||
ssh -p 8101 openhab@localhost
|
||||
```
|
||||
|
||||
*Note:* By default, connection is only allowed from localhost, i.e. only from the machine running openHAB.
|
||||
::: tip Note
|
||||
By default, connection is only allowed from localhost, i.e. only from the machine running openHAB.
|
||||
Connections are intentionally not allowed from remote hosts due to security concerns.
|
||||
To change this, see [Bind Console to All Interfaces](#bind-console-to-all-interfaces).
|
||||
:::
|
||||
|
||||
A security warning is expected upon the first connection:
|
||||
|
||||
|
@ -57,8 +59,10 @@ The default username/password is **openhab:habopen**, so enter `habopen` at the
|
|||
|
||||
The first successful connection triggers generation of the Karaf remote console key and will take a few seconds longer than subsequent attempts.
|
||||
|
||||
*Note:* On slower systems, such as Raspberry Pi or Pine64, this first SSH connection may even time out.
|
||||
::: tip Note
|
||||
On slower systems, such as Raspberry Pi or Pine64, this first SSH connection may even time out.
|
||||
If this happens, simply try connecting again until successful.
|
||||
:::
|
||||
|
||||
## Using the Console
|
||||
|
||||
|
|
|
@ -48,7 +48,9 @@ openHAB stores configuration information in JSON (JavaScript Object Notation) fo
|
|||
|
||||
All configuration information regarding _**Items, Links, and Things**_ are defined via the User Interfaces (Paper UI, HABmin, REST) or via internal openHAB services.
|
||||
|
||||
Note: The JSON DB does NOT store information for manually configured _**Items, Links, or Things**_, since these are already stored in files within the `OPENHAB_CONF` sub-directories (e.g. `/etc/openhab2/items/`).
|
||||
::: tip Note
|
||||
The JSON DB does NOT store information for manually configured _**Items, Links, or Things**_, since these are already stored in files within the `OPENHAB_CONF` sub-directories (e.g. `/etc/openhab2/items/`).
|
||||
:::
|
||||
|
||||
## Storage Purpose
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@ It is possible to query and even change the state of entities like items or thin
|
|||
* TOC
|
||||
{:toc}
|
||||
|
||||
**Please note: Some of the described commands are executed on the internal database and could break your installation. Please use this functionality only if you know what you are doing!**
|
||||
::: tip Note
|
||||
Some of the described commands are executed on the internal database and could break your installation. Please use this functionality only if you know what you are doing!
|
||||
:::
|
||||
|
||||
|
||||
## Examples
|
||||
|
|
|
@ -17,7 +17,9 @@ No special configuration is needed, you can use the COM port number (e.g. `COM4`
|
|||
|
||||
## Linux
|
||||
|
||||
**Note:** openHABian comes with a menu option to configure the serial ports automatically. So all the rest here is only relevant for non-openHABian users.
|
||||
::: tip Note
|
||||
openHABian comes with a menu option to configure the serial ports automatically. So all the rest here is only relevant for non-openHABian users.
|
||||
:::
|
||||
|
||||
If you can see issues related to opening the serial port with Linux, and you are using **non standard serial ports** (e.g. `/dev/ttyAMA0`) you might have to configure openHAB to detect and access the port correctly:
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ This behavior will be changed in future.
|
|||
|
||||
## Configuration
|
||||
|
||||
The marketplace integration can be configured to only provide add-ons of certain types (Note: Currently only bindings are supported!) and of a certain maturity level.
|
||||
The marketplace integration can be configured to only provide add-ons of certain types (*Note:* Currently only bindings are supported!) and of a certain maturity level.
|
||||
|
||||
To do so, you can add a configuration file `$OPENHAB_CONF/services/marketplace.cfg` with content like:
|
||||
|
||||
|
|
|
@ -171,7 +171,9 @@ Configuration done in files will be used (and Things/Items become visible and ev
|
|||
Configuration done in PaperUI will be used and permanently stored in the internal database if no Thing/Item of the same name already exists in files, but those additions or changes will not be copied back into any `.things` file.
|
||||
openHAB settings as defined in `services/addons.cfg` and `services/runtime.cfg` will override any settings made in PaperUI's Configuration/System pane.
|
||||
|
||||
**Important note:** All text files must be created with UTF-8 encoding. When using Visual Studio Code, this encoding is already set by default.
|
||||
::: warning Important
|
||||
All text files must be created with UTF-8 encoding. When using Visual Studio Code, this encoding is already set by default.
|
||||
:::
|
||||
|
||||
## Recommendations for New Users
|
||||
|
||||
|
|
|
@ -50,7 +50,9 @@ You should see a log line with information similar to:
|
|||
... [INFO ] [.a.m.s.r.i.l.ScriptFileWatcher:150 ] - Loading script 'test.py'
|
||||
```
|
||||
|
||||
> NOTE: ECMAScript is Javascript
|
||||
::: tip Note
|
||||
ECMAScript is Javascript
|
||||
:::
|
||||
|
||||
Look for any potentially related error messages.
|
||||
|
||||
|
@ -80,11 +82,13 @@ Depending on the openHAB logging configuration,
|
|||
you may need to prefix logger names with `org.openhab.core.automation`
|
||||
for them to show up in the log file (or you modify the logging configuration).
|
||||
|
||||
> NOTE: Be careful with using wildcards when importing Java packages (e.g., `import org.sl4j.*`).
|
||||
> This will work in some cases, but it might not work in some situations.
|
||||
> It's best to use explicit imports with Java packages.
|
||||
> For more details, see the Jython documentation on
|
||||
> [Java package scanning](http://www.jython.org/jythonbook/en/1.0/ModulesPackages.html#java-package-scanning).
|
||||
::: tip Note
|
||||
Be careful with using wildcards when importing Java packages (e.g., `import org.sl4j.*`).
|
||||
This will work in some cases, but it might not work in some situations.
|
||||
It's best to use explicit imports with Java packages.
|
||||
For more details, see the Jython documentation on
|
||||
[Java package scanning](http://www.jython.org/jythonbook/en/1.0/ModulesPackages.html#java-package-scanning).
|
||||
:::
|
||||
|
||||
The script then uses the [LoggerFactory](https://www.slf4j.org/apidocs/org/slf4j/Logger.html)
|
||||
to obtain a named logger and then logs a message like:
|
||||
|
|
|
@ -7,9 +7,11 @@ title: JSR223 Scripting
|
|||
|
||||
# JSR223 Scripting
|
||||
|
||||
> Note: This feature is for users who have or are willing to learn some programming skills
|
||||
> and are comfortable working with the command line prompt of the operating system hosting openHAB.
|
||||
> _The Experimental Rule Engine add-on must be installed to define rules._
|
||||
::: tip Note
|
||||
This feature is for users who have or are willing to learn some programming skills
|
||||
and are comfortable working with the command line prompt of the operating system hosting openHAB.
|
||||
_The Experimental Rule Engine add-on must be installed to define rules._
|
||||
:::
|
||||
|
||||
## Overview
|
||||
|
||||
|
@ -274,7 +276,7 @@ scriptExtension.importPreset("RuleSupport")
|
|||
|
||||
#### `RuleFactories` Preset
|
||||
|
||||
> NOTE: Advanced usage
|
||||
>Note: Advanced usage
|
||||
|
||||
```python
|
||||
scriptExtension.importPreset("RuleFactories")
|
||||
|
|
|
@ -36,8 +36,10 @@ This makes the creation of rules very easy!
|
|||
|
||||
### The Syntax
|
||||
|
||||
Note: The rule syntax is based on [Xbase](http://www.eclipse.org/Xtext/#xbase) and as a result it is sharing many details with [Xtend](http://www.eclipse.org/xtend/), which is built on top of Xbase as well.
|
||||
::: tip Note
|
||||
The rule syntax is based on [Xbase](http://www.eclipse.org/Xtext/#xbase) and as a result it is sharing many details with [Xtend](http://www.eclipse.org/xtend/), which is built on top of Xbase as well.
|
||||
As a result, we will often point to the Xtend documentation for details.
|
||||
:::
|
||||
|
||||
A rule file is a text file with the following structure:
|
||||
|
||||
|
@ -221,7 +223,9 @@ The `thingUID` is the identifier assigned to the Thing, manually in your configu
|
|||
You can find it from PaperUI or from Karaf remote console.
|
||||
For example, one z-wave device can be "zwave:device:c5155aa4:node14".
|
||||
|
||||
> Note: You need to use quotes around `thingUID` if it contains special characters such as ':'.
|
||||
::: tip Note
|
||||
You need to use quotes around `thingUID` if it contains special characters such as ':'.
|
||||
:::
|
||||
|
||||
{: #channel-based-triggers}
|
||||
### Channel-based Triggers
|
||||
|
@ -233,7 +237,9 @@ Your rules can take actions based upon trigger events generated by these trigger
|
|||
You can decide whether you want to catch only a specific or any trigger the channel provides.
|
||||
Here is the syntax for these cases (parts in square brackets are optional):
|
||||
|
||||
> Note: You need to use quotes around `triggerChannel` if it contains special characters such as `:`.
|
||||
::: tip Note
|
||||
You need to use quotes around `triggerChannel` if it contains special characters such as `:`.
|
||||
:::
|
||||
|
||||
```java
|
||||
Channel "<triggerChannel>" triggered [<triggerEvent>]
|
||||
|
|
|
@ -414,9 +414,11 @@ Video [item=<itemname>] [icon="<iconname>"] url="<url of video to embed>" [encod
|
|||
```
|
||||
|
||||
Allows you to display a video as part of your Sitemap.
|
||||
Note: not all video encodings (formats) are supported; you may need to transcode your video.
|
||||
::: tip Note
|
||||
Not all video encodings (formats) are supported; you may need to transcode your video.
|
||||
The video must be reachable directly via URL.
|
||||
An embedded and/or protected video are not supported.
|
||||
An embedded and/or protected video is not supported.
|
||||
:::
|
||||
|
||||
- `item` can refer to a String Item whose state is a URL to a video. Some clients may not (yet) consider `item`.
|
||||
- `url` is the default URL from which to retrieve the video if there is no associated Item or if the associated item's state is not a URL.
|
||||
|
|
|
@ -19,7 +19,9 @@ These Channels can be linked to [items]({{base}}/concepts/items.html).
|
|||
Items are used to control Things and consume their information.
|
||||
Ultimately, when Items are linked to Channels on a Thing, they become available to the various user interfaces and to the rules engine.
|
||||
|
||||
*Note:* Things are a new concept in openHAB 2, Things definitions are not needed for 1.x bindings.
|
||||
::: tip Note
|
||||
Things are a new concept in openHAB 2, Things definitions are not needed for 1.x bindings.
|
||||
:::
|
||||
|
||||
## Defining Things
|
||||
|
||||
|
@ -40,10 +42,12 @@ From start to finish, the process for fully configuring a physical entity repres
|
|||
There are two methods for defining Things provided by the various bindings:
|
||||
through [discovery]({{base}}/concepts/discovery.html) or by manual definition in configuration text files.
|
||||
|
||||
*Note:* Some bindings do not fully support auto-discovery, others are hard to manually cover by the file based approach.
|
||||
::: tip Note
|
||||
Some bindings do not fully support auto-discovery, others are hard to manually cover by the file based approach.
|
||||
Please consult the documentation for each binding to determine the best way to add that binding's Things and Items to openHAB.
|
||||
For some bindings, manual Thing definitions are required.
|
||||
Other bindings (such as the [ZWave](/addons/bindings/zwave/) binding) currently prefer or require the discovery method.
|
||||
:::
|
||||
|
||||
### Defining Things Using Discovery
|
||||
|
||||
|
|
|
@ -349,9 +349,11 @@ After the thing is created, the framework calls the `initialize` method of the h
|
|||
At this time the state of the thing is *INTIALIZING* as long as the binding sets it to something else.
|
||||
Because of this the default implementation of the `initialize()` method in the `BaseThingHandler` just changes the status to *ONLINE*.
|
||||
|
||||
*Note:* A binding should not set any other state than ONLINE, OFFLINE and UNKNOWN.
|
||||
::: tip Note
|
||||
A binding should not set any other state than ONLINE, OFFLINE and UNKNOWN.
|
||||
Additionally, REMOVED must be set after `handleRemoval()` has completed the removal process.
|
||||
All other states are managed by the framework.
|
||||
:::
|
||||
|
||||
Furthermore bindings can specify a localized description of the thing status by providing the reference of the localization string, e.g @text/rate_limit.
|
||||
The corresponding handler is able to provide placeholder values as a JSON-serialized array of strings:
|
||||
|
|
|
@ -338,14 +338,18 @@ For HTTP Operations
|
|||
* org.eclipse.jetty.http.*
|
||||
* org.eclipse.jetty.util.*
|
||||
|
||||
Note: HttpClient instances should be obtained by the handler factory through the HttpClientFactory service and unless there are specific configuration requirements, the shared instance should be used.
|
||||
::: tip Note
|
||||
HttpClient instances should be obtained by the handler factory through the HttpClientFactory service and unless there are specific configuration requirements, the shared instance should be used.
|
||||
:::
|
||||
|
||||
For Web Socket Operations
|
||||
|
||||
* org.eclipse.jetty.websocket.client
|
||||
* org.eclipse.jetty.websocket.api
|
||||
|
||||
Note: WebSocketClient instances should be obtained by the handler factory through the WebSocketClientFactory service and unless there are specific configuration requirements, the shared instance should be used.
|
||||
::: tip Note
|
||||
WebSocketClient instances should be obtained by the handler factory through the WebSocketClientFactory service and unless there are specific configuration requirements, the shared instance should be used.
|
||||
:::
|
||||
|
||||
Additionally these libraries are allowed
|
||||
|
||||
|
|
|
@ -60,12 +60,14 @@ The event source is optional and represents the name of the source identifying t
|
|||
| ItemStateChangedEvent | The state of an item has changed. | smarthome/items/{itemName}/statechanged |
|
||||
| GroupItemStateChangedEvent | The state of a group item has changed through a member. | smarthome/items/{itemName}/{memberName}/statechanged |
|
||||
|
||||
**Note:** The `ItemStateEvent` is always sent if the state of an item is updated, even if the state did not change.
|
||||
::: tip Note
|
||||
The `ItemStateEvent` is always sent if the state of an item is updated, even if the state did not change.
|
||||
`ItemStateChangedEvent` is sent only if the state of an item was really changed.
|
||||
It contains the old and the new state of the item.
|
||||
|
||||
The `GroupItemStateChangedEvent` is sent only if the state of a group item was changed by a member.
|
||||
It contains the old and the new state of the group item as well as the member.
|
||||
:::
|
||||
|
||||
#### Thing Events
|
||||
|
||||
|
@ -77,9 +79,11 @@ It contains the old and the new state of the group item as well as the member.
|
|||
| ThingStatusInfoEvent | The status of a thing is updated. | smarthome/things/{thingUID}/status |
|
||||
| ThingStatusInfoChangedEvent | The status of a thing changed. | smarthome/things/{thingUID}/statuschanged |
|
||||
|
||||
**Note:** The `ThingStatusInfoEvent` is always sent if the status info of a thing is updated, even if the status did not change.
|
||||
::: tip Note
|
||||
The `ThingStatusInfoEvent` is always sent if the status info of a thing is updated, even if the status did not change.
|
||||
`ThingStatusInfoChangedEvent` is sent only if the status of a thing was really changed.
|
||||
It contains the old and the new status of the thing.
|
||||
:::
|
||||
|
||||
#### Inbox Events
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ Note, always review the README on [Docker Hub](https://hub.docker.com/r/openhab/
|
|||
- `--net=host` : by default Docker will place a container into its own network stack. However, openHAB 2 requires UPnP discovery so this parameter makes the Docker container use the host's network stack.
|
||||
- `-v /etc/localtime:/etc/localtime:ro` : ties the time of the container to the host's time, read only so the container cannot change the host's time
|
||||
- `-v /etc/timezone:/etc/timezone:ro` : ties the timezone of the container to the host's time zone, read only so the container cannot change the host's time zone
|
||||
- `-v /opt/openhab/conf:/openhab/conf` : location of the conf folder for openHAB configurations (NOTE: you must create these folders on the host before running the container)
|
||||
- `-v /opt/openhab/conf:/openhab/conf` : location of the conf folder for openHAB configurations (*Note:* you must create these folders on the host before running the container)
|
||||
- `-v /opt/openhab/userdata:/openhab/userdata` : location for logs, cache, persistence databases, etc.
|
||||
- `-v /opt/openhab/addons:/openhab/addons` : only needed if installing addons unavailable via PaperUI or the Karaf Console
|
||||
- `-v /opt/openhab/.java:/openhab/.java` : needed by the Nest 1.x binding (and others?), location of the security token
|
||||
|
|
|
@ -36,7 +36,9 @@ If you're unsure which manual file you should download, using `dpkg --print-arch
|
|||
|
||||
When installing Zulu or Zulu Embedded from a .zip or .tar archive, make sure to [set Zulu as the main Java "alternative"](https://docs.azul.com/zulu/zuludocs/#ZuluUserGuide/SwitchingBetweenJavaAlternatives/SwitchBetweenJavaAlts.htm).
|
||||
|
||||
**Note:** Make sure to download Zulu or Java **8**, as openHAB is not yet compatible with Java 9.
|
||||
::: tip Note
|
||||
Make sure to download Zulu or Java **8**, as openHAB is not yet compatible with Java 9.
|
||||
:::
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
@ -172,8 +172,10 @@ sudo service nginx restart
|
|||
For further security, you may wish to ask for a **username and password** before users have access to openHAB.
|
||||
This is fairly simple in NGINX once you have the reverse proxy setup, you just need to provide the server with a basic authentication user file.
|
||||
|
||||
**Note:** There is currently an issue with Proxy Authentication and HABmin when using some browsers.
|
||||
::: tip Note
|
||||
There is currently an issue with Proxy Authentication and HABmin when using some browsers.
|
||||
If you require HABmin, consider connecting locally or using Safari for now.
|
||||
:::
|
||||
|
||||
{: #nginx-auth-user}
|
||||
##### Creating the First User
|
||||
|
@ -434,7 +436,11 @@ To test your security settings [SSL Labs](https://www.ssllabs.com/ssltest/) prov
|
|||
|
||||
This optional section is for those who would like to strengthen the HTTPS security on openHAB, it can be applied regardless of which HTTPS method you used [above](#nginx-https), **but you need to follow at least one of them first**.
|
||||
|
||||
First, we need to generate a stronger key exchange, to do this we can generate an additional key with OpenSSL **Note: depending on your hardware this will take up to few minutes to complete:**
|
||||
First, we need to generate a stronger key exchange, to do this we can generate an additional key with OpenSSL.
|
||||
|
||||
::: tip Note
|
||||
Depending on your hardware this will take up to few minutes to complete:
|
||||
:::
|
||||
|
||||
```shell
|
||||
mkdir -p /etc/nginx/ssl
|
||||
|
|
|
@ -57,9 +57,12 @@ But if you start a new discovery process later, the thing will reappear.
|
|||
In this example, we click on the check icon of the thing with the IP address 192.168.1.103.
|
||||
Let's assume this is John's mobile phone which we want to use for presence detection.
|
||||
We change the (automatically added during the discovery) name of the thing on the next page to "John's Mobile" and click on the "ADD AS THING" button.
|
||||
*Please note: If your network devices use a DHCP server to obtain ther IP addresses automatically, please make sure to define a DHCP reservation for a device which you want to use in openHAB.
|
||||
::: tip Note
|
||||
If your network devices use a DHCP server to obtain ther IP addresses automatically, please make sure to define a DHCP reservation for a device which you want to use in openHAB.
|
||||
Otherwise it's IP address may change in the future and your thing definiton won't work any more.
|
||||
Information about how to define a DHCP reservation can be normally be found in the manual of your network router.*
|
||||
|
||||
*Information about how to define a DHCP reservation can be normally be found in the manual of your network router.*
|
||||
:::
|
||||
|
||||

|
||||
|
||||
|
|
|
@ -40,7 +40,10 @@ Open the default.items file and define your first item:
|
|||
Switch Presence_Mobile_John "Johns Mobile" <network> { channel="network:device:192_168_1_103:online" }
|
||||
```
|
||||
|
||||
*Note: Item names have to be unique! You should follow a certain naming convention concerning your items.
|
||||
::: tip Note
|
||||
Item names have to be unique! You should follow a certain naming convention concerning your items.
|
||||
:::
|
||||
|
||||
In this example, we used the purpose of the item, "Presence", followed by the device type, "_Mobile", and finally the owner's name, "_John", to construct the final item name.
|
||||
|
||||
Another suggestion for different items, for example a wallplug which is plugged-in in the living room in the first floor providing power to a TV, is to use the type, the floor, the room and the usage of the item.
|
||||
|
|
|
@ -13,8 +13,10 @@ Where needed, additional details are provided for other platforms (Windows, OSX,
|
|||
|
||||
These instructions emphasize the text based procedures over the use of PaperUI and Habmin which is closer to the openHAB 1.x experience.
|
||||
|
||||
Note: In all of the other pages in this documentation, openHAB 2 is simply referred to as openHAB.
|
||||
::: tip Note
|
||||
In all of the other pages in this documentation, openHAB 2 is simply referred to as openHAB.
|
||||
In order to distinguish between the two versions in this, the current version is referred to as openHAB 2.
|
||||
:::
|
||||
|
||||
This page is structured as follows:
|
||||
|
||||
|
@ -641,8 +643,10 @@ smarthome:inbox
|
|||
|
||||

|
||||
|
||||
NOTE: The screenshot above shows Ignored Inbox Items.
|
||||
::: tip Note
|
||||
The screenshot above shows Ignored Inbox Items.
|
||||
New Items will not show "IGNORED".
|
||||
:::
|
||||
|
||||
To accept a Thing from the Inbox run:
|
||||
|
||||
|
|
Loading…
Reference in New Issue