Skip to content

Commit

Permalink
Apply bulk automated corrections.
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
  • Loading branch information
Confectrician committed Jan 10, 2021
1 parent e879ad8 commit 8ae9256
Show file tree
Hide file tree
Showing 41 changed files with 321 additions and 252 deletions.
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"MD004": { "style": "dash" },
"MD013": false,
"MD025": false,
"MD029": { "style": "one" }
"MD029": { "style": "one" },
"MD041": false
}
6 changes: 6 additions & 0 deletions addons/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ All HTTP Actions can have a last `timeout` parameter added in ms. eg. `sendHttpP
:::

For example:

```javascript
val headers = newHashMap("Cache-control" -> "no-cache")
val output = sendHttpGetRequest("https://example.com/?id=1", headers, 1000)
Expand Down Expand Up @@ -158,6 +159,7 @@ if ((thingStatusInfo !== null) && (thingStatusInfo.getStatus().toString() == "ON
```

### openHAB Subsystem Actions

openHAB has several subsystems that can be accessed from Rules. These include persistence, see [Persistence Extensions in Scripts and Rules]({{base}}/configuration/persistence.html#persistence-extensions-in-scripts-and-rules), transformations, scripts.

- `callScript(String scriptName)`: Calls a script which must be located in the `$OPENHAB_CONF/scripts` folder.
Expand All @@ -182,13 +184,15 @@ Three different actions are available:
- `sendLogNotification(message)`: Sends a log notification to the `notifications` list at your openHAB Cloud instance. Notifications are NOT sent to any registered devices

For each of the three actions, there's another variant accepting an icon name and a severity:

- `sendNotification(emailAddress, message, icon, severity)`
- `sendBroadcastNotification(message, icon, severity)`
- `sendLogNotification(message, icon, severity)`

Icon and severity can potentially be used by cloud instance clients (such as the openHAB apps for Android or iOS) to be displayed in the list of notifications.

The parameters for these actions have the following meaning:

- `emailAddress`: String containing the email address the target user is registered with in the cloud instance
- `message`: String containing the notification message text
- `icon`: String containing the icon name (as described in [Items]({{base}}/configuration/items.html#icons))
Expand Down Expand Up @@ -294,6 +298,7 @@ dayset-workday=[MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
dayset-weekend=[SATURDAY,SUNDAY]
dayset-trash=[MONDAY]
```

#### Custom Bank Holidays

In addition to the ability to define custom daysets, one can define a custom list of holidays or other important days.
Expand All @@ -314,6 +319,7 @@ The following is an example listing a few custom days.
</tns:Holidays>
</tns:Configuration>
```

For further examples and to find the list of elements to reference holidays that require more complicated calculations (e.g. holidays based on a lunar calendar, Easter, etc.) see the [XSD that defines the structures of the XML](https://github.com/svendiedrichsen/jollyday/blob/b78fa20e75d48bdf14e3fa8107befe44e3bacf3a/src/main/xsd/Holiday.xsd) or the XML file for your country or others.

You can place these XML files anywhere on your file system that openHAB has permission to read.
Expand Down
2 changes: 1 addition & 1 deletion addons/bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Bindings connect your smart home's devices and technologies to openHAB.
<td>
<p>
Most bindings developed for openHAB 1 can also be used in openHAB 2.
These bindings are connected directly to <a href="{{base}}/concepts/items.html">items</a> by editing text files.
These bindings are connected directly to <a href="{{base}}/concepts/items.html">items</a> by editing text files.
</p>
</td>
</tr>
Expand Down
3 changes: 1 addition & 2 deletions addons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: documentation

All add-ons for openHAB 2 are part of the distribution.
This includes all 2.x Bindings as well as all 1.x add-ons that were reported to be compatible.
There are several ways you can install an add-on.
There are several ways you can install an add-on.
These are described under *Installation of Add-ons* below

| Add-on Type | Description |
Expand Down Expand Up @@ -99,7 +99,6 @@ binding = astro,mqtt1,network

After saving the file, the add-on will be installed.


### Through manually provided add-ons

> Attention:
Expand Down
2 changes: 1 addition & 1 deletion addons/persistence.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Persistence services enable the storage of item states over time.
<td>
<p>
Some openHAB 1 persistence services have not yet completed validation for inclusion in the distribution; however, they may indeed work properly under openHAB 2.
All openHAB 1 add-ons can be downloaded in a <a href="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F1.9.0%2Fopenhab-1.9.0-addons.zip">zip file</a>.
All openHAB 1 add-ons can be downloaded in a <a href="https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F1.9.0%2Fopenhab-1.9.0-addons.zip">zip file</a>.
We need your help testing them so that they may be easily installed in a future distribution.
Please see the <a href="{{base}}/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution">compatibility layer documentation</a> and
also search the <a href="https://community.openhab.org">openHAB community forum</a> for the latest information and steps for manual installation.
Expand Down
2 changes: 1 addition & 1 deletion addons/transformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The relevant transformation service needs to be installed via the paperUI before
Be aware, that some Transformation services rely on transformation files, while others work by directly providing the transformation logic.
Transformation files need to be placed in the directory `$OPENHAB_CONF/transform`.

1. Item and Sitemap Labels
1. Item and Sitemap Labels

Transformations used in the [state/value part]({{base}}/configuration/items.html#state-transformations) of labels are applied **on the fly**.
While the **transformed value** will (for example) be visible on a Sitemap, the **original value** is stored in the Item.
Expand Down
2 changes: 1 addition & 1 deletion administration/bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Bundles are named according to the following convention:
where

- **prefix** is the first element to categorize the bundle.
For addons this is `org.openhab`.
For addons this is `org.openhab`.
- **type** is the add-on type, e.g. "binding", "persistence", or "ui"
- **id** is the identifier for this bundle

Expand Down
3 changes: 1 addition & 2 deletions administration/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ To add custom parameters or overwrite the default values, you can change the con
### Changing the Password

The password is stored in the file `users.properties`, located in the `etc` directory as [mentioned above](#console-settings-files-and-directories).
By default, the line with the password contains the text `openhab = `, followed by the current password (e.g. `habopen`) or a password hash (e.g. `{CRYPT}4AE1A0FD...{CRYPT}`).
By default, the line with the password contains the text `openhab =`, followed by the current password (e.g. `habopen`) or a password hash (e.g. `{CRYPT}4AE1A0FD...{CRYPT}`).

To change the authentication password edit the file manually, replacing the password or password hash (including `{CRYPT}`) with your new password in clear text.
Alternately, run the following Linux shell command, which will perform the replacement for you.
Expand Down Expand Up @@ -180,7 +180,6 @@ To enable binding to all interfaces, uncomment the line

in `services/runtime.cfg`.


### Change the Port Number

The SSH port configuration is done through the file `org.apache.karaf.shell.cfg`, located in the `etc` directory as [mentioned above](#console-settings-files-and-directories).
Expand Down
1 change: 0 additions & 1 deletion administration/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ It is possible to query and even change the state of entities like items or thin
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

Query an item's state:
Expand Down
1 change: 0 additions & 1 deletion appendix/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Join today and find answers for all details of openHAB:

* [community.openhab.org](https://community.openhab.org)


# FAQs - Frequently Asked Questions

In the community forum you'll also find a list of recurring questions with short answers, commonly known as FAQs.
Expand Down
26 changes: 13 additions & 13 deletions concepts/audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@ title: Audio & Voice
Audio and voice features are an important aspect of any smart home solution as it is a very natural way to interact with the user.

openHAB has a very modular architecture that enables many different use cases.
At its core, there is the notion of an *audio stream*.
Audio streams are provided by *audio sources* and consumed by *audio sinks*.
At its core, there is the notion of an *audio stream*.
Audio streams are provided by *audio sources* and consumed by *audio sinks*.

![](images/audio.png)

- *Audio Streams* are essentially byte streams with a given *audio format*.
They do not need to be limited in size, i.e. it is allowed to have continuous streams, e.g. the input from a microphone or from an Internet radio station.
- *Audio Formats* define the container (e.g. WAV), encoding, bit rate, sample frequency and depth and the bit order (little or big endian).
- *Audio Sources* are services that are capable of producing audio streams.
They can support different formats and provide a stream in a requested format upon request.
- *Audio Sources* are services that are capable of producing audio streams.
They can support different formats and provide a stream in a requested format upon request.
Typical audio source services are microphones. Typically, a continuous stream is expected from them.
- *Audio Sinks* are services that accept audio streams of certain formats.
- *Audio Sinks* are services that accept audio streams of certain formats.
Typically, these are expected to play the audio stream, i.e. they are some kind of speaker or media device.
- *Text-to-Speech* (TTS) services are similar to audio sources with respect to the ability to create audio streams.
The difference is that they take a string as an input and will synthesize this string to a spoken text using a given voice.
TTS services can provide information about the voices that they support and the locale that those voices are associated with.
- *Text-to-Speech* (TTS) services are similar to audio sources with respect to the ability to create audio streams.
The difference is that they take a string as an input and will synthesize this string to a spoken text using a given voice.
TTS services can provide information about the voices that they support and the locale that those voices are associated with.
Each voice supports exactly one locale.
- *Speech-to-Text* (STT) services are similar to audio sinks, but they do not simply play back the stream, but convert it to a plain string.
- *Speech-to-Text* (STT) services are similar to audio sinks, but they do not simply play back the stream, but convert it to a plain string.
They provide information about supported formats and locales.

As plain text from an STT service is often not very useful, there is additionally the concept of a *human language interpreter*:

![](images/hli.png)

A *Human Language Interpreter* takes a string as an input.
It then derives actions from it (like sending commands to devices) and/or replies with a string, which opens the possibility to realize conversations.
As such an interpreter is not directly linked to audio streams, but operates on strings only, this can be the basis for any kind of assistant, e.g. for chat bots using the console, XMPP, Twitter or other messaging services.
A *Human Language Interpreter* takes a string as an input.
It then derives actions from it (like sending commands to devices) and/or replies with a string, which opens the possibility to realize conversations.
As such an interpreter is not directly linked to audio streams, but operates on strings only, this can be the basis for any kind of assistant, e.g. for chat bots using the console, XMPP, Twitter or other messaging services.

Applications can dynamically choose which services to use, so that different sinks can be used for different use cases.
Applications can dynamically choose which services to use, so that different sinks can be used for different use cases.
Defaults can be set as a configuration for all those services in case an application does not ask for any specific service.
22 changes: 11 additions & 11 deletions concepts/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@ title: Profiles

# Profiles

The communication between the framework and the Thing handlers is managed by the "Communication Manager", which in turn uses "Profiles" to determined what exactly needs to be done.
The communication between the framework and the Thing handlers is managed by the "Communication Manager", which in turn uses "Profiles" to determined what exactly needs to be done.
This provides some flexibility to influence these communication paths.

By their nature, profiles are correlated to links between Items and Channels (i.e. `ItemChannelLinks`). So if one Channel is linked to several Items it also will have several profile instances, each handling the communication to exactly one of these Items.
The same applies for the situation where one Item is linked to multiple Channels.
By their nature, profiles are correlated to links between Items and Channels (i.e. `ItemChannelLinks`). So if one Channel is linked to several Items it also will have several profile instances, each handling the communication to exactly one of these Items.
The same applies for the situation where one Item is linked to multiple Channels.

Profiles are created by ProfileFactories and are retained for the lifetime of their link.
This means that they are allowed to retain a transient state, like e.g. the timestamp of the the last event or the last state.
Profiles are created by ProfileFactories and are retained for the lifetime of their link.
This means that they are allowed to retain a transient state, like e.g. the timestamp of the the last event or the last state.
With this, it is possible to take into account the temporal dimension when calculating the appropriate action in any situation.

There exist two different kinds of profiles: state and trigger profiles.

### State Profiles

State profiles are responsible for communication between Items and their corresponding state Channels (`ChannelKind.STATE`).
State profiles are responsible for communication between Items and their corresponding state Channels (`ChannelKind.STATE`).
Their purpose is to forward state updates and commands to and from the Thing handlers.

### Trigger Profiles

Trigger Channels (`ChannelKind.TRIGGER`) by themselves do not maintain a state (as by their nature they only fire events).
With the help of trigger profiles they can be linked to Items anyway.
Hence the main purpose of a trigger profile is to calculate a state based on the fired events.
This state then is forwarded to the linked Item by sending `ItemStateEvents`.
Trigger Channels (`ChannelKind.TRIGGER`) by themselves do not maintain a state (as by their nature they only fire events).
With the help of trigger profiles they can be linked to Items anyway.
Hence the main purpose of a trigger profile is to calculate a state based on the fired events.
This state then is forwarded to the linked Item by sending `ItemStateEvents`.

Trigger profiles are powerful means to implement some immediate, straight-forward logic without the need to write any rules.
Trigger profiles are powerful means to implement some immediate, straight-forward logic without the need to write any rules.

Apart from that, they do not pass any commands or state updates to and from the Thing handler as by their nature trigger Channels are not capable of handling these.
2 changes: 0 additions & 2 deletions concepts/things.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ A typical example of a bridge is an IP gateway for some non-IP based home automa

As many Things can be automatically discovered, there are special mechanisms available that deal with the handling of [automatically discovered Things](discovery.html).


## Thing Status

Each Thing has a status object, which helps to identify possible problems with the device or service.
Expand Down Expand Up @@ -93,4 +92,3 @@ The following table lists the different status details for each status:
<tr valign="top"><td>REMOVING</td> <td>NONE</td><td>No further status details available.</td></tr>
<tr valign="top"><td>REMOVED</td> <td>NONE</td><td>No further status details available.</td></tr>
</table>

3 changes: 1 addition & 2 deletions concepts/units-of-measurement.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ The placeholder `%unit%` can be placed anywhere in the state description.

In order to match `NumberItems` and Channels and define a default state description with unit placeholder the Channel also has to provide an Item type which includes the dimension information:


<channel-type id="temperature">
<item-type>Number:Temperature</item-type>
<label>Temperature</label>
Expand All @@ -80,7 +79,6 @@ The `org.openhab.core.library.dimension` and `javax.measure.quantity` packages p

All units which are currently supported by default are listed in the tables below.


Imperial (base unit symbols):

| Type | Unit | Symbol |
Expand Down Expand Up @@ -213,6 +211,7 @@ Binary Prefixes:
| Yobi | Yi | 2⁸⁰ |

To use the prefixes simply add the prefix to the unit symbol - for example:

* milliAmpere - `mA`
* centiMetre - `cm`
* kiloWatt - `kW`
Expand Down
1 change: 0 additions & 1 deletion configuration/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ binding = astro,network

After saving the file, the add-on will be installed.


## Through manually provided add-ons

::: warning Attention
Expand Down
4 changes: 3 additions & 1 deletion configuration/editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ If you are using [openHABian]({{base}}/installation/openhabian.html), the networ
*Attention Windows users:* Directly accessing network shares (UNC paths) is often not supported. Please be sure to mount the network share to a drive letter.

{: #openhab-vscode}

## openHAB VS Code Extension

openHAB VS Code is an extension for the [Visual Studio Code](https://code.visualstudio.com) editor.
Expand All @@ -50,6 +51,7 @@ The validation needs a running openHAB installation in your environment and can
You can find all important information in the extensions [readme file](https://github.com/openhab/openhab-vscode#validating-the-rules).

{: #others}

## Other Editor Integrations

The here summarized projects provide syntax highlighting for different text editors, but have no _on top_ functionality.
Expand All @@ -60,6 +62,7 @@ mcedit is an editor which comes with mc (Midnight Commander).
You can find the syntax files and installation instructions on [openhab-mcedit](https://github.com/CWempe/openhab-mcedit).

{: #notepadpp}

### Notepad++

Notepad++ is a free source code editor for Windows.
Expand All @@ -85,4 +88,3 @@ You can find the syntax file and installation instructions on [openhab-syntax-te

BBEdit is a text and code editor for macOS and the offical successor of TextWrangler.
You can find the syntax file and installation instructions on [BBEdit-openHAB-language](https://github.com/mjmeijer/BBEdit-openHAB-language).

Loading

0 comments on commit 8ae9256

Please sign in to comment.