Community Hass.io Add-on: Paradox Alarm Interface

Hi again.

I am using lovelace front end.

A couple of questions:

  1. I compared your pai configuration versus mine and I see that you have a serial port and baud rate settings. Do we need to set this? I am connecting to the IP150 via ethernet. my /dev/ttyusb0 is occupied by a CC2531 dongle.

  2. The IP connection password - I assumed this is the password when connecting via a web front end to the IP150? This is what I have set mine. Is this correct?

  3. IP connection panel serial - I have this set to the string I see in Babyware - the string is something like 29207F2D. Should I have set this to null like you did?

  4. the MQTT username - Is this the username that is meant for PAI only? I have this set to ‘home-assistant’ as this is the MQTT username I have for the other devices such as Tasmota.

  5. MQTT bind address - I have this set to null and you have this set to 192.168.0.50. What is this address exactly?

Thanks again

Now I don’t know what exactly I changed but I try to align my PAI.conf with yours and after a restart of PAI and home assistant, OMG the thing now works!!

# Should be at /etc/pai/pai.conf

import logging

# Default configuration.
# Edit as needed



### Logging
# LOGGING_LEVEL_CONSOLE = logging.INFO # See documentation of Logging package
# LOGGING_LEVEL_FILE = logging.ERROR
LOGGING_FILE = '/var/log/pai/paradox.log'             	# or set to file path LOGGING_FILE='/var/log/paradox.log'
LOGGING_FILE_MAX_SIZE = 10          # Max log file size in MB
LOGGING_FILE_MAX_FILES = 2          # Max old log files to keep
LOGGING_DUMP_PACKETS = False    	# Dump RAW Packets to log
LOGGING_DUMP_MESSAGES = False   	# Dump Messages to log
LOGGING_DUMP_STATUS = False         # Dump Status to log
LOGGING_DUMP_EVENTS = False         # Dump Event details to log
#
### Development
# DEVELOPMENT_DUMP_MEMORY = False
#
### Connection Type
CONNECTION_TYPE = 'IP'  		# Serial or IP
#
### Serial Connection Details
# SERIAL_PORT = '/dev/ttyS1' 		# Pathname of the Serial Port
# SERIAL_BAUD = 9600              # 9600 for SP/MG. For EVO: Use 38400(default setting) or 57600
#
### IP Connection Details
IP_CONNECTION_HOST = '192.168.1.8'	# IP Module address when using direct IP Connection
IP_CONNECTION_PORT = 10000		    # IP Module port when using direct IP Connection
IP_CONNECTION_PASSWORD = 'password used via web interface to IP150' # IP Module password. "paradox" is default.
IP_CONNECTION_SITEID = None 		# SITE ID. IF defined, connection will be made through this method.
# IP_CONNECTION_EMAIL = None 		# Email registered in the site
IP_CONNECTION_PANEL_SERIAL = 'my panel ID that I see on babyware'  # Use a specific panel. Set it to None to use the first
# IP_CONNECTION_BARE = False      # No not expect an IP150 module. Used this for base Serial over TCP tunnels
#
### Paradox
# KEEP_ALIVE_INTERVAL = 10   		# Interval between status updates
#
# LIMITS = { # By default all zones will be monitored
#     # 'zone': range(1, 17),     # Zones to monitor and control
#     # 'user': [1, 2, 3, 4],     # Users to consider
#     # 'door': range(1, 32),     # Doors to consider
#     # 'pgm': range(1, 17),      # PGMs to monitor and control
#     # 'partition': [1, 2],      # Partitions to monitor and control
#     # 'bus-module': range(1, 17),      # Buses to monitor
#     # 'repeater': range(1, 9),  # Repeaters to monitor
#     # 'keypad': range(1, 9)     # Keypads to monitor
# }
#
# LABEL_ENCODING = 'utf-8'                # Encoding to use when decoding labels
# LABEL_REFRESH_INTERVAL = 15 * 60        # Interval between refresh of labels
# OUTPUT_PULSE_DURATION = 1               # Duration of a PGM pulse in seconds
# SYNC_TIME = False    			# Update panel time periodically when time drifts more than SYNC_TIME_MIN_DRIFT
# SYNC_TIME_MIN_DRIFT = 60    	# Minimum time drift in seconds to initiate time sync
PASSWORD = '1234'   			# PC Password. Set to None if Panel has no Password.
#                                 # In Babyware: Right click on your panel -> Properties -> PC Communication (Babyware) ->
#                                 # PC Communication (Babyware) Tab.
#
# POWER_UPDATE_INTERVAL = 60      	# Interval between updates of the battery, DC and VDC voltages
# PUSH_POWER_UPDATE_WITHOUT_CHANGE = True # Always notify interfaces of power changes
# PUSH_UPDATE_WITHOUT_CHANGE = False      # Always notify interfaces of all changes
#
### MQTT
MQTT_ENABLE = True			# Enable MQTT Interface
MQTT_HOST = '192.168.1.111' 		# Hostname or address
MQTT_PORT = 1883        		# TCP Port (TLS port if MQTT_TLS_CERT_PATH is set)
MQTT_TLS_CERT_PATH = None		# Path to ca cert (/etc/pai/certs/ca.pem), if you want TLS
MQTT_KEEPALIVE = 60     		# Keep alive
MQTT_USERNAME = 'my MQTT username - same as for tasmota mqtt'# MQTT Username for authentication
MQTT_PASSWORD = 'my MQTT password'    		# MQTT Password
MQTT_RETAIN = True      		# Publish messages with Retain
MQTT_BIND_ADDRESS = ''        # MQTT Client bind address. Default: "" - pick automatically
MQTT_BIND_PORT = 0            # MQTT Client bind port. Default: 0 - pick automatically
MQTT_REPUBLISH_INTERVAL = 60 * 60 * 12  # Interval for republishing all data
MQTT_PUBLISH_DEFINITIONS = False        # Publish definitions of partitions/zones/users to MQTT. Not required in most cases.
#
### MQTT Topics
MQTT_BASE_TOPIC = 'paradox'             # Root of all topics
MQTT_ZONE_TOPIC = 'zones'               # Base for zone states
MQTT_PARTITION_TOPIC = 'partitions'     # Base for partition states
MQTT_BUS_TOPIC = 'buses'                # Base for buses states
MQTT_MODULE_TOPIC = 'bus-module'        # Base for bus module states
MQTT_SYSTEM_TOPIC = 'system'            # Base for panel states
MQTT_REPEATER_TOPIC = 'repeaters'       # Base for repeater states
MQTT_USER_TOPIC = 'users'               # Base for user states
MQTT_EVENTS_TOPIC = 'events'            # Base for events
MQTT_CONTROL_TOPIC = 'control'          # Base for control of other elements (ROOT/CONTROL/TYPE)
MQTT_DEFINITIONS_TOPIC = 'control'      # Base for definitions
MQTT_HOMEASSISTANT_DISCOVERY_PREFIX = 'homeassistant'
MQTT_OUTPUT_TOPIC = 'outputs'
MQTT_DOOR_TOPIC = 'doors'
MQTT_KEYPAD_TOPIC = 'keypads'
MQTT_STATES_TOPIC = 'states'
MQTT_RAW_TOPIC = 'raw'
#
MQTT_NOTIFICATIONS_TOPIC = 'notifications'
MQTT_SEND_PANIC_TOPIC = 'panic'
MQTT_PUBLISH_RAW_EVENTS = True
MQTT_INTERFACE_TOPIC = 'interface'
MQTT_TOGGLE_CODES = {}
MQTT_USE_NUMERIC_STATES = False         # use 0 and 1 instead of True and False
#
MQTT_PUBLISH_COMMAND_STATUS = False  # Publish command statuses to MQTT
MQTT_COMMAND_STATUS_TOPIC = "command_status"
#
### MQTT Home Assistant Auto Discovery
MQTT_HOMEASSISTANT_AUTODISCOVERY_ENABLE = True
#
### Dash App
MQTT_DASH_PUBLISH = False
MQTT_DASH_TOPIC = 'metrics/exchange/pai'
MQTT_DASH_TEMPLATE = '/etc/pai/mqtt_dash.txt'
#
### Interfaces text command alias
COMMAND_ALIAS = {						# alias for commands through text based interfaces
    'arm': 'partition all arm',
    'disarm': 'partition all disarm'
}
#
#MQTT_COMMAND_ALIAS = {
#    # For homebridge
#    'armed_home': 'arm_stay',
#    'armed_night': 'arm_sleep',
#    'armed_away': 'arm',
#     'disarmed': 'disarm'
# }
#
#
### Home Assistant Notifications (HASS.io required)
# HOMEASSISTANT_NOTIFICATIONS_ENABLE = False
# HOMEASSISTANT_NOTIFICATIONS_NOTIFIER_NAME = 'notify'
# HOMEASSISTANT_NOTIFICATIONS_MIN_EVENT_LEVEL = 'INFO'
## Event filtering by tags:
# HOMEASSISTANT_NOTIFICATIONS_EVENT_FILTERS = [ # list of tags to include or exclude see hardware event.py for tag list
#     'live,alarm,-restore', # or
#     'live,trouble,-clock', # or
#     'live,tamper'
# ]
## - OR - event filtering using regexp. Cannot be used together with _EVENT_FILTERS
# HOMEASSISTANT_NOTIFICATIONS_ALLOW_EVENTS = [r".*"] # List of tuples or regexp matching "type,label,property=value,property2=value" eg. [(major, minor), "zone:HOME:entry_delay=True", ...]
# HOMEASSISTANT_NOTIFICATIONS_IGNORE_EVENTS = [ # Same as previous but to ignore some specific events that matched in _ALLOW_EVENTS
#     r"zone,[\w]+,no_delay=True",
#     r"zone,[\w]+,exit_delay=.*"
# ]
#
### Pushbullet
# PUSHBULLET_ENABLE = False
# PUSHBULLET_KEY = ''                     # Authentication key used for Pushbullet
# PUSHBULLET_CONTACTS = []                # Pushbullet user identifiers for notifications and interaction
# PUSHBULLET_MIN_EVENT_LEVEL = 'INFO'
## Event filtering by tags:
# PUSHBULLET_EVENT_FILTERS = [ # list of tags to include or exclude see hardware event.py for tag list
#     'live,alarm,-restore', # or
#     'live,trouble,-clock', # or
#     'live,tamper'
# ]
## - OR - event filtering using regexp. Cannot be used together with _EVENT_FILTERS
# PUSHBULLET_ALLOW_EVENTS = [r".*"] # List of tuples or regexp matching "type,label,property=value,property2=value" eg. [(major, minor), "zone:HOME:entry_delay=True", ...]
# PUSHBULLET_IGNORE_EVENTS = [ # Same as previous  but to ignore some specific events that matched in _ALLOW_EVENTS
#     r"zone,[\w]+,no_delay=True",
#     r"zone,[\w]+,exit_delay=.*"
# ]
#
#
### Pushover
# PUSHOVER_ENABLE = False
# PUSHOVER_KEY = ''                       # Application token for Pushover
# PUSHOVER_BROADCAST_KEYS = {             # Pushover user or group keys to broadcast notifications to
###    '<user_key>': '*'                  # value can be '*' or comma separated list of device names
# }
# PUSHOVER_MIN_EVENT_LEVEL = 'INFO'
## Event filtering by tags:
# PUSHOVER_EVENT_FILTERS = [ # list of tags to include or exclude see hardware event.py for tag list
#     'live,alarm,-restore', # or
#     'live,trouble,-clock', # or
#     'live,tamper'
# ]
## - OR - event filtering using regexp. Cannot be used together with _EVENT_FILTERS
# PUSHOVER_ALLOW_EVENTS = [r".*"] # List of tuples or regexp matching "type,label,property=value,property2=value" eg. [(major, minor), "zone:HOME:entry_delay=True", ...]
# PUSHOVER_IGNORE_EVENTS = [ # Same as previous  but to ignore some specific events that matched in _ALLOW_EVENTS
#     r"zone,[\w]+,no_delay=True",
#     r"zone,[\w]+,exit_delay=.*"
# ]
#
#
### Signal
# SIGNAL_ENABLE = False
# SIGNAL_CONTACTS = []                    # Contacts that are allowed to control the panel and receive notifications
#                                         # through Signal
# SIGNAL_MIN_EVENT_LEVEL = 'INFO'
## Event filtering by tags:
# SIGNAL_EVENT_FILTERS = [ # list of tags to include or exclude see hardware event.py for tag list
#     'live,alarm,-restore', # or
#     'live,trouble,-clock', # or
#     'live,tamper'
# ]
## - OR - event filtering using regexp. Cannot be used together with _EVENT_FILTERS
# SIGNAL_ALLOW_EVENTS = [r".*"] # List of tuples or regexp matching "type,label,property=value,property2=value" eg. [(major, minor), "zone:HOME:entry_delay=True", ...]
# SIGNAL_IGNORE_EVENTS = [ # Same as previous  but to ignore some specific events that matched in _ALLOW_EVENTS
#     r"zone,[\w]+,no_delay=True",
#     r"zone,[\w]+,exit_delay=.*"
# ]
#
#
### GSM
# GSM_ENABLE = False
# GSM_MODEM_BAUDRATE = 115200             # Baudrate of the GSM modem
# GSM_MODEM_PORT = ''                     # Pathname of the serial port
# GSM_CONTACTS = []                       # Contacts that are allowed to control the panel and receive notifications
#                                         # through SMS
# GSM_MIN_EVENT_LEVEL = 'CRITICAL'
## Event filtering by tags:
# GSM_EVENT_FILTERS = [ # list of tags to include or exclude see hardware event.py for tag list
#     'live,zone,alarm,trigger'
# ]
## - OR - event filtering using regexp. Cannot be used together with _EVENT_FILTERS
# GSM_ALLOW_EVENTS = [r".*"] # List of tuples or regexp matching "type,label,property=value,property2=value" eg. [(major, minor), "zone:HOME:entry_delay=True", ...]
# GSM_IGNORE_EVENTS = [ # Same as previous  but to ignore some specific events that matched in _ALLOW_EVENTS
#     r"zone,[\w]+,no_delay=True",
#     r"zone,[\w]+,exit_delay=.*"
# ]
#
#
### IP Socket Interface
IP_INTERFACE_ENABLE = False
IP_INTERFACE_BIND_ADDRESS = '192.168.1.8'
IP_INTERFACE_BIND_PORT = 10000
IP_INTERFACE_PASSWORD = 'same password via web interface to IP150'
#
### Dummy Interface for testing
# DUMMY_INTERFACE_ENABLE = False
# DUMMY_EVENT_FILTERS = []
# DUMMY_MIN_EVENT_LEVEL = 'DEBUG'

