LIMITS configuration option lets you restrict monitoring to specific subsets, which is useful for improving performance, reducing noise, and limiting exposure of resources you do not need to manage.
Why use limits
- Performance: Fetching labels and status for every resource takes time at startup and during refreshes. Restricting to only the resources in use reduces this overhead significantly.
- Reduce noise: Unused zones or keypads often generate spurious events. Excluding them keeps your event stream and MQTT topics clean.
- Privacy: Limiting users or partitions prevents information about unused parts of the system from being published to interfaces like MQTT.
The LIMITS option
LIMITS is a dictionary where each key is a resource type and each value specifies which IDs to include. An empty dictionary (the default) means no restrictions — all resources are monitored.
Supported resource types
| Key | Description |
|---|---|
zone | Zones to monitor and control |
user | Users to consider |
door | Doors to consider |
pgm | PGM outputs to monitor and control |
partition | Partitions to monitor and control |
module | Bus modules to monitor |
repeater | Repeaters to monitor |
keypad | Keypads to monitor |
Value types
Each resource type accepts one of these value types:range— A Python range, e.g.range(1, 17)covers IDs 1 through 16.list— An explicit list of IDs, e.g.[1, 2, 3, 4].'auto'— PAI detects which resources are actually present on the panel and monitors only those.
When a resource type is omitted from
LIMITS, all IDs for that type are monitored. You only need to specify the types you want to restrict.Configuration examples
JSON and YAML do not support Python
range() expressions. You must enumerate all IDs as a list. For large ranges, the Python .conf format is more concise.Using auto detection
Setting a resource type’s value to'auto' instructs PAI to query the panel at startup and monitor only the resources it finds are actually enrolled.
pai.conf
Disabling limits
To monitor all resources with no restrictions, setLIMITS to an empty dictionary or omit it entirely.
pai.conf