Tertiush / ParadoxIP150

Python-based IP150 interrogator that publishes data and subscribes to control commands to and from an MQTT broker, without using a headless browser.
Other
19 stars 10 forks source link

Paradox IP150-MQTT

Python-based IP150 interrogator that publishes data and subscribes to control commands to and from an MQTT broker, without using a headless browser.

NB: This is still a very early release and has its bugs

Another version of this script (using the software port & also has access to alarm outputs (PGMs)) is available in my ParadoxIP150v2 repository. Tested only with MG5050 V4, for other variants I hope the community will assist with PRs.

Steps to use it:

  1. Tested with Python 2.7.10
  2. Download the files in this repository and place it in some directory
  3. Edit the config.ini file to match your setup
  4. Run the script: Python IP150-MQTT.py

What to expect:

If successfully connected to your IP150 and MQTT broker, the app will start off by publishing all current zone and partition statuses. The following topics are available (and their names are configurable in the config.ini file):

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

Running as a service / daemon

On Mac

( thanks @Rtaxerxes )

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

  1. Create a file called local.paradox.plist.
  2. Copy and paste the below into the file, editing for the location of your files.
  3. Copy the file to /Library/LaunchDaemons/.
  4. Run it with: sudo launchctl load /Library/LaunchDaemons/local.paradox.plist
  5. Stop it with: sudo launchctl unload /Library/LaunchDaemons/local.paradox.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
            <string>local.paradox</string>
        <key>WorkingDirectory</key>
            <string>/(folder where files are)</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/bin/python</string>
            <string>/(folder where files are)/IP150-MQTT.py</string>
        </array>
        <key>RunAtLoad</key>
            <true/>
    </dict>
</plist>