Paradox To mqtt bridge for home automation
1.9K
Python-based IP150 'middle-ware' that uses the IP module's software port for monitoring and control of the alarm via an MQTT Broker.
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.
NB: This is still a very early release and has its bugs. Feel free to submit a PR, any help is appreciated, even if its for my bad grammer/spelling!
Confirmed supported systems: See the wiki (please let me know if yours work, or not)
NOTE: as at July-2017, there is now a configuration item for the location of the log directory. See this in the config.
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.
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.
Further Note, with version from 2018-06-05 - The issue was the lack of Pincode (PC Password in winload). Enter this now, and labels will appear on SP based panels. And you can also get startup/and periodic updates for partition status, voltages and zone status'
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):
Topic: Paradox/Events
Topic Paradox/Zones/zone label Sets a status for on of off for each zone. Allows Openhab?Home Assistant to easily configure an item for each zone. Use config item Publish_Zones_OpenClosed to choose between ON/OFF and OPEN/CLOSED for the zone payload message.
Topic Paradox/Partition Shows the current partition status (ON/OFF). Can't be determines on startup though (unless you've updated the Pincode), only while running. If a valid pincode is entered in the configuration file, the parition status will be updated every 6 seconds.
Topic Paradox/Partition/{partition Name}/Status
Shows ARMED, DISARMED, SLEEP and STAY, ARMING for the arming type of the partition (only partition 1 at this stage), and I may need to move this to a Paradox/P1 /P2 type structure. Change for 2.0.13 (is a breaking change) in that the partition name is added to the status. Eg:
Paradox/Partition/Area 1/Status
Topic Paradox/Status/1 A Json object with the voltages of the panel for example: {"battery": 13.3, "vdc": 16.8, "dc": 13.7, "paneldate": "2018-6-6 8:37"} Note the panel date, while not present yet, I do know the command for updating the time of the panel...
Topic Paradox/Heartbeat A topic that can be used to determine if a connection to the panel is present, or the script is running. This is set as the last will and testament, and so if the script exits, it will default back to OFF.
Note: If you modified the subscription topic for controls in the config.ini file ensure it ends with a '/'.
The current state of the script is linked to a topic found in the config file (unless the configuration item Topic_Publish_AppState has been modified). Examples:
The following topic shows if the script is running or not. This topic will be populated on startup, and if disconnected (client end, mqtt server crash) it will go off. It's the last will and testament on the client connection
The following topic will show the current ParadoxIP software version (unless the configuration item Topic_Publish_AppState has been modified)
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.
If you want to run this as a daemon on Linux,
If you want to run this on docker (amd64)
From the folder where your config.ini exists:
docker run -v $PWD:/opt/paradox/conf psyciknz/paradoxip
I do have an arm32v7 (Raspberry Pi 3) image on docker hub as well:
docker run -v $PWD:/opt/paradox/conf psyciknz/paradoxip:arm32v7-(version)
and Arm64 (Odroid C2)
docker run -v $PWD:/opt/paradox/conf psyciknz/paradoxip:arm64v8-(version)
The Arm images have to be manually kicked off unfortunately, I can't automate those direct from github.
Content type
Image
Digest
Size
262.3 MB
Last updated
about 7 years ago
docker pull psyciknz/paradoxip