Skip to content
This repository was archived by the owner on May 14, 2019. It is now read-only.

First Installation

Richard Roe edited this page Mar 6, 2018 · 30 revisions

Installation

Prerequisits

The following should be installed, configured, tested and working before continuing with installing ideAlarm:

Download mapping files

Download the mapping files in the language of your choise and save them on your system where you keep your mappings files (in the transform folder) Example linux commands for downloading the English mapping files followed by changing file owner and group:

sudo wget -O $OPENHAB_CONF/transform/en_armingmode.map https://raw.githubusercontent.com/OH-Jython-Scripters/ideAlarm/master/transform/en_armingmode.map
sudo chown openhab:openhab $OPENHAB_CONF/transform/en_zonestatus.map
sudo wget -O $OPENHAB_CONF/transform/en_zonestatus.map https://github.com/OH-Jython-Scripters/ideAlarm/blob/master/transform/en_zonestatus.map
sudo chown openhab:openhab $OPENHAB_CONF/transform/en_zonestatus.map

Define Item Groups (needed for persistence)

Below is an example how you can define some groups to help organize your ideAlarm Items. The important thing here is not the names of the groups but rather that you have defined your persistence so that the group G_Persist will be persisted on change and on system start up.

Group G_Persist // Persist on change and system start up
Group G_AlarmArmingMode (G_Persist)
Group G_AlarmStatus (G_Persist)
Group G_VirtualDevice (G_Persist)
Group G_Timer

Create Items for each alarm zone you intend to use

For each alarm zone that you wish to define, create the following items through text .items files located in the $OPENHAB_CONF/items folder. You are advised to keep the naming convention suggested at least until everything is set up and works well. Your first zone's items get item names starting with 'Z1'. Prepend your second zone items with 'Z2' etc.

Number Z1_Arming_Mode "Z1 Arming Mode: [MAP(en_armingmode.map):%s]" <alarm> (G_AlarmArmingMode)
Number Z1_Status "Z1 Status: [MAP(en_zonestatus.map):%s]" <alarm> (G_AlarmStatus)

Switch Toggle_Z1_Armed_Away "Toggle Z1 Armed Away" <switch> (G_VirtualDevice) {expire="1s,command=OFF"}
Switch Toggle_Z1_Armed_Home "Toggle Z1 Armed Home" <switch> (G_VirtualDevice) {expire="1s,command=OFF"}

Number Z1_Open_Sections "Z1 open sections [%.0f]" <door> (G_VirtualDevice)

Switch Z1_Entry_Timer "Z1 entry timer [%s]" <time> (G_Timer) {expire="15s,command=OFF"}
Switch Z1_Exit_Timer "Z1 exit timer [%s]" <time> (G_Timer) {expire="2m,command=OFF"}
Switch Z1_Nag_Timer "Z1 nag timer [%s]" <time> (G_Timer) {expire="4m,command=OFF"}
Switch Z1_Alert_Max_Timer "Z1 alert maximum time [%s]" <time> (G_Timer) {expire="20s,command=OFF"}

Create the config file

Example linux commands for doing that followed by changing file owner and group ownership:

sudo wget -nc -O $OPENHAB_CONF/automation/lib/python/idealarm/config.py https://raw.githubusercontent.com/OH-Jython-Scripters/ideAlarm/master/automation/lib/2_zones_example_config.py
sudo chown openhab:openhab $OPENHAB_CONF/automation/lib/python/idealarm/config.py

Edit the config file to suit your system

  • Make your changes to the configuration file. See configuration
  • Copy and paste your configuration file into the form on PythonBuddy to verify that the Python syntax. The two org.eclipse.smarthome imports will fail but you can ignore that.
  • Save the file.
Clone this wiki locally