Satel Integra Alarm System Binding

The Satel Integra Alarm System allows openHAB to connect to your alarm system via TCP/IP network with ETHM-1/ETHM-1 Plus module installed, or via RS-232 serial port with INT-RS/INT-RS Plus module installed. For ETHM-1 the binding uses integration protocol, so it must be enabled and properly configured.
Also it is always a good idea to update module/mainboard firmware to the latest version. For ETHM-1 and INT-RS modules it is a must. For "Plus" modules however it is not required.

In order to use encryption with ETHM-1/ETHM-1 Plus, Java Runtime Environment must support 192 bit AES keys. Oracle Java by default supports only 128 bit keys, therefore "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" must be installed. OpenJDK supports unlimited AES keys by default (but OpenJDK is sometimes discouraged for openHAB).

More details and all documentation about Integra system you can find on their site: satel.pl

Supported Things

This binding supports following thing types:

Thing typeDescription
ethm-1Ethernet bridge, supports ETHM-1 and ETHM-1 Plus modules
int-rsRS-232 bridge, supports INT-RS and INT-RS Plus modules
partitionSet of zones representing some physical area or logical relation
zoneA physical device: reed switch, motion sensor or a virtual zone
outputAn output defined in the system
shutterTwo outputs that control a roller shutter, one for "up" direction, another one for "down"
systemA logical thing describing general status of the alarm system

Discovery

The binding discovers all devices (partitions, zones) defined in the system, but bridge things must be configured manually.

Thing Configuration

ethm-1 bridge

You can configure the following settings for this bridge:

NameRequiredDescription
hostyesHost name or IP addres of ETHM-1 module
portnoTCP port for the integration protocol, defaults to 7094
timeoutnoTimeout value in milliseconds for connect, read and write operations, defaults to 5000 (5secs)
refreshnoPolling interval in milliseconds, defaults to 5000 (5secs). As of version 2.03 ETHM-1 Plus firmware the module disconnects after 25 seconds of inactivity. Setting this parameter to value greater than 25000 will cause inability to correctly communicate with the module.
userCodenoSecurity code of the user in behalf of all operations will be executed. If empty, only read operations are allowed
encryptionKeynoEncryption key used to encrypt data sent and received, if empty communication is not encrypted
encodingnoEncoding for all the texts received from the module

Example:

Bridge satel:ethm-1:home [ host="192.168.0.2", refresh=1000, userCode="1234", encryptionKey="abcdefgh" ]

int-rs bridge

You can configure the following settings for this bridge:

NameRequiredDescription
portyesSerial port connected to the module
timeoutnoTimeout value in milliseconds for connect, read and write operations, defaults to 5000 (5secs)
refreshnoPolling interval in milliseconds, defaults to 5000 (5secs)
userCodenoSecurity code of the user in behalf of all operations will be executed. If empty, only read operations are allowed
encodingnoEncoding for all the texts received from the module

Example:

Bridge satel:int-rs:home [ port="/dev/ttyS0", refresh=1000, userCode="1234" ]

partition

You can configure the following settings for a partition:

NameRequiredDescription
idyesPartition number
forceArmingnoArms the partition regardless of ongoing troubles and violations

Example:

Thing partition partition1 [ id=1, forceArming=true ]

zone

You can configure the following settings for a zone:

NameRequiredDescription
idyesZone number
invertStatenoChanges active (ON) state to 0

Example:

Thing zone zone1 [ id=1 ]

output

You can configure the following settings for an output:

NameRequiredDescription
idyesOutput number
invertStatenoChanges active (ON) state to 0
commandOnlynoAccepts commands only, does not update thing's state

Example:

Thing output output1 [ id=1, invertState=true ]

shutter

You can configure the following settings for a shutter:

NameRequiredDescription
upIdyesOutput number for "up" direction
downIdyesOutput number for "down" direction
commandOnlynoAccepts commands only, does not update thing's state

Example:

Thing shutter shutter1 [ upId=10, downId=11, commandOnly=true ]

system

This thing type does not have any configuration parameters.

Channels

partition

NameTypeDescription
armedSwitchArmed
really_armedSwitchReally armed
armed_mode_1SwitchArmed in mode 1
armed_mode_2SwitchArmed in mode 2
armed_mode_3SwitchArmed in mode 3
first_code_enteredSwitchFirst code entered
entry_timeSwitchEntry time
exit_time_gt_10SwitchExit time greater than 10 seconds
exit_time_lt_10SwitchExit time less than 10 seconds
temporary_blockedSwitchTemporary blocked
blocked_for_guardSwitchBlocked for guard
alarmSwitchAlarm
alarm_memorySwitchAlarm memory
fire_alarmSwitchFire alarm
fire_alarm_memorySwitchFire alarm memory
verified_alarmsSwitchVerified alarms
warning_alarmsSwitchWarning alarms
violated_zonesSwitchViolated zones

zone

NameTypeDescription
violationSwitchViolation
tamperSwitchTamper
alarmSwitchAlarm
tamper_alarmSwitchTamper alarm
alarm_memorySwitchAlarm memory
tamper_alarm_memorySwitchTamper alarm memory
bypassSwitchBypass
no_violation_troubleSwitchNo violation trouble
long_violation_troubleSwitchLong violation trouble
isolateSwitchIsolate
maskedSwitchMasked
masked_memorySwitchMasked memory

output

NameTypeDescription
stateSwitchState of the output

shutter

NameTypeDescription
stateRollershutterState of the shutter

system

