[Documentation] Markdown improvements f to m (#13866)

Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
This commit is contained in:
Jerome Luckenbach
2022-12-08 21:36:05 +01:00
committed by GitHub
parent 3c236b3103
commit 0e68936663
122 changed files with 3490 additions and 3662 deletions

View File

@@ -112,7 +112,7 @@ parameters for **baud rate**, **flow control**, and **parity** to match the conf
### Manual Thing Creation
Devices can be created in the *UI*, or by placing a *.things* file in the *conf/things* directory.
Devices can be created in the _UI_, or by placing a _.things_ file in the _conf/things_ directory.
See example below.
### Binding Dependencies
@@ -125,26 +125,26 @@ GlobalCache GC-100, iTach, and Zmote devices emit an **announcement beacon** eve
The GlobalCache binding will automatically detect those devices, then add them to the inbox.
Background discovery is **enabled** by default.
To disable background discovery, add the following line to the *conf/services/runtime.cfg* file:
To disable background discovery, add the following line to the _conf/services/runtime.cfg_ file:
```text
discovery.globalcache:background=false
```
Note that automatic device discovery **will not work** with GC-100's running firmware earlier than v3.0 as those versions do not emit announcement beacons on the multicast address.
GC-100's running firmware earlier than v3.0 must be configured manually, either through the *UI* or using a *.things* file.
GC-100's running firmware earlier than v3.0 must be configured manually, either through the _UI_ or using a _.things_ file.
See below.
## Channels and Channel Types
There are four *channel types* used across the GC-100 and iTach family of devices.
There are four _channel types_ used across the GC-100 and iTach family of devices.
- Contact Closure (CC)
- Infrared (IR)
- Serial (SL)
- Serial Direct (SL)
*Channels* follow a naming convention that relates to the physical configuration of the Global Cache device -- specifically the **module** and **connector** numbers.
_Channels_ follow a naming convention that relates to the physical configuration of the Global Cache device -- specifically the **module** and **connector** numbers.
For example, the channel name **m2c3** refers to connector 3 on module 2.
For iTach Flex devices, since they can be configured to support infrared, serial, or contact closure, channels are prefixed with ir-, sl-, and cc-, respectively.
@@ -152,7 +152,7 @@ For example, the IR channel on connector 3 on module 1 is named ir-m1c2.
## Infrared (IR) Channel
The *Infrared channel* sends IR codes out the IR connector on the device.
The _Infrared channel_ sends IR codes out the IR connector on the device.
For example, the following item links to the module 1 / connector 2 channel on an iTach IR device.
```java
@@ -192,30 +192,30 @@ There are numerous other sources of IR codes, such as iRule and RemoteCentral.
#### Unsupported Features
Currently, only the *IR Out* and *IR Blaster* connector configurations are supported.
Other settings, such as *Sensor In*, *Sensor Notify*, and *LED Lighting*, may be supported in the future.
Currently, only the _IR Out_ and _IR Blaster_ connector configurations are supported.
Other settings, such as _Sensor In_, _Sensor Notify_, and _LED Lighting_, may be supported in the future.
## Contact Closure (CC) Channel
A *Contact Closure channel* activates the contact closure (relay) on the iTach or GC-100 device.
A _Contact Closure channel_ activates the contact closure (relay) on the iTach or GC-100 device.
For example, the following item links to the module 1, connector 1 channel on an iTach CC device.
```
```java
Switch MyRelay "My Relay [%s]" (gRelays) { channel="globalcache:itachCC:000C1E039BCF:cc-m1#c1" }
```
The item definition for an iTach Flex WiFi device would look like this.
```
```java
String MyRelay "My Relay [%s]" (gRelays) { channel="globalcache:itachFlex:000C01AF4990:cc-m1#c1" }
```
## Serial (SL) Channel
An *SL channel* sends serial command strings out the serial connector on the device.
An _SL channel_ sends serial command strings out the serial connector on the device.
For example, the following item links to the module 1 connector 1 channel on a GC-100-6 device.
```
```java
String RS232ME "My RS232-controlled Device" { channel="globalcache:gc100_6:000C459A120A:sl-m1#c1" }
```
@@ -229,7 +229,7 @@ The Serial Direct channel type enables serial commands to be sent directly to th
This is useful in rules where the serial command might be constructed "on the fly" in the body of the rule.
For example, the following item links to the module 1 connector 1 channel on an iTach Flex device.
```
```java
String RUSSCAA66 "Russound CAA66" { channel="globalcache:itachFlex:000C45D530B9:sl-m1#c1-direct" }
```
@@ -244,7 +244,7 @@ Use URL encoding for non-printable characters.
For example, the following item links to the receive channel on module 1 connector 1 on a GC-100.
A rule that looks for updates on this item will be able to process messages sent from the device connected to the GlobalCache's serial port.
```
```java
String RUSSCAA66_Receive "Russound CAA66 Receive" { channel="globalcache:gc100_06:000C1EFFF039:sl-m1#c1-receive" }
```
@@ -256,9 +256,9 @@ Here are some examples of common **End-ofMessage** delimiters.
%F7 Russound RNET message terminator
```
**Example**
### Example
### MAP File
#### MAP File
```text
# Harmon Kardon AVR-245 Home Theater Receiver
@@ -292,9 +292,9 @@ RS232ME_VOLUME_UP = VOLUME%20UP%0D%0A
RS232ME_VOLUME_DOWN = VOLUME%20DOWN%0D%0A
```
### Items File
#### Items File
```
```java
Switch ContactClosure1 "Relay on Connector 1" { channel="globalcache:itachCC:000C1E017BCF:cc-m1#c1" }
Switch ContactClosure2 "Relay on Connector 2" { channel="globalcache:itachCC:000C1E017BCF:cc-m1#c2" }
Switch ContactClosure3 "Relay on Connector 3" { channel="globalcache:itachCC:000C1E017BCF:cc-m1#c3" }
@@ -313,11 +313,11 @@ String RUSSCAA66 "Russound CAA66" { channel="globalcac
String ZSAMSUNGHLS "Samsung HL-S DLP TV" { channel="globalcache:zmote:CI00073306:ir-m1-c1#c1" }
```
### Sitemap File
#### Sitemap File
This is an example of how to use contact closure, infrared, and serial devices in a sitemap.
```
```perl
Frame label="Contact Closure" {
Switch item=ContactClosure1 label="Open/Close Garage Door"
Switch item=ContactClosure2 label="Light on Garage Door Opener"
@@ -347,11 +347,11 @@ Frame label="Garage Door" {
}
```
### Rule file
#### Rule file
This is an example of how to use a Contact Closure channel within a rule to implement a momentary contact switch, which could be used to trigger a garage door opener.
```
```java
var boolean isRunning = false
rule "Example Garage Door Opener"
@@ -370,7 +370,7 @@ end
This is an example of how to send IR and/or serial commands from within a rule.
```
```java
rule "AV Power On/Off"
when
Item AVPowerOn received command
@@ -388,7 +388,7 @@ end
This is an example of how to send a serial command directly from within a rule.
```
```java
rule "Russound Set Zone 1 Volume to 20"
when
Item RussoundSetVolume received command
@@ -399,10 +399,10 @@ end
### Manual Thing Creation
Place a file named *globalcache.things* in the *conf/things* directory.
Place a file named _globalcache.things_ in the _conf/things_ directory.
The file should contain lines formatted like this.
```
```java
globalcache:itachCC:000CFF17B106 [ ipAddress="192.168.12.62" ]
globalcache:itachIR:000C0B1E54A0 [ ipAddress="192.168.12.63", mapFilename="ir-codes.map" ]
globalcache:itachSL:000CF886B107 [ ipAddress="192.168.12.64", mapFilename="serial-codes.map" ]