and then I delete those MQTT settings that I had previously on the garage zone and restarted home-assistant.

And Viola, it works!

Thanks for all your help!!

1 Like

Great news @fliptoback
Enjoy.

If you have some spare time feel free to improve our wiki contents to cover what was missing for you to make newcomers live easier.

I will certainly do! Thanks for making this great addon for home assistant. I really appreciated your effort.

Awesome, and I didn’t even need to answer :slight_smile:
It is an awesome piece of software

Thanks Roland. Yes the software is great. The config/setup can be difficult though :slight_smile:

Hi Roland, Jevgeni,

I am now trying to setup mqtt-dash on my android phone. This is how I have done it. I installed the app, edit the settings as follows:

name = paradox alarm
address = 192.168.1.111
port = 1883
user name = home-assistant
user password = redacted
Client ID = home-assistant

And then I press the save button, press the “paradox alarm” that i have just created and and click the button with a forward/reverse arrow and then enter metrics/exchange/pai and then hit
“subscribe and wait for metrics”.

A popup will say subscribe is done and now waiting for messages. But upon me pressing the close button, it says “unsubscribed from metrics/exchange/pai”.

and mqtt dash is not showing the interface at all.

So I guess my settings above is incorrect but I have tried a bunch of different values all to the same results.

So questions please:

  1. I am guessing the “user name” field is the same username as MQTT_USERNAME in the pai.conf?
  2. I am guessing the “user password” is the same password as MQTT_PASSWORD in pai.conf?
  3. I am guessing the Client ID is the same as “client_id” in MQTT broker setting of configuration.yaml of home-assistant?

