mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Make Markdown code block languages consistent (#17480)
* Make Markdown code block languages consistent Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> * Fix indentation Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> --------- Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
c4576bb0f5
commit
85b165208c
@ -15,7 +15,7 @@ If you create an empty file called `test.groovy`, you will see a log line with i
|
||||
|
||||
To enable debug logging, use the [console logging]({{base}}/administration/logging.html) commands to enable debug logging for the automation functionality:
|
||||
|
||||
```text
|
||||
```shell
|
||||
log:set DEBUG org.openhab.core.automation
|
||||
```
|
||||
|
||||
|
@ -21,7 +21,7 @@ If you create an empty file called `test.nashornjs`, you will see a log line wit
|
||||
|
||||
To enable debug logging, use the [console logging]({{base}}/administration/logging.html) commands to enable debug logging for the automation functionality:
|
||||
|
||||
```text
|
||||
```shell
|
||||
log:set DEBUG org.openhab.core.automation
|
||||
```
|
||||
|
||||
|
@ -537,7 +537,7 @@ E.g. to read out the history call from an installation on openhab:8080 with an a
|
||||
|
||||
1) Create a rule with a trigger of your choice
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "Say welcome if the door opens"
|
||||
when
|
||||
Item Door_Contact changed to OPEN
|
||||
@ -548,7 +548,7 @@ end
|
||||
|
||||
You can also use [SSML](https://docs.aws.amazon.com/polly/latest/dg/supported-ssml.html) to provide a better voice experience
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "Say welcome if the door opens"
|
||||
when
|
||||
Item Door_Contact changed to OPEN
|
||||
@ -563,7 +563,7 @@ end
|
||||
|
||||
Simple:
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "Say welcome if the door opens"
|
||||
when
|
||||
Item Door_Contact changed to OPEN
|
||||
@ -576,7 +576,7 @@ Expert:
|
||||
|
||||
You can use a json formatted string to control title, sound and volume:
|
||||
|
||||
```php
|
||||
```json
|
||||
{"sound": true, "speak":"<Speak>", "title": "<Title>", "body": "<Body Text>", "volume": 20}
|
||||
```
|
||||
|
||||
|
@ -269,7 +269,7 @@ Switch ArgoClimaHVACRemote_FilterMode "Filter Mode" <switch> (GArgoClimaHVA
|
||||
|
||||
### argoclima.sitemap
|
||||
|
||||
```java
|
||||
```perl
|
||||
// All things in all modes expose the same channels
|
||||
Frame label="❄ HVAC Control" {
|
||||
Switch item=ArgoClimaHVACRemote_Power
|
||||
|
@ -126,7 +126,7 @@ To do so
|
||||
Auto-discovery is enabled by default.
|
||||
To disable it, you can add the following line to `<openHAB-conf>/services/runtime.cfg`:
|
||||
|
||||
```text
|
||||
```ini
|
||||
discovery.avmfritz:background=false
|
||||
```
|
||||
|
||||
|
@ -48,7 +48,7 @@ Background discovery polls the network every few minutes for devices.
|
||||
Background discovery is **enabled** by default.
|
||||
To **disable** background discovery, add the following line to the _conf/services/runtime.cfg_ file:
|
||||
|
||||
```text
|
||||
```ini
|
||||
discovery.bigassfan:background=false
|
||||
```
|
||||
|
||||
|
@ -21,7 +21,7 @@ Background discovery polls the network every minute for devices.
|
||||
Background discovery is **enabled** by default.
|
||||
To **disable** background discovery, add the following line to the _conf/services/runtime.cfg_ file:
|
||||
|
||||
```text
|
||||
```ini
|
||||
discovery.daikin:background=false
|
||||
```
|
||||
|
||||
|
@ -212,7 +212,7 @@ Create a rule that is fired
|
||||
- **When** `calculateParameters` is triggered in `myquery`
|
||||
- **Then** executes the following script action (in that example Jython):
|
||||
|
||||
```text
|
||||
```python
|
||||
map = {"time" : "-2h"}
|
||||
dbquery = actions.get("dbquery","dbquery:query:myquery")
|
||||
dbquery.setQueryParameters(map)
|
||||
|
@ -117,15 +117,15 @@ The Emotiva Processor supports the following channels (some channels are model s
|
||||
|
||||
## Full Example
|
||||
|
||||
### `.things` file:
|
||||
### `.things` file
|
||||
|
||||
```perl
|
||||
```java
|
||||
Thing emotiva:processor:1 "XMC-2" @ "Living room" [ipAddress="10.0.0.100", protocolVersion="3.0"]
|
||||
```
|
||||
|
||||
### `.items` file:
|
||||
### `.items` file
|
||||
|
||||
```perl
|
||||
```java
|
||||
Switch emotiva-power "Processor" {channel="emotiva:processor:1:general#power"}
|
||||
Dimmer emotiva-volume "Volume [%d %%]" {channel="emotiva:processor:1:main-zone#volume"}
|
||||
Number:Dimensionless emotiva-volume-db "Volume [%d dB]" {channel="emotiva:processor:1:main-zone#volume-db"}
|
||||
@ -148,7 +148,7 @@ String emotiva-menu-tottom-center "" <non
|
||||
String emotiva-menu-tottom-end "" <none> {channel="emotiva:processor:1:general#menu-display-bottom-end"}
|
||||
```
|
||||
|
||||
### `.sitemap` file:
|
||||
### `.sitemap` file
|
||||
|
||||
```perl
|
||||
Group item=emotiva-input label="Processor" icon="receiver" {
|
||||
|
@ -93,7 +93,6 @@ Number:Energy TotalBuyEnergy <energy> (GF_UtilityRo
|
||||
// Examples of items for calculating the energy purchased and sold. Look at the demo.rules section.
|
||||
Number:Currency SoldEnergy "Total sold energy [%.2f €]" <price> (GF_UtilityRoomSolar)
|
||||
Number:Currency PurchasedEnergy "Total purchased energy [%.2f €]" <price> (GF_UtilityRoomSolar)
|
||||
|
||||
```
|
||||
|
||||
### demo.sitemap
|
||||
|
@ -62,22 +62,20 @@ Note, there is a rate limit of 120 queries per hour imposed by Flume so use caut
|
||||
Please note that the device meter ID is only available through the API and not available on the Flume portal.
|
||||
When the Bridge device is first created, there will be a log message with the ID of the discovered device which can be used in further configuring the device via the text files.
|
||||
|
||||
```
|
||||
```java
|
||||
Bridge flume:cloud:cloudconnector [ username="xxx", password="xxx", clientId="xxx", clientSecret="xxx" ] {
|
||||
|
||||
meter-device meter [ id="xxx" ]
|
||||
}
|
||||
```
|
||||
|
||||
### Item Configuration
|
||||
|
||||
```
|
||||
```java
|
||||
Number:VolumetricFlowRate InstantUsage "Instant Usage" { channel = "flume:meter-device:1:meter:instant-usage" }
|
||||
Number:Volume CumulativeUsed "Cumulative Used" { channel = "flume:meter-device:1:meter:cumulative-usage" }
|
||||
Number:Dimensionless BatteryLevel "Battery Level" { channel = "flume:meter-device:1:meter:battery-level" }
|
||||
DateTime LastSeen "Last Seen" { channel = "flume:meter-device:1:meter:last-seen" }
|
||||
Switch LowPower "Battery Low Power" { channel = "flume:meter-device:1:meter:low-battery" }
|
||||
|
||||
```
|
||||
|
||||
### Rules
|
||||
|
@ -127,7 +127,7 @@ The GlobalCache binding will automatically detect those devices, then add them t
|
||||
Background discovery is **enabled** by default.
|
||||
To disable background discovery, add the following line to the _conf/services/runtime.cfg_ file:
|
||||
|
||||
```text
|
||||
```ini
|
||||
discovery.globalcache:background=false
|
||||
```
|
||||
|
||||
|
@ -139,14 +139,14 @@ The list of all possible channels is as follows:
|
||||
This binding includes rule actions, which allow you to setup programs for battery charging and discharging.
|
||||
Each inverter thing has a separate actions instance, which can be retrieved as follows.
|
||||
|
||||
```php
|
||||
```java
|
||||
val growattActions = getActions("growatt", "growatt:inverter:home:sph")
|
||||
```
|
||||
|
||||
Where the first parameter must always be `growatt` and the second must be the full inverter thing UID.
|
||||
Once the action instance has been retrieved, you can invoke the following method:
|
||||
|
||||
```php
|
||||
```java
|
||||
growattActions.setupBatteryProgram(int programMode, @Nullable Integer powerLevel, @Nullable Integer stopSOC, @Nullable Boolean enableAcCharging, @Nullable String startTime, @Nullable String stopTime, @Nullable Boolean enableProgram)
|
||||
```
|
||||
|
||||
@ -184,7 +184,7 @@ The permission for passing 'null' parameters, and the effect of such 'null' para
|
||||
|
||||
The following is an example program to charge the battery during a night-time low tariff period, and depending on the forecast solar energy for the coming day.
|
||||
|
||||
```php
|
||||
```java
|
||||
// solar power constants
|
||||
val Integer programMode = 1 // 0 = Load First, 1 = Battery First, 2 = Grid First
|
||||
val Integer powerLevel = 23 // percent
|
||||
@ -257,7 +257,7 @@ end
|
||||
|
||||
The following is an example program to charge the battery in preparation to avoid importing energy during a coming extra high tariff time window.
|
||||
|
||||
```php
|
||||
```java
|
||||
// solar power constants
|
||||
var pauseProgramLastSetupDate
|
||||
|
||||
@ -409,7 +409,7 @@ The installation is as follows:
|
||||
|
||||
A suggested Grott configuration for openHAB is as follows:
|
||||
|
||||
```php
|
||||
```ini
|
||||
[Generic]
|
||||
mode = proxy
|
||||
compat = False
|
||||
@ -437,7 +437,7 @@ The service configuration for Linux is summarised below:
|
||||
- Copy the `grott.service` file to the `/etc/systemd/system/` folder
|
||||
- Modify `grott.service` to enter your user name; the Grott settings; the path to Python; and the path to the Grott application:
|
||||
|
||||
```php
|
||||
```ini
|
||||
[Service]
|
||||
SyslogIdentifier=grott
|
||||
User=<username> // your username
|
||||
|
@ -323,7 +323,7 @@ Switch Automation_Children_Up_Time "Children Up At 6:30" {channel="hdpowerview:h
|
||||
|
||||
### `demo.sitemap` File
|
||||
|
||||
```php
|
||||
```perl
|
||||
Frame label="Living Room" {
|
||||
Switch item=Living_Room_Shades_Scene_Open
|
||||
Slider item=Living_Room_Shade_Position
|
||||
|
@ -37,7 +37,7 @@ Potentially two types of Bridge will be discovered - namely an API v1 Bridge and
|
||||
Auto-discovery is enabled by default.
|
||||
To disable it, you can add the following line to `<openHAB-conf>/services/runtime.cfg`:
|
||||
|
||||
```text
|
||||
```ini
|
||||
discovery.hue:background=false
|
||||
```
|
||||
|
||||
|
@ -217,14 +217,14 @@ The `tap_switch_event` can trigger one of the following events:
|
||||
This binding includes a rule action, which allows to change a light channel with a specific fading time from within rules.
|
||||
There is a separate instance for each light or light group, which can be retrieved e.g. through
|
||||
|
||||
```php
|
||||
```java
|
||||
val hueActions = getActions("hue","hue:0210:00178810d0dc:1")
|
||||
```
|
||||
|
||||
where the first parameter always has to be `hue` and the second is the full Thing UID of the light that should be used.
|
||||
Once this action instance is retrieved, you can invoke the `fadingLightCommand(String channel, Command command, DecimalType fadeTime)` method on it:
|
||||
|
||||
```php
|
||||
```java
|
||||
hueActions.fadingLightCommand("color", new PercentType(100), new DecimalType(1000))
|
||||
```
|
||||
|
||||
@ -335,7 +335,7 @@ sitemap demo label="Main Menu"
|
||||
|
||||
### Events
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "example trigger rule"
|
||||
when
|
||||
Channel "hue:0820:1:dimmer-switch:dimmer_switch_event" triggered <EVENT>
|
||||
@ -349,7 +349,7 @@ If ommited the rule gets triggered by any key action and you can determine the e
|
||||
Be aware that the events have a '.0' attached to them, like `2001.0` or `34.0`.
|
||||
So, testing for specific events looks like this:
|
||||
|
||||
```php
|
||||
```java
|
||||
if (receivedEvent == "1000.0") {
|
||||
//do stuff
|
||||
}
|
||||
|
@ -207,14 +207,14 @@ openhab> openhab:hue hue:bridge-api2:g24 things > myThingsFile.things
|
||||
This binding includes a rule action, which implements dynamic (i.e. gradual) transitions to a new scene or light(s) state.
|
||||
Each thing has a separate action instance, which can be retrieved as follows.
|
||||
|
||||
```php
|
||||
```java
|
||||
val hueActions = getActions("hue","hue:device:g24:11111111-2222-3333-4444-555555555555")
|
||||
```
|
||||
|
||||
Where the first parameter must always be `hue` and the second must be the full thing UID.
|
||||
Once the action instance has been retrieved, you can invoke its `dynamicCommand(String channelId, Command command, Long durationMs)` method as follows.
|
||||
|
||||
```php
|
||||
```java
|
||||
hueActions.dynamicCommand("brightness", new PercentType(100), new Long(10000))
|
||||
|
||||
hueActions.dynamicCommand("scene", new StringType("SceneName"), new Long(20000))
|
||||
|
@ -67,7 +67,7 @@ The following channels are available (if supported by the device):
|
||||
|
||||
### icloud.things
|
||||
|
||||
```php
|
||||
```java
|
||||
Bridge icloud:account:myaccount [appleId="mail@example.com", password="secure", code="123456", refreshTimeInMinutes=5]
|
||||
{
|
||||
Thing device myiPhone8 "iPhone 8" @ "World" [deviceId="VIRG9FsrvXfE90ewVBA1H5swtwEQePdXVjHq3Si6pdJY2Cjro8QlreHYVGSUzuWV"]
|
||||
@ -79,7 +79,7 @@ The information _@ "World"_ is optional.
|
||||
|
||||
### icloud.items
|
||||
|
||||
```php
|
||||
```java
|
||||
Group iCloud_Group "iPhone"
|
||||
|
||||
String iPhone_BatteryStatus "Battery Status [%s]" <battery> (iCloud_Group) {channel="icloud:device:myaccount:myiPhone8:batteryStatus"}
|
||||
@ -94,7 +94,7 @@ Switch iPhone_Home "Phone Home" <presence>
|
||||
|
||||
### icloud.sitemap
|
||||
|
||||
```php
|
||||
```perl
|
||||
sitemap icloud label="iCloud" {
|
||||
Frame item=iCloud_Group {
|
||||
Text item=iPhone_BatteryStatus
|
||||
@ -112,7 +112,7 @@ sitemap icloud label="iCloud" {
|
||||
|
||||
### icloud.rules
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "iPhone Home"
|
||||
when
|
||||
Item iPhone_Location changed
|
||||
|
@ -836,7 +836,7 @@ Insufficient access to the lock directory will result in openHAB failing to acce
|
||||
Device types are defined in the file `device_types.xml`, which is inside the Insteon bundle and thus not visible to the user.
|
||||
You can however load your own device_types.xml by referencing it in the network config parameters:
|
||||
|
||||
```text
|
||||
```ini
|
||||
additionalDevices="/usr/local/openhab/rt/my_own_devices.xml"
|
||||
```
|
||||
|
||||
@ -861,7 +861,7 @@ Avoid duplicate keys by finding the highest fake product key in the `device_type
|
||||
|
||||
If you can't build a new device out of the existing device features (for a complete list see `device_features.xml`) you can add new features by specifying a file (let's call it `my_own_features.xml`) with the "additionalDevices" option in the network config parameters:
|
||||
|
||||
```text
|
||||
```ini
|
||||
additionalFeatures="/usr/local/openhab/rt/my_own_features.xml"
|
||||
```
|
||||
|
||||
|
@ -200,7 +200,7 @@ If a parameter is not explicitly defined, binding will use its default value.
|
||||
|
||||
To define a parameter value in a .things file, please refer to it by parameter's ID, for example:
|
||||
|
||||
```text
|
||||
```ini
|
||||
keepAlivePeriod=120
|
||||
```
|
||||
|
||||
|
@ -615,7 +615,6 @@ The Mercedes ECO Score is aimed to improve your driving behavior.
|
||||
- Constant Score: drive at constant speed e.g. use *cruise control*
|
||||
- Bonus Range: assumed bonus range vs. a *very sportive driver*
|
||||
|
||||
|
||||
### Position
|
||||
|
||||
Group name: `position`
|
||||
@ -740,7 +739,7 @@ Send lock/unlock or temperatures in a short period of time will result in failur
|
||||
|
||||
## Vehicle Actions
|
||||
|
||||
Actions for `vehicle` [thing}(#vehicle) are provided.
|
||||
Actions for `vehicle` [thing](#vehicle) are provided.
|
||||
|
||||
### `sendPOI`
|
||||
|
||||
@ -760,16 +759,16 @@ This POI can be used as navigation destination.
|
||||
|
||||
Required information
|
||||
|
||||
```
|
||||
val mercedesmeActions = getActions("mercedesme","mercedesme:bev:4711:eqa")
|
||||
mercedesmeActions.sendPOI("Eiffel Tower",48.85957476434348,2.2939068084684853)
|
||||
```java
|
||||
val mercedesmeActions = getActions("mercedesme","mercedesme:bev:4711:eqa")
|
||||
mercedesmeActions.sendPOI("Eiffel Tower",48.85957476434348,2.2939068084684853)
|
||||
```
|
||||
|
||||
Full information
|
||||
|
||||
```
|
||||
val mercedesmeActions = getActions("mercedesme","mercedesme:bev:4711:eqa")
|
||||
mercedesmeActions.sendPOI("Eiffel Tower",48.85957476434348,2.2939068084684853,"Paris","Av. Gustave Eiffel", "75007")
|
||||
```java
|
||||
val mercedesmeActions = getActions("mercedesme","mercedesme:bev:4711:eqa")
|
||||
mercedesmeActions.sendPOI("Eiffel Tower",48.85957476434348,2.2939068084684853,"Paris","Av. Gustave Eiffel", "75007")
|
||||
```
|
||||
|
||||
## Discover your Vehicle
|
||||
@ -797,14 +796,14 @@ Vehicle Identification Number (VIN) isn't part of data.
|
||||
GPS data which is showing your location is anonymized.
|
||||
Please double check yourself no critical data is inside.
|
||||
The content of these items shall be used to create a problem report.
|
||||
During development the `proto-update` contains an entry with binding version information.
|
||||
During development the `proto-update` contains an entry with binding version information.
|
||||
|
||||
```
|
||||
"bindingInfo": {
|
||||
"oh-bundle": "4.1.0.202309241814",
|
||||
"version": "2.2-alpha",
|
||||
"vehicle": "mercedesme:bev"
|
||||
}
|
||||
```json
|
||||
"bindingInfo": {
|
||||
"oh-bundle": "4.1.0.202309241814",
|
||||
"version": "2.2-alpha",
|
||||
"vehicle": "mercedesme:bev"
|
||||
}
|
||||
```
|
||||
|
||||
Keep these 3 channels disconnected during normal operation.
|
||||
@ -896,7 +895,7 @@ DateTime EQA_CommandTimestamp {channel="mercedesme:bev:471
|
||||
|
||||
### POI ruleExample
|
||||
|
||||
```
|
||||
```java
|
||||
// send POI from JSON String item
|
||||
rule "Send POI"
|
||||
when
|
||||
|
@ -37,7 +37,7 @@ To avoid this, there is a discovery configuration parameter `removalGracePeriod`
|
||||
The default value is 15 seconds.
|
||||
If you want to change this value just add the following line to your `$OPENHAB_CONF/services/runtime.cfg` file.
|
||||
|
||||
```text
|
||||
```ini
|
||||
discovery.miele:removalGracePeriod=30
|
||||
```
|
||||
|
||||
|
@ -137,15 +137,16 @@ It is therefore recommended to disable IPv6 on the openHAB server.
|
||||
|
||||
This can e.g. be achieved on openHABian the following way:
|
||||
|
||||
```text
|
||||
```shell
|
||||
sudo nano /etc/sysctl.conf`
|
||||
```
|
||||
|
||||
Add the following at the bottom of the file:
|
||||
|
||||
```ini
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.lo.disable_ipv6 = 1
|
||||
|
||||
```
|
||||
|
||||
Reboot your server after the change.
|
||||
|
@ -17,7 +17,7 @@ The binding has the following configuration options:
|
||||
|
||||
Create a `<openHAB-conf>/services/network.cfg` file and use the above options like this:
|
||||
|
||||
```text
|
||||
```ini
|
||||
binding.network:allowSystemPings=true
|
||||
binding.network:allowDHCPlisten=false
|
||||
binding.network:arpPingToolPath=arping
|
||||
|
@ -107,7 +107,7 @@ Within the Oceanic binding two routes are provided:
|
||||
|
||||
Both workarounds can be implemented using a systemd system manager script, for example:
|
||||
|
||||
```text
|
||||
```ini
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
|
@ -56,7 +56,7 @@ The binding can auto-discover the Onkyo AVRs present on your local network.
|
||||
The auto-discovery is enabled by default.
|
||||
To disable it, you can create a file in the services directory called onkyo.cfg with the following content:
|
||||
|
||||
```text
|
||||
```ini
|
||||
org.openhab.onkyo:enableAutoDiscovery=false
|
||||
```
|
||||
|
||||
@ -82,7 +82,7 @@ In the thing file, this looks e.g. like
|
||||
|
||||
Model specific
|
||||
|
||||
```text
|
||||
```java
|
||||
onkyo:TX-NR818:avr-livingroom [ipAddress="192.168.1.100", port=60128]
|
||||
```
|
||||
|
||||
@ -90,20 +90,20 @@ or
|
||||
|
||||
Generic model
|
||||
|
||||
```text
|
||||
```java
|
||||
onkyo:onkyoAVR:avr-livingroom [ipAddress="192.168.1.100", port=60128]
|
||||
```
|
||||
|
||||
Optionally you can specify the refresh interval by `refreshInterval` parameter.
|
||||
|
||||
```text
|
||||
```java
|
||||
onkyo:onkyoAVR:avr-livingroom [ipAddress="192.168.1.100", port=60128, refreshInterval=30]
|
||||
```
|
||||
|
||||
Maximum volume level can also be configured by `volumeLimit` parameter.
|
||||
This prevent setting receiver volume level too high, which could damage your speakers or receiver.
|
||||
|
||||
```text
|
||||
```java
|
||||
onkyo:onkyoAVR:avr-livingroom [ipAddress="192.168.1.100", port=60128, volumeLimit=50]
|
||||
```
|
||||
|
||||
@ -123,7 +123,7 @@ See below for a few examples:
|
||||
|
||||
Note that this is applied after the volume limiting took place.
|
||||
|
||||
```text
|
||||
```java
|
||||
onkyo:onkyoAVR:avr-livingroom [ipAddress="192.168.1.100", port=60128, volumeScale=2]
|
||||
```
|
||||
|
||||
|
@ -8,7 +8,7 @@ The binding can auto-discover the Pioneer AVRs present on your local network.
|
||||
The auto-discovery is enabled by default.
|
||||
To disable it, you can create a file in the services directory called pioneeravr.cfg with the following content:
|
||||
|
||||
```text
|
||||
```ini
|
||||
#Put your configuration here
|
||||
org.openhab.pioneeravr:enableAutoDiscovery=false
|
||||
```
|
||||
|
@ -29,7 +29,7 @@ The Pulseaudio binding can be customized to handle different devices. The Sink a
|
||||
|
||||
You can use the GUI on the bindings page (click on the pulseaudio binding then "Expand for details"), or create a `<openHAB-conf>/services/pulseaudio.cfg` file and use the above options like this:
|
||||
|
||||
```text
|
||||
```ini
|
||||
binding.pulseaudio:sink=true
|
||||
binding.pulseaudio:source=true
|
||||
binding.pulseaudio:sinkInput=false
|
||||
|
@ -64,21 +64,20 @@ Searches can be done in a few different ways and since the binding will auto sel
|
||||
|
||||
Examples on how to do searches from rules, or you can also change an item to take input by using `oh-input-item` using metadata called `Default list item widget`.
|
||||
|
||||
|
||||
Search for all stations that contain `hit` in their name, and auto select the first result.
|
||||
|
||||
```
|
||||
```java
|
||||
Radio_Station.sendCommand("hit")
|
||||
```
|
||||
|
||||
Search and auto select the station if you know the UUID from the website.
|
||||
|
||||
```
|
||||
```java
|
||||
Radio_Station.sendCommand("b6a490e8-f498-4a7c-b024-607b3d997614")
|
||||
```
|
||||
|
||||
Clear any manual search results using the above two methods, and `REFRESH` back to using the normal filter channels.
|
||||
|
||||
```
|
||||
```java
|
||||
Radio_Station.sendCommand(REFRESH)
|
||||
```
|
||||
|
@ -158,7 +158,7 @@ Thing solarman:logger:local [hostname="x.x.x.x",inverterType="deye_sg04lp3",seri
|
||||
|
||||
Items file example for a SUN-12K-SG04LP3-EU inverter
|
||||
|
||||
```text
|
||||
```java
|
||||
Number:Temperature AC_Temperature "AC Temperature [%.1f °C]" (solarman) {channel="solarman:logger:local:inverter-ac-temperature", unit="°C"}
|
||||
Number Alert "Alert [%s]" (solarman) {channel="solarman:logger:local:alert-alert"}
|
||||
Number:ElectricPotential Battery_Absorption_V "Battery Absorption V [%.2f V]" (solarman) {channel="solarman:logger:local:battery-battery-absorption-v", unit="V"}
|
||||
|
@ -354,7 +354,7 @@ To receive a message and react on that:
|
||||
|
||||
telegram.items
|
||||
|
||||
```php
|
||||
```java
|
||||
String telegramMessage "Telegram Message" { channel = "telegram:telegramBot:2b155b22:lastMessageText" }
|
||||
```
|
||||
|
||||
@ -373,7 +373,7 @@ To send a question with two alternatives and have the bot handle the reply:
|
||||
|
||||
telegram.items
|
||||
|
||||
```php
|
||||
```java
|
||||
String telegramReplyId "Telegram Reply Id" { channel = "telegram:telegramBot:2b155b22:replyId" }
|
||||
```
|
||||
|
||||
|
@ -439,21 +439,21 @@ For those who are interested in more detailed insight of the processing of this
|
||||
|
||||
With Karaf you can use the following command sequence:
|
||||
|
||||
```text
|
||||
```shell
|
||||
log:set TRACE org.openhab.binding.velux
|
||||
log:tail
|
||||
```
|
||||
|
||||
This, of course, is possible on command line with the commands:
|
||||
|
||||
```text
|
||||
```shell
|
||||
% openhab-cli console log:set TRACE org.openhab.binding.velux
|
||||
% openhab-cli console log:tail org.openhab.binding.velux
|
||||
```
|
||||
|
||||
On the other hand, if you prefer a textual configuration, you can append the logging definition with:
|
||||
|
||||
```text
|
||||
```xml
|
||||
<logger name="org.openhab.binding.velux" level="TRACE">
|
||||
<appender-ref ref="FILE" />
|
||||
</logger>
|
||||
|
@ -234,7 +234,7 @@ Enabling detailed logging may help troubleshoot your configuration (or trace bug
|
||||
|
||||
Add the following lines to the logger configuration file (`userdata\etc\org.ops4j.pax.logging.cfg`):
|
||||
|
||||
```text
|
||||
```ini
|
||||
log4j2.logger.yamaha.name = org.openhab.binding.yamahareceiver
|
||||
log4j2.logger.yamaha.level = TRACE
|
||||
```
|
||||
|
@ -4,7 +4,9 @@ Extracts values from a JSON string using a [JsonPath](https://github.com/jayway/
|
||||
|
||||
Given the following JSON string:
|
||||
|
||||
`[{ "device": { "location": "Outside", "status": { "temperature": 23.2 }}}]`
|
||||
```json
|
||||
[{ "device": { "location": "Outside", "status": { "temperature": 23.2 }}}]
|
||||
```
|
||||
|
||||
The expression `$.device.location` extracts the string `Outside`.
|
||||
The JsonPath expression `$.device.status.temperature` extracts the string `23.2`.
|
||||
@ -13,29 +15,28 @@ The JsonPath expression `$.device.status.temperature` extracts the string `23.2`
|
||||
|
||||
### Items
|
||||
|
||||
```
|
||||
```java
|
||||
String Temperature_json "Temperature [JSONPATH($.device.status.temperature):%s °C]" {...}
|
||||
Number Temperature "Temperature [%.1f °C]"
|
||||
```
|
||||
|
||||
### Rules
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "Convert JSON to Item Type Number"
|
||||
when
|
||||
when
|
||||
Item Temperature_json changed
|
||||
then
|
||||
then
|
||||
// use the transformation service to retrieve the value
|
||||
val newValue = transform("JSONPATH", "$.device.status.temperature", Temperature_json.state.toString)
|
||||
|
||||
// post the new value to the Number Item
|
||||
Temperature.postUpdate( newValue )
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Now the resulting Number can also be used in the label to [change the color](https://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors) or in a rule as a value to compare.
|
||||
|
||||
|
||||
## Differences to standard JsonPath
|
||||
|
||||
Compared to standard JsonPath, the transformation returns single values instead of arrays.
|
||||
|
@ -39,7 +39,7 @@ the regex transformation can be used to extract the value to display it on the l
|
||||
|
||||
**.items**
|
||||
|
||||
```csv
|
||||
```java
|
||||
String Temperature_str "Temperature [REGEX(.*=(\\d*\\.\\d*).*):%s °C]" {...}
|
||||
Number Temperature "Temperature [%.1f °C]"
|
||||
```
|
||||
@ -62,17 +62,17 @@ Thus the value `44.0` would be saved as a number.
|
||||
|
||||
**.rules**
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "Convert String to Item Number"
|
||||
when
|
||||
when
|
||||
Item Temperature_str changed
|
||||
then
|
||||
then
|
||||
// use the transformation service to retrieve the value
|
||||
val newValue = transform("REGEX", ".*=(\\d*\\.\\d*).*", Temperature_str.state.toString)
|
||||
|
||||
// post the new value to the Number Item
|
||||
Temperature.postUpdate( newValue )
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
Now the resulting Number can also be used in the label to [change the color](https://docs.openhab.org/configuration/sitemaps.html#label-and-value-colors) or in a rule as value for comparison.
|
||||
|
@ -73,11 +73,11 @@ Number Temperature "Temperature [%.1f °C]"
|
||||
|
||||
### .rules
|
||||
|
||||
```php
|
||||
```java
|
||||
rule "Convert XML to Item Type Number"
|
||||
when
|
||||
when
|
||||
Item Temperature_xml changed
|
||||
then
|
||||
then
|
||||
// use the transformation service to retrieve the value
|
||||
// Simple
|
||||
val mytest = transform("XPATH", "/*[name()='PTZStatus']
|
||||
|
@ -45,7 +45,7 @@ In case you would like to setup the service via a text file, create a new file i
|
||||
|
||||
Its contents should look similar to:
|
||||
|
||||
```text
|
||||
```ini
|
||||
org.openhab.voice.pipertts:preloadModel=true
|
||||
```
|
||||
|
||||
@ -60,6 +60,6 @@ You can setup your preferred default Speech-to-Text in the UI:
|
||||
|
||||
In case you would like to set up these settings via a text file, you can edit the file `runtime.cfg` in `$OPENHAB_ROOT/conf/services` and set the following entries:
|
||||
|
||||
```text
|
||||
```ini
|
||||
org.openhab.voice:defaultTTS=pipertts
|
||||
```
|
||||
|
@ -40,7 +40,7 @@ In case you would like to setup the service via a text file, create a new file i
|
||||
|
||||
Its contents should look similar to:
|
||||
|
||||
```
|
||||
```ini
|
||||
org.openhab.voice.rustpotterks:threshold=0.5
|
||||
org.openhab.voice.rustpotterks:averagedthreshold=0.2
|
||||
org.openhab.voice.rustpotterks:scoreMode=max
|
||||
@ -79,7 +79,7 @@ You can setup your preferred default keyword spotter and default magic word in t
|
||||
|
||||
In case you would like to setup these settings via a text file, you can edit the file `runtime.cfg` in `$OPENHAB_ROOT/conf/services` and set the following entries:
|
||||
|
||||
```
|
||||
```ini
|
||||
org.openhab.voice:defaultKS=rustpotterks
|
||||
org.openhab.voice:keyword=hey openhab
|
||||
org.openhab.voice:listeningItem=myItemForDialog
|
||||
|
@ -49,7 +49,7 @@ In case you would like to setup the service via a text file, create a new file i
|
||||
|
||||
Its contents should look similar to:
|
||||
|
||||
```
|
||||
```ini
|
||||
org.openhab.voice.voskstt:preloadModel=false
|
||||
org.openhab.voice.voskstt:singleUtteranceMode=true
|
||||
org.openhab.voice.voskstt:maxTranscriptionSeconds=60
|
||||
|
Loading…
Reference in New Issue
Block a user