Paradox IP150-MQTTv2

Python-based IP150 'middle-ware' that uses the IP module's software port for monitoring and control of the alarm via an MQTT Broker.

NB: For a more feature-filled alternative to this script, I suggest looking at https://github.com/ParadoxAlarmInterface/pai

The script was designed to be extendable to support more alarm types. See the ParadoxMap.py file for details. If you want to do some tcp dump of your alarm model to add into there, get Paradox's Winload software. Then within it's root folder find a file called COM.ini and change the 'IPEncrypted' setting to FALSE. You can then use WireShark (or equivalent) to trap whatever commands/replies you want to and either extend the ParadoxMap.py's existing dictionaries or add in a complete new Class for another alarm type.

Confirmed supported systems: See the wiki (please let me know if yours work, or not)

Steps to use it:

  1. Tested with Python 2.7.10 & Mosquitto MQTT Broker
  2. Download the files in this repository and place it in some directory
  3. Copy the config-master.ini to config.ini file and edit to configure.
  4. Run the script: Python IP150-MQTTv2.py

NOTE: as at July-2017, there is not a configuration item for the location of the log directory. See this in the config.

What happens in the background:

The main script will connect to you IP module's software port (usually port 10000) and login with your password. It will then use two seperate classes (containing dictionaries) referenced in from the ParadoxMap.py file to extract different info from the alarm and translate events into meaningfull text. The dictionaries currently supports the MG5050 V4 firmware but could evolve over time if the community adds more alarm types to the dictionaries.

Once the info (mostly labels) has been extracted from the alarm, the MQTT broker is used as middleware between your application and the alarm panel.

Seeing as not all alarm variants are initially supported, you can use the config.ini file to switch off different portions of the script. You can also choose to only get events in their numeric form if you have the correct programming guide for your alarm detailing the event types. I would prefer it though if you can do a PR to update the ParadoxMap.py file with new entries for supported alarms or altogether new class dictionaries for other alarm variants.

What to expect:

Labels

If successfully connected to your IP150 and MQTT broker, the app will optionally start off by publishing (once-off) all the detected labels (zone, partition, output, etc. names) to your broker. Both the reading of label names and publishing thereof can be independantly controlled through the config.ini file. If you do read the labels, events such as "Zone open - Zone number 3" will translate to "Zone open - Garage door" or "Low battery on zone - Zone 1" to "Low battery on zone - Alley Beam" (assuming this is named/configured as such in your alarm).

Note: on a Spectre SP5500 these labels do not seem to read. To this end, I've updated to pull the zone name from the event message and will publish an MQTT topic for the zone name.

Events

Once the script has settled to listen for events, the following topics are available (and their names are also configurable in the config.ini file):

Controls

Note: If you modified the subscription topic for controls in the config.ini file ensure it ends with a '/'.

Script State

3rd Party Connections

This script will listen for 3rd party (Web-only, not software port) IP connections and if detected will disconnect for a period configured in the config.ini file. After the period has lapsed, the script will attempt to reconnect. This is useful if you still want to use web/smartphone apps (such as Alarmin). Note that it takes about 20 seconds to disconnect after which you can try to connect to the alarm again.

Running as a service / daemon

If you want to run this as a daemon on Linux,

  1. Copy the paradoxip.service file to /usr/lib/systemd/system (where mine is)
  2. Run: sudo systemctl daemon-reload
  3. Then you should be able to start the service with : sudo systemctl start paradoxip.service