How should I rectify the above please?

Thanks in advance

I don’t use mqtt-dash as I am on iPhone and use the official Home Assistant app. Sorry.

Client ids must be unique for every device.
PAI <---> MQTT Broker <---> MQTT Dash

Both pai and MQTT Dash are clients to MQTT broker. They can have different credentials, but must not share same client ids. If you won’t specify client ids they should be auto generated.

I can not help you debug MQTT Dash because I never used it.

No worries Roland. Thanks for replying.

Thanks Jevgeni. I have now tried a different Client ID on MQTT dash but it is still not working.

I am only using MQTT dash as this is mentioned in the wiki so i thought this is the supported MQTT app on the phone.

What MQTT app do you use on the Android that works?

Just set this up, few teething problems but nothing I didn’t find either in this thread or the wiki. Great thanks.

One question, is it possible to increase the number of users that can access the panel, at the moment I need to stop the Pai add-on to use either babyware or web access. I’m on an evo192 with an ip150.

Hi Roland

I am trying a similar thing: did you ever resolve this issue you were having?

Thanks!

Pretty much yes, it was the way I had set up the MQTT switch in my config.

  - platform: mqtt
    name: "Front Beam Bypass"
    command_topic: "paradox/control/zones/FRONT_BEAM"
    state_topic: "paradox/states/zones/FRONT_BEAM/bypassed"
    qos: 0
    optimistic: true
    state_on: "True"
    state_off: "False"    
    payload_on: "bypass"
    payload_off: "clear_bypass"
    payload_available: "Online"
    payload_not_available: "Offline"

