Satel Alarm Binding - vpjuslin/openhab GitHub Wiki
This is documentation of OpenHAB binding for Satel Integra Alarm System which allows you to connect to your alarm system using TCP/IP protocol with ETHM-1 module installed or RS-232 protocol with INT-RS module installed.
For installation of the binding, please see Wiki page Bindings.
NOTE: INT-RS module is not supported yet.
There are some configuration settings that you can set in the openhab.cfg file. Include the following in your openhab.cfg.
############################### Satel Binding ###################################
#
# Satel ETHM-1 module hostname or IP.
# Leave this commented out for INT-RS module.
#satel:host=
# ETHM-1 port to use (optional, defaults to 7094), if host setting is not empty.
# INT-RS port to use, if host setting is empty.
#satel:port=7094
# timeout value for both ETHM-1 and INT-RS (optional, in milliseconds, defaults to 5000)
#satel:timeout=5000
# refresh value (optional, in milliseconds, defaults to 10000)
#satel:refresh=10000
# user code for Integra control (optional, if empty binding works in read-only mode)
#satel:user_code=
# encryption key (optional, if empty communication is not encrypted)
#satel:encryption_key=
The only required parameter is satel:host for the ETHM-1 module and satel:port for the INT-RS module. The rest default to the values described in the configuration comments. In order to use ETHM-1 module it is required to enable "integration" protocol for the module in Integra configuration (DLOADX).
Option | Description |
---|---|
satel:host | Valid only for ETHM-1 module. Specifies either IP or host name of the module |
satel:port | For INT-RS it specifies the serial port on the host system to which the module is connected, i.e. "COM1" on Windows, "/dev/ttyS0" or "/dev/ttyUSB0" on Linux For ETHM-1 it specifies the TCP port on which the module listens for new connections. Defaults to 7094. |
satel:timeout | Timeout value for connect, read and write operations specified in milliseconds. Defaults to 5 seconds |
satel:refresh | Refresh interval in milliseconds. Defaults to 10 seconds. |
satel:user_code | Security code (password) of the user used for control operations, like arming, changing state of outputs, etc. It is recommended to use dedicated user for OpenHAB integration. |
satel:encryption_key | Key use for encrypting communication between OpenHAB and ETHM-1 module. To disable encrytpion leave it empty. See also the note below. |
NOTE: Encryption requires support for 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.
In order to bind to the Integra Alarm system you need to add settings for items defined in your item file. Here is item configuration string syntax:
satel="<object_type>[:<state_type>][:<object_number>][:<option>=<value>,...]"
Name of object type, state type and option is case insensitive. For "output" objects state type cannot be specified and must be ommited. object_number
must be integer number in range 1-256. Options are comma-separated pairs of name and value separated by =
character.
Supported item types: Contact
, Switch
, Number
. Number items can be used only if object_number
is not given and the number specifies cardinality of objects that are in given state. For example if object is "zone" and state is "violated", item will tell you number of zones violated. See examples section for detailed configuration syntax.
Valid object_type
values:
Type | Description |
---|---|
zone | defines a zone: PIR, contact, etc. |
partition | defines a partition |
output | defines an output |
doors | defines doors |
status | defines a status item |
Valid state_type
values for "zone" objects:
Type | Notes |
---|---|
violation | |
tamper | |
alarm | |
tamper_alarm | |
alarm_memory | |
tamper_alarm_memory | |
bypass | |
no_violation_trouble | |
long_violation_trouble | |
isolate | |
masked | |
masked_memory |
Valid state_type
values for "partition" objects:
Type | Notes |
---|---|
armed | ON command arms specified partition in mode 0, OFF disarms. Forces arming if "force_arm" option is specified. |
really_armed | ON command arms specified partition in mode 0, OFF disarms. Forces arming if "force_arm" option is specified. |
armed_mode_1 | ON command arms specified partition in mode 1, OFF disarms. Forces arming if "force_arm" option is specified. |
armed_mode_2 | ON command arms specified partition in mode 2, OFF disarms. Forces arming if "force_arm" option is specified. |
armed_mode_3 | ON command arms specified partition in mode 3, OFF disarms. Forces arming if "force_arm" option is specified. |
first_code_entered | |
entry_time | |
exit_time_gt_10 | |
exit_time_lt_10 | |
temporary_blocked | |
blocked_for_guard | |
alarm | OFF command clears alarms for specified partition |
alarm_memory | OFF command clears alarms for specified partition |
fire_alarm | OFF command clears alarms for specified partition |
fire_alarm_memory | OFF command clears alarms for specified partition |
violated_zones | |
verified_alarms | OFF command clears alarms for specified partition |
warning_alarms | OFF command clears alarms for specified partition |
Valid state_type
values for "doors" objects:
Type | Notes |
---|---|
opened | |
opened_long |
Valid state_type
values for "status" objects:
Type | Notes |
---|---|
service_mode | |
troubles | OFF command clears troubles memory |
troubles_memory | OFF command clears troubles memory |
acu100_present | |
intrx_present | |
grade23_set | |
date_time | DateTimeType or StringType command changes Integra date and time |
NOTE: Some of the values, like 'troubles' and 'intrx_present' don't work on my ETHM-1 Plus module.
Partition item with ability to arm and disarm:
Switch PartitionArmed "Partition armed" { satel="partition:armed:1" }
Sitemap definitions for above example. The second one allows only to arm the partition:
Switch item=PartitionArmed
Switch item=PartitionArmed mappings=[ON="Arm"]
Partition item with ability to force arming:
Switch Partition1 "Partition armed" { satel="partition:armed:1:force_arm" }
Simple contact item:
Contact Zone1 "Zone #1 violated" { satel="zone:violation:1" }
Number of items violated:
Number ZonesViolated "Zones violated [%d]" { satel="zone:violation" }
Simple output item with ability to change its state:
Switch Output1 "Output #1" { satel="output:1" }
Number of partitions with "alarm" state:
Number PartitionsInAlarm "Partitions alarmed [%d]" { satel="partition:alarm" }
Troubles memory item with clear ability:
Switch TroublesMemory "Troubles in the system" { satel="status:troubles_memory" }
Time synchronization using NTP binding:
DateTime AlarmDateTime "Current time [%1$tF %1$tR]" { satel="status:date_time" }
DateTime NtpDateTime "NTP time [%1$tF %1$tR]" {ntp="Europe/Berlin:de_DE" }
Rule for above example:
rule "Alarm time sync"
when
Item NtpDateTime received update
then
AlarmDateTime.sendCommand(new StringType(NtpDateTime.state.toString))
end
Connection status, item definition:
DateTime AlarmDateTime "Current time [%1$tF %1$tR]" { satel="status:date_time" }
Switch AlarmConnection "Connection status" <network>
Connection status rule:
var Timer satelTimer = null
rule "Satel connection status"
when
Item AlarmDateTime received update
then
var org.joda.time.DateTime timeout = now.plusSeconds(5)
AlarmConnection.postUpdate(ON)
if (satelTimer != null) {
satelTimer.reschedule(timeout)
} else {
satelTimer = createTimer(timeout) [|
AlarmConnection.postUpdate(OFF)
satelTimer = null
]
}
end
User for OH integration
To control Integra partitions and outputs you need to provide security code of user in behalf 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 OH 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 partion, 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 user code, which is required to disarm or clear alarms using Integra panel. Also don't forget to secure your OpenHAB installation by using HTTPS protocol and setting a user with password. Here is a page about security in OpenHAB: Security
- troubles support
- support for INT-RS module