The [GlobalCache](https://www.globalcache.com) binding enables communication
between openHAB and GlobalCache [GC-100](https://www.globalcache.com/products/gc-100/) and [iTach](https://www.globalcache.com/products/itach/) family of devices.
GlobalCache devices enable the control and automation of infrared, serial, and contact closure devices over a wired or wireless IP network.
## Overview
The GlobalCache binding discovers GC-100 and iTach devices on the network, and creates an inbox entry for each discovered device.
Once added as a thing, the user can complete the configuration of the device, such as adding the name of the MAP file that contains IR and/or serial codes.
## Devices Supported
Devices are discovered dynamically.
There is a single thing created for each physical GC-100 or iTach device discovered on the network.
Each thing has channels that correspond to the physical connectors on the device.
Currently supported devices include:
| Device | Thing ID |
|-----------------------------------|-----------|
| iTach WF2IR and IP2IR | itachIR |
| iTach WF2SL and IP2SL | itachSL |
| iTach WF2CC and IP2CC | itachCC |
| iTach Flex Ethernet and Flex WiFi | itachFlex |
| GC-100-6 | gc100_06 |
| GC-100-12 | gc100_12 |
| ZMOTE WiFi Universal Remote | zmote |
## Thing Configuration
The binding uses the MAP transformation service to convert commands into IR and/or serial codes.
If not already installed, the MAP transformation service is installed automatically when the binding is installed.
In the event that the device's IP address is changed, the thing configuration must be updated manually, as the device cannot auto-discover the change.
### iTach IR and ZMOTE
The iTach IR (Infrared) and ZMOTE devices have the following configuration parameters.
| Parameter | Parameter ID | Required/Optional | Description |
| IP Address | ipAddress | Required | The device's IP address. |
| MAP Filename | mapFilename | Required | The MAP file that contains mappings of commands to the serial codes. |
| Enable Two Way | enableTwoWay1 | Optional | Enable two-way communication with the device. By default, the binding only sends commands to the device. |
| EOM Delimiter | eomDelimiter1 | Optional | The End-of-Message delimiter used to identify the end of a message that the binding received from the device. |
### iTach CC
The iTach CC (Contact Closure) device has the following configuration parameters.
| Parameter | Parameter ID | Required/Optional | Description |
| IP Address | ipAddress | Required | The device's IP address. |
| MAP Filename | mapFilename | Required | The MAP file that contains mappings of commands to the IR and/or serial codes. |
| Active Cable | activeCable | Required | Available options are Infrared (FLEX_INFRARED), Serial (FLEX_SERIAL) or Relay/Sensor (FLEX_RELAY). |
| Enable Two Way | enableTwoWay1 | Optional | Enable two-way communication with the device. By default, the binding only sends commands to the device. |
| EOM Delimiter | eomDelimiter1 | Optional | The End-of-Message delimiter used to identify the end of a message that the binding received from the device. |
### GC-100-6
The GC-100-6 device has the following configuration parameters.
Note that you must use the GC-100-6's web application to set the serial port
parameters for **baud rate**, **flow control**, and **parity** to match the configuration of the end device to which the GC-100-6 is connected.
| Parameter | Parameter ID | Required/Optional | Description |
| IP Address | ipAddress | Required | The device's IP address. |
| MAP Filename | mapFilename | Required | The MAP file that contains mappings of commands to the IR and serial codes. |
| Enable Two Way | enableTwoWay1 | Optional | Enable two-way communication with the device. By default, the binding only sends commands to the device. |
| EOM Delimiter | eomDelimiter1 | Optional | The End-of-Message delimiter used to identify the end of a message that the binding received from the device. |
### GC-100-12
The GC-100-12 device has the following configuration parameters.
Note that you must use the GC-100-12's web application to set the serial port
parameters for **baud rate**, **flow control**, and **parity** to match the configuration of the end device to which the GC-100-12 is connected.
| Parameter | Parameter ID | Required/Optional | Description |
| IP Address | ipAddress | Required | The device's IP address. |
| MAP Filename | mapFilename | Required | The MAP file that contains mappings of commands to the IR and/or serial codes. |
| Enable Two Way 1 | enableTwoWay1 | Optional | Enable two-way communication between the binding and the device on serial port #1. By default, the binding only sends commands to the device. |
| EOM Delimiter 1 | eomDelimiter1 | Optional | The End-of-Message delimiter used to identify the end of a message that the binding received from the device on serial port #1. |
| Enable Two Way 2 | enableTwoWay2 | Optional | Enable two-way communication between the binding and the device on serial port #2. By default, the binding only sends commands to the device. |
| EOM Delimiter 2 | eomDelimiter2 | Optional | The End-of-Message delimiter used to identify the end of a message that the binding received from the device on serial port #2. |
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.
_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.
For example, the IR channel on connector 3 on module 1 is named ir-m1c2.
The [Global Cache iConvert utility](https://www.globalcache.com/files/docs/gc_iconvert_relnotes.txt) can be used to convert between the two formats, if desired.
String RS232ME "My RS232-controlled Device" { channel="globalcache:gc100_6:000C459A120A:sl-m1#c1" }
```
Serial commands strings are contained in a MAP file contained within the conf/transform directory.
Serial command strings can contain URL-encoded characters in order to represent special characters such as spaces, tabs, carriage returns, line feeds, etc.
See example below.
## Serial (SL) Direct Channel
The Serial Direct channel type enables serial commands to be sent directly to the device without attempting to map the command using the transformation service.
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.
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.