NameTypeDescription
date_timeDateTimeDate and time on the alarm system
troublesSwitchActive when the system has troubles (trouble led is blinking on a panel)
troubles_memorySwitchMemorized state of system troubles
service_modeSwitchActive when the system is in service mode
acu100_presentSwitchActive when there is an ACU-100 module installed in the system
intrx_presentSwitchActive when there is an INT-RX module installed in the system
grade23_setSwitchActive when Grade2/Grade3 option is set in the system
user_codeStringAccepts string commands that override configured user code. Send empty string to revert user code to the one in the configuration.

Full Example

satel.things

Bridge satel:ethm-1:home [ host="192.168.0.2", refresh=1000, userCode="1234", encryptionKey="abcdefgh" ] {
    Thing partition MainPartition [ id=1 ]
    Thing zone LivingRoomPIR [ id=1 ]
    Thing zone BedroomPIR [ id=2 ]
    Thing output KitchenLamp [ id=1 ]
    Thing shutter KitchenWindow [ upId=2, downId=3 ]
    Thing system System [ ]
}

satel.items

Group Satel
Group:Switch:OR(ON,OFF) Alarms "Alarms [(%d)]" <siren>
Switch PARTITION_ARMED "Partition armed" (Satel) { channel="satel:partition:home:MainPartition:armed" }
Switch PARTITION_ALARM "Partition alarm" (Satel,Alarms) { channel="satel:partition:home:MainPartition:alarm" }
Switch LIVING_VIOLATION "Violation in living room" (Satel) { channel="satel:zone:home:LivingRoomPIR:violation" }
Switch LIVING_ALARM "Intruder in living room" (Satel) { channel="satel:zone:home:LivingRoomPIR:alarm" }
Switch BEDROOM_TAMPER "Bedroom PIR tampered" (Satel) { channel="satel:zone:home:BedroomPIR:tamper_alarm" }
Switch BEDROOM_TAMPER_M "Bedroom PIR tamper memory" (Satel) { channel="satel:zone:home:BedroomPIR:tamper_alarm_memory" }
Switch KITCHEN_LAMP "Kitchen lamp" (Satel) { channel="satel:output:home:KitchenLamp:state" }
Rollershutter KITCHEN_BLIND "Kitchen blind" (Satel) { channel="satel:shutter:home:KitchenWindow:state" }
Switch SYSTEM_TROUBLES "Troubles in the system" (Satel) { channel="satel:system:home:System:troubles" }
String KEYPAD_CHAR ">" <none> (Satel)
String USER_CODE "User code" (Satel) { channel="satel:system:home:System:user_code" }

satel.sitemap

Frame label="Alarm system" {
    Switch item=Alarms mappings=[OFF="Clear"]
    Switch item=PARTITION_ARMED mappings=[ON="Arm", OFF="Disarm"]
    Frame label="Status" {
        Switch item=SYSTEM_TROUBLES mappings=[OFF="Clear"]
        Switch item=LIVING_VIOLATION
        Switch item=LIVING_ALARM
        Switch item=BEDROOM_TAMPER
        Switch item=BEDROOM_TAMPER_M
    }
    Frame label="Kitchen" {
        Switch item=KITCHEN_LAMP
        Rollershutter item=KITCHEN_BLIND
    }
    Text label="Keypad" icon="settings" {
        Switch item=KEYPAD_CHAR mappings=[ "1"="1", "2"="2", "3"="3" ]
        Switch item=KEYPAD_CHAR mappings=[ "4"="4", "5"="5", "6"="6" ]
        Switch item=KEYPAD_CHAR mappings=[ "7"="7", "8"="8", "9"="9" ]
        Switch item=KEYPAD_CHAR mappings=[ "*"="*", "0"="0", "-"="#" ]
    }
}

satel.rules

var String userCode = ""
var Timer keypadTimer = null
var Timer userCodeTimer = null

rule "Keypad char entered"
when
    Item KEYPAD_CHAR changed
then
    val org.joda.time.DateTime timeout = now.plusSeconds(20)

    if (KEYPAD_CHAR.state == "-") {
        logInfo("Keypad", "Changing user code")
        USER_CODE.sendCommand(userCode)
        userCode = ""
        if (userCodeTimer != null) {
            userCodeTime.cancel
        }
        userCodeTimer = createTimer(now.plusMinutes(10)) [|
            logInfo("Keypad", "Reverting user code")
            USER_CODE.sendCommand("")
        ]
    } else if (KEYPAD_CHAR.state == "*") {
        logInfo("Keypad", "Reverting user code")
        USER_CODE.sendCommand("")
        userCode = ""
    } else {
        userCode = userCode + KEYPAD_CHAR.state
    }

    if (keypadTimer != null) {
        keypadTimer.cancel
    }
    keypadTimer = createTimer(timeout) [|
        userCode = ""
        KEYPAD_CHAR.postUpdate("")
    ]
end

Security considerations

User for openHAB integration

To control Integra partitions and outputs, you need to provide security code of a user in behalf of all those operations will be executed. It is highly recommended to use a separate user for openHAB integration with only required access rights set in Integra configuration, like access to certain partitions, etc. This allows you to distinguish actions made by openHAB and a user using Integra panel, also it will block unwanted operations in case someone breaks into your local network.

Disarming and clearing alarms

Although this binding allows you to configure disarming a partition and clearing alarms for a partition, this should be used only in cases when security is not the priority. Don't forget both these operations can be executed in openHAB without specifying a user code, which is required to disarm or clear alarms using Integra panel. Consider adding a keypad in your sitemap to temporarily change user code to execute sensitive operations. You can find such keypad in the Full Example section.

Media