[caddx] Add thing actions to the binding (#9248)
* Added keypad support and thing actions * Related to #8116 Signed-off-by: Georgios Moutsos <georgios.moutsos@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@ This binding supports the following Thing types
|
||||
| panel | Thing | The basic representation of the alarm System. |
|
||||
| partition | Thing | Represents a controllable area within the alarm system. |
|
||||
| zone | Thing | Represents a physical device such as a door, window, or motion sensor. |
|
||||
| keypad | Thing | Represents a keypad. (Not yet functional) |
|
||||
| keypad | Thing | Represents a keypad. |
|
||||
|
||||
## Discovery
|
||||
|
||||
@@ -22,7 +22,7 @@ First the bridge must be **manually** defined. The serial port, baud rate and pr
|
||||
After the bridge is manually added and available to openHAB, the binding will automatically start to discover partitions and zones and add them to the discovery inbox.
|
||||
|
||||
Note:
|
||||
There is currently no support to discover the available keypads.
|
||||
There is no support to discover the available keypads.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -41,7 +41,7 @@ For the binding to work the panel has also to be programmed appropriately.
|
||||
| 211 | 2 | 1,2,3,4,5 | (Flags 4 and 5 are not yet functional. Can be ignored.) |
|
||||
| 211 | 3 | | |
|
||||
| 211 | 4 | 5,7,8 | |
|
||||
| 212 | 1 | 192 | Programming the LCD keypad address. (Not yet functional. Can be ignored.) |
|
||||
| 212 | 1 | 192 | Programming the LCD keypad address. |
|
||||
|
||||
### Programming locations for the NX-584E home automation module
|
||||
|
||||
@@ -55,24 +55,23 @@ For the binding to work the panel has also to be programmed appropriately.
|
||||
| 3 | 2 | 1,2,3,4,5 | (Flags 4 and 5 are not yet functional. Can be ignored.) |
|
||||
| 3 | 3 | | |
|
||||
| 3 | 4 | 5,7,8 | |
|
||||
| 4 | 1 | 192 | Programming the LCD keypad address. (Not yet functional. Can be ignored.) |
|
||||
| 4 | 1 | 192 | Programming the LCD keypad address. |
|
||||
|
||||
## Thing Configuration
|
||||
|
||||
The things can be configured either through the online configuration utility via discovery, or manually through the configuration file.
|
||||
The following table shows the available configuration parameters for each thing.
|
||||
|
||||
| Thing | Configuration Parameters |
|
||||
|-----------|------------------------------------------------------------------------------------------------|
|
||||
| bridge | `serialPort` - Serial port for the bridge - Required |
|
||||
| | `protocol` - Protocol used for the communication (Binary, Ascii) - Required - Default = Binary |
|
||||
| | `baud` - Baud rate of the bridge - Required - Default = 9600 |
|
||||
| | `maxZoneNumber` - Maximum zone number to be added during discovery - Required - Default = 16 |
|
||||
| partition | `partitionNumber` - Partition number (1-8) - Required |
|
||||
| zone | `zoneNumber` - Zone number (1-192) - Required |
|
||||
| keypad | `keypadAddress` - Keypad address (192-255) - Required |
|
||||
|
||||
A full example is further below.
|
||||
| Thing | Configuration Parameters |
|
||||
|-----------|-----------------------------------------------------------------------------------------------------|
|
||||
| bridge | `serialPort` - Serial port for the bridge - Required |
|
||||
| | `protocol` - Protocol used for the communication (Binary, Ascii) - Required - Default = Binary |
|
||||
| | `baud` - Baud rate of the bridge - Required - Default = 9600 |
|
||||
| | `maxZoneNumber` - Maximum zone number to be added during discovery - Required - Default = 16 |
|
||||
| partition | `partitionNumber` - Partition number (1-8) - Required |
|
||||
| zone | `zoneNumber` - Zone number (1-192) - Required |
|
||||
| keypad | `keypadAddress` - Keypad address (192-255) - Required |
|
||||
| keypad | `terminalModeSeconds` - The number of Seconds the keypad has to remain in Terminal Mode. - Required |
|
||||
|
||||
## Channels
|
||||
|
||||
@@ -214,6 +213,66 @@ Caddx Alarm things support a variety of channels as seen below in the following
|
||||
| zone_loss_of_supervision | Switch | Zone Condition | Loss of supervision |
|
||||
| zone_alarm_memory | Switch | Zone Condition | Alarm memory |
|
||||
| zone_bypass_memory | Switch | Zone Condition | Bypass memory |
|
||||
| keypad_key_pressed | String | Button press | The pressed button on the keypad |
|
||||
|
||||
## Thing actions
|
||||
|
||||
The binding supports the following actions on the respective things.
|
||||
|
||||
| Thing | Name | Description | Specification |
|
||||
|-----------|---------------------------------|----------------------------------------------------------|-----------------------------------------------------------------|
|
||||
| bridge | restart | Restart the binding | void restart() |
|
||||
| zone | bypass | Bypass the zone | void bypass() |
|
||||
| keypad | enterTerminalMode | Enter terminal mode on the selected keypad | void enterTerminalMode() |
|
||||
| keypad | sendKeypadTextMessage | Display a message on the Keypad | void sendKeypadTextMessage(String displayLocation, String text) |
|
||||
| partition | turnOffAnySounderOrAlarm | Turn off any sounder or alarm | void turnOffAnySounderOrAlarm(String pin) |
|
||||
| partition | disarm | Dis-arm | void disarm(String pin) |
|
||||
| partition | armInAwayMode | Arm in away mode | void armInAwayMode(String pin) |
|
||||
| partition | armInStayMode | Arm in stay mode | void armInStayMode(String pin) |
|
||||
| partition | cancel | Cancel | void cancel(String pin) |
|
||||
| partition | initiateAutoArm | Initiate auto arm | void initiateAutoArm(String pin) |
|
||||
| partition | startWalkTestMode | Start walk-test mode | void startWalkTestMode(String pin) |
|
||||
| partition | stopWalkTestMode | Stop walk-test mode | void stopWalkTestMode(String pin) |
|
||||
| partition | stay | Stay (1 button arm / toggle interiors) | void stay() |
|
||||
| partition | chime | Chime (toggle chime mode) | void chime() |
|
||||
| partition | exit | Exit (1 button arm / toggle instant) | void exit() |
|
||||
| partition | bypassInteriors | Bypass Interiors | void bypassInteriors() |
|
||||
| partition | firePanic | Fire Panic | void firePanic() |
|
||||
| partition | medicalPanic | Medical Panic | void medicalPanic() |
|
||||
| partition | policePanic | Police Panic | void policePanic() |
|
||||
| partition | smokeDetectorReset | Smoke detector reset | void smokeDetectorReset() |
|
||||
| partition | autoCallbackDownload | Auto callback download | void autoCallbackDownload() |
|
||||
| partition | manualPickupDownload | Manual pickup download | void manualPickupDownload() |
|
||||
| partition | enableSilentExit | Enable silent exit | void enableSilentExit() |
|
||||
| partition | performTest | Perform test | void performTest() |
|
||||
| partition | groupBypass | Group Bypass | void groupBypass() |
|
||||
| partition | auxiliaryFunction1 | Auxiliary Function 1 | void auxiliaryFunction1() |
|
||||
| partition | auxiliaryFunction2 | Auxiliary Function 2 | void auxiliaryFunction2() |
|
||||
| partition | startKeypadSounder | Start keypad sounder | void startKeypadSounder() |
|
||||
| panel | turnOffAnySounderOrAlarmOnPanel | Turn off any sounder or alarm on all partitions | void turnOffAnySounderOrAlarm(String pin) |
|
||||
| panel | disarmOnPanel | Dis-arm all partitions | void disarm(String pin) |
|
||||
| panel | armInAwayModeOnPanel | Arm in away mode on all partitions | void armInAwayMode(String pin) |
|
||||
| panel | armInStayModeOnPanel | Arm in stay mode on all partitions | void armInStayMode(String pin) |
|
||||
| panel | cancelOnPanel | Cancel command on all partitions | void cancel(String pin) |
|
||||
| panel | initiateAutoArmOnPanel | Initiate auto arm on all partitions | void initiateAutoArm(String pin) |
|
||||
| panel | startWalkTestModeOnPanel | Start walk-test mode on all partitions | void startWalkTestMode(String pin) |
|
||||
| panel | stopWalkTestModeOnPanel | Stop walk-test mode on all partitions | void stopWalkTestMode(String pin) |
|
||||
| panel | stayOnPanel | Stay (1 button arm / toggle interiors) on all partitions | void stay() |
|
||||
| panel | chimeOnPanel | Chime (toggle chime mode) on all partitions | void chime() |
|
||||
| panel | exitOnPanel | Exit (1 button arm / toggle instant) on all partitions | void exit() |
|
||||
| panel | bypassInteriorsOnPanel | Bypass Interiors on all partitions | void bypassInteriors() |
|
||||
| panel | firePanicOnPanel | Fire Panic on all partitions | void firePanic() |
|
||||
| panel | medicalPanicOnPanel | Medical Panic on all partitions | void medicalPanic() |
|
||||
| panel | policePanicOnPanel | Police Panic on all partitions | void policePanic() |
|
||||
| panel | smokeDetectorResetOnPanel | Smoke detector reset on all partitions | void smokeDetectorReset() |
|
||||
| panel | autoCallbackDownloadOnPanel | Auto callback download on all partitions | void autoCallbackDownload() |
|
||||
| panel | manualPickupDownloadOnPanel | Manual pickup download on all partitions | void manualPickupDownload() |
|
||||
| panel | enableSilentExitOnPanel | Enable silent exit on all partitions | void enableSilentExit() |
|
||||
| panel | performTestOnPanel | Perform test on all partitions | void performTest() |
|
||||
| panel | groupBypassOnPanel | Group Bypass on all partitions | void groupBypass() |
|
||||
| panel | auxiliaryFunction1OnPanel | Auxiliary Function 1 on all partitions | void auxiliaryFunction1() |
|
||||
| panel | auxiliaryFunction2OnPanel | Auxiliary Function 2 on all partitions | void auxiliaryFunction2() |
|
||||
| panel | startKeypadSounderOnPanel | Start keypad sounder on all partitions | void startKeypadSounder() |
|
||||
|
||||
## Full Example
|
||||
|
||||
@@ -272,3 +331,20 @@ sitemap home label="Home" {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The following is a rule example with calling of an action on the binding
|
||||
|
||||
```
|
||||
rule "Zone Bypass on Chime Off"
|
||||
when
|
||||
Item caddx_partition_thebridge_partition1_partition_chime_mode_on changed from ON to OFF
|
||||
then
|
||||
val actions = getActions("caddx","caddx:zone:thebridge:zone4")
|
||||
if (null === actions) {
|
||||
logWarn("actions", "Actions not found, check thing ID for the Zone")
|
||||
return
|
||||
}
|
||||
|
||||
actions.bypass()
|
||||
end
|
||||
```
|
||||
Reference in New Issue
Block a user