This is what I am using currently.

2 Likes

Hello,

Am I the only one to not be able to start PAI Addon since Supervisor 249 upgrade (I think) ?

I got the following error when starting :frowning:

Attempting to load configuration from /data/options.json
Traceback (most recent call last):
File “/usr/local/bin/pai-service”, line 8, in
sys.exit(main())
File “/usr/local/lib/python3.7/site-packages/paradox/console_scripts/pai_run.py”, line 36, in main
main(args)
File “/usr/local/lib/python3.7/site-packages/paradox/main.py”, line 118, in main
cfg.load()
File “/usr/local/lib/python3.7/site-packages/paradox/config.py”, line 314, in load
with open(self.CONFIG_FILE_LOCATION) as f:
PermissionError: [Errno 13] Permission denied: ‘/data/options.json’

It has been working flawlessly for weeks. :frowning:

I tried to reinstall PAI twice : same problem :confused: Also tried the beta version, same issue.
I don’t understand… I’ve tried everything : restore from 3 different HA snapshots, and then restore the 3 last backups from the past 3 days of the virtual machine hosting Home Assistant : still the same !
I’m 100% positive that PAI was working fine yesterday.
The alarm is OK, I’ve restarted it and I can connect fine from babyWare.
I’ve tested a few times to deinstall and reinstall PAI, use the default configuration without any change, start the addon and same error.

