Skip to main content

Requirements

  • Python 3.8–3.14 — all minor versions are tested and supported
  • pip — Python package installer
PAI has been tested on Ubuntu Server 16.04+, Raspberry Pi 3, NanoPi NEO, and OrangePi 2G-IOT. It runs on any Linux system with a supported Python version.

Installation methods

Install the latest stable release from PyPI:
pip install paradox-alarm-interface
This installs the pai-service command and all core dependencies: construct, paho-mqtt, pyserial-asyncio, python-slugify, pytz, and requests.
On systems where python3 is the default, use pip3 instead of pip.

Configuration file locations

At startup, PAI searches for a configuration file in the following locations, in order:
PathNotes
./pai.confCurrent working directory
~/.local/etc/pai.confUser-level config
/etc/pai/pai.confSystem-wide config (recommended for services)
/usr/local/etc/pai/pai.confAlternative system-wide location
PAI also accepts JSON and YAML variants at the same paths:
  • pai.json
  • pai.yaml (requires the YAML extra)
To override the search entirely, set the PAI_CONFIG_FILE environment variable:
export PAI_CONFIG_FILE=/opt/pai/my-config.conf
pai-service
You can also pass the path directly with the --config flag:
pai-service --config /opt/pai/my-config.conf

Running as a systemd service

To run PAI automatically on boot and keep it running if it crashes, create a systemd unit file:
/etc/systemd/system/pai.service
[Unit]
Description=PAI - Paradox Alarm Interface
After=network.target

[Service]
Type=simple
User=pai
ExecStart=/usr/local/bin/pai-service
Restart=on-failure
RestartSec=5
Environment=PAI_CONFIG_FILE=/etc/pai/pai.conf

[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable pai
sudo systemctl start pai
Check the service status and logs:
sudo systemctl status pai
sudo journalctl -u pai -f
Create a dedicated system user for PAI (sudo useradd -r -s /bin/false pai) and add it to the dialout group if using a serial connection (sudo usermod -aG dialout pai).

Build docs developers (and LLMs) love