diff --git a/configuration/things.md b/configuration/things.md index 9d61a8593..142c559ef 100644 --- a/configuration/things.md +++ b/configuration/things.md @@ -64,7 +64,7 @@ These files are stored in `$OPENHAB_CONF/things`. The syntax for `.things` files is defined as follows (parts in `<..>` are required): -```xtend +```java Thing :: "Label" @ "Location" [ ] ``` @@ -80,7 +80,7 @@ The type of the configuration parameter is determined by the binding and must be **Examples:** -```xtend +```java Thing network:device:webcam "Webcam" @ "Living Room" [ hostname="192.168.0.2", timeout="5000", ... ] Thing astro:moon:home [ geolocation="50.12345,10.98765", interval=300 ] Thing ntp:ntp:local [ hostname="de.pool.ntp.org" ] @@ -101,7 +101,7 @@ Please check each individual binding's [documentation](/addons/#binding) for det Bridges can be defined together with contained things. The following configuration shows the definition of a Hue bridge with two Hue lamps: -```xtend +```java Bridge hue:bridge:mybridge [ ipAddress="192.168.3.123" ] { Thing 0210 bulb1 [ lightId="1" ] Thing 0210 bulb2 [ lightId="2" ] @@ -115,7 +115,7 @@ The resulting UID of the thing is `hue:0210:mybridge:bulb1`. Bridges that are defined somewhere else can also be referenced in the DSL: -```xtend +```java Thing hue:0210:mybridge:bulb "Label" (hue:bridge:mybridge) @ "Location" [lightId="3"] ``` @@ -125,7 +125,7 @@ For the contained notation of things the UID will be inherited and the bridge ID **Example of a MQTT Bridge with Generic MQTT Things :** -```xtend +```java Bridge mqtt:broker:MyMQTTBroker [ host="192.168.178.50", secure=false, username="MyUserName", password="MyPassword"] { Thing topic sonoff_Dual_Thing "Light_Dual" @ "Sonoff" { Channels: @@ -151,7 +151,7 @@ It is also possible to add additional channels to existing things and for bindin #### State channels -```xtend +```java Thing yahooweather:weather:losangeles [ location=2442047, unit="us", refresh=120 ] { Channels: State String : customChannel1 "My Custom Channel" [ @@ -167,7 +167,7 @@ The framework will merge the list of channels coming from the binding and the us As state channels are the default channels, you can omit the `State` keyword, the following example creates the same channels as the example above: -```xtend +```java Thing yahooweather:weather:losangeles [ location=2442047, unit="us", refresh=120 ] { Channels: String : customChannel1 "My Custom Channel" [ @@ -181,7 +181,7 @@ You may optionally give the channel a proper label (like “My Custom Channel” #### Trigger channels -```xtend +```java Thing yahooweather:weather:losangeles [ location=2442047, unit="us", refresh=120 ] { Channels: Trigger String : customChannel1 -[ @@ -196,7 +196,7 @@ Trigger channels are defined with the keyword `Trigger` and only support the typ Many bindings provide standalone channel type definitions like this: -```xtend +```java Number @@ -213,7 +213,7 @@ Many bindings provide standalone channel type definitions like this: They can be referenced within a thing’s channel definition, so that they need to be defined only once and can be reused for many channels. You may do so in the DSL as well: -```xtend +```java Thing yahooweather:weather:losangeles [ location=2442047, unit="us", refresh=120 ] { Channels: Type temperature : my_yesterday_temperature "Yesterday's Temperature" @@ -236,12 +236,12 @@ In order to link a Thing to an Item in an `.items` file, open the Thing in UI un In the list of Thing Channels, look for the Channel you wish to link to an Item and copy the Channel's ID. For instance, a Z-Wave switch might have a Switch Channel that has an ID like this: -```xtend +```java zwave:device:1a2b3c4d:node2:switch_binary ``` To bind that Channel to an Item in an `.items` file, you can define an Item in the file like so: -```xtend +```java Switch Kitchen_Light_Switch "Kitchen Light" (Indoor_Lights) { channel="zwave:device:1a2b3c4d:node2:switch_binary" } ``` diff --git a/configuration/transformations.md b/configuration/transformations.md index 6fe499415..53bb92e0f 100644 --- a/configuration/transformations.md +++ b/configuration/transformations.md @@ -201,19 +201,19 @@ However, beware that `stateFromItemScript` _should_ be left blank, because norma Example usage in an `.items` file: -```xtend +```java Number { channel=""[profile="transform:JS", toItemScript="decode_json.js", commandFromItemScript="encode_json.js" ] } ``` Here, additional parameters can also be injected into the script using the URL style syntax, e.g.: -```xtend +```java Number { channel=""[profile="transform:RB", toItemScript="multiply.rb?factor=10", commandFromItemScript="multiply.rb?factor=0.1" ] } ``` Inline script is also supported in the profile syntax. -```xtend +```java Number { channel=""[profile="transform:RB", toItemScript="| input.to_f * 10", commandFromItemScript="| input.to_f * 0.1" ] } ``` diff --git a/installation/security.md b/installation/security.md index 9bdc31025..1be3a6ba3 100644 --- a/installation/security.md +++ b/installation/security.md @@ -46,7 +46,7 @@ See the page on [Role Based Access](../tutorial/pages_intro.html#role-based-acce If you want to limit access to only certain network interfaces, you can do so by setting the environment variable `OPENHAB_HTTP_ADDRESS`. Setting it to -```conf +```ini OPENHAB_HTTP_ADDRESS=127.0.0.1 ``` diff --git a/installation/windows.md b/installation/windows.md index 99e1bc00d..249268fc4 100644 --- a/installation/windows.md +++ b/installation/windows.md @@ -82,7 +82,7 @@ By installing the openHAB process as a service in Windows, you can: 1. Copy all the config text from the below section and paste it in your `openHAB-wrapper.conf`, replacing all existing content. 1. Adapt the first entry (`OPENHAB_HOME`) to match your openHAB installation directory. - ```conf + ```ini #******************************************************* # openHAB-wrapper.conf for Windows Service Installation #*******************************************************