Any idea ? :frowning:

Couple issues were created regarding that.

1 Like

PAI version 2.2.3 solved the issue !
Thx

Well done :slight_smile:

1 Like

Recently the number of entities created by the PAI add-on went over 500 for me. I see there is a “limits” configuration option and there is even some documentation on how to do it in the pai.conf file.

Example:

LIMITS = {
    'zone': list(range(1, 18)) + list(range(30,33)) + [40],     # Zones to monitor and control (1-17,30-32,40)
    'user': range(1, 7),     # Users to consider (1-6)
    'door': [],               # Doors to consider (none)
    'pgm': range(1, 6),    # Outputs to monitor and control (1-5)
    'partition': [1,2,4,7,8], # Partitions to monitor and control (1,2,4,7,8)
    'bus-module': [],         # Buses to monitor (none)
    'key-switch': [] (none)
}

I’m using the config interface from the add-on (configuration tab) that offers settings in this format:

LOGGING_FILE: null
LOGGING_LEVEL_CONSOLE: 20
LOGGING_LEVEL_FILE: 40
LOGGING_DUMP_PACKETS: false
LOGGING_DUMP_MESSAGES: false
LOGGING_DUMP_STATUS: false
LOGGING_DUMP_EVENTS: false
CONNECTION_TYPE: IP #set this to "IP" if using IP
SERIAL_PORT: /dev/ttyUSB0
SERIAL_BAUD: 9600
IP_CONNECTION_HOST: 192.168.X.X #set this to your IP150 IP address if using IP
IP_CONNECTION_PORT: 10000
IP_CONNECTION_PASSWORD: paradox
IP_CONNECTION_SITEID: null
IP_CONNECTION_EMAIL: null
IP_CONNECTION_PANEL_SERIAL: null
IP_CONNECTION_BARE: false
LIMITS: {}
SYNC_TIME: true
PASSWORD: '0000'
MQTT_ENABLE: true
MQTT_HOST: core-mosquitto
MQTT_PORT: 1883
MQTT_USERNAME: pai
MQTT_PASSWORD: #password 
MQTT_RETAIN: true
MQTT_BIND_ADDRESS: 127.0.0.1
MQTT_BIND_PORT: 0
MQTT_HOMEASSISTANT_AUTODISCOVERY_ENABLE: true

Can anyone suggest how to set the limits in this format?

My configuration for instance :

LIMITS:
  user:
    - 1
    - 2
    - 3
    - 4
    - 5
    - 6
  pgm:
    - 1
  door:
    - null
  module:
    - null
  repeater:
    - null
  partition:
    - 1
    - 2
    - 3

Thanks, this worked as expected.