Python library for Pentair IntelliCenter pool control systems
Reason this release was yanked:
Pre-release, use v0.1.0 or later
Project description
pyintellicenter
Python library for communicating with Pentair IntelliCenter pool control systems over local network.
⚠️ Alpha Release: This library is in early development. API may change between versions.
Features
- Local Communication: Direct TCP connection to IntelliCenter (no cloud required)
- Real-time Updates: Push-based notifications via NotifyList protocol
- Async/Await: Built on Python asyncio for efficient I/O
- Type Annotations: Full type hints for IDE support and static analysis
- Robust Connection Handling: Automatic reconnection with exponential backoff
- Resilient: Circuit breaker pattern, connection metrics, comprehensive error handling
Installation
pip install pyintellicenter
Or install from GitHub:
pip install git+https://github.com/joyfulhouse/pyintellicenter.git
Requirements
- Python 3.11+
- Pentair IntelliCenter controller (i5P, i7P, i9P, or i10P)
- Local network access to IntelliCenter (TCP port 6681)
Quick Start
import asyncio
from pyintellicenter import ModelController, PoolModel, ConnectionHandler
async def main():
# Create a model to hold equipment state
model = PoolModel()
# Create controller connected to your IntelliCenter
controller = ModelController("192.168.1.100", model)
# Use ConnectionHandler for automatic reconnection
handler = ConnectionHandler(controller)
await handler.start()
# Access system information
print(f"Connected to: {controller.systemInfo.propName}")
print(f"Software version: {controller.systemInfo.swVersion}")
# List all equipment
for obj in model:
print(f"{obj.sname} ({obj.objtype}): {obj.status}")
# Control equipment
pool = model.getByType("BODY", "POOL")[0]
controller.requestChanges(pool.objnam, {"STATUS": "ON"})
asyncio.run(main())
Architecture
The library is organized in layers:
Protocol Layer (protocol.py)
ICProtocol: Low-level asyncio protocol handling TCP communication- JSON message framing (messages terminated with
\r\n) - Flow control (one request at a time)
- Keepalive queries for connection health
Controller Layer (controller.py)
BaseController: Basic connection and command handlingModelController: State management with PoolModelConnectionHandler: Automatic reconnection with exponential backoffSystemInfo: System metadata (version, units, unique ID)ConnectionMetrics: Request/response statistics
Model Layer (model.py)
PoolModel: Collection of pool equipment objectsPoolObject: Individual equipment item (pump, light, heater, etc.)
Attributes (attributes.py)
- Type and attribute constants for all equipment types
BODY_TYPE,PUMP_TYPE,CIRCUIT_TYPE, etc.STATUS_ATTR,SNAME_ATTR,OBJTYP_ATTR, etc.
API Reference
ModelController
controller = ModelController(
host="192.168.1.100", # IntelliCenter IP address
model=PoolModel(), # Model to populate
port=6681, # TCP port (default: 6681)
keepalive_interval=90, # Keepalive query interval in seconds
)
# Start connection and populate model
await controller.start()
# Send changes to equipment
controller.requestChanges(objnam, {"STATUS": "ON"})
# Access system info
info = controller.systemInfo
print(info.propName, info.swVersion, info.usesMetric)
ConnectionHandler
handler = ConnectionHandler(
controller,
timeBetweenReconnects=30, # Initial reconnect delay (seconds)
disconnectDebounceTime=15, # Grace period before marking disconnected
)
# Start with automatic reconnection
await handler.start()
# Stop and cleanup
handler.stop()
PoolModel
model = PoolModel()
# Iterate all objects
for obj in model:
print(obj.sname)
# Get by type
bodies = model.getByType("BODY")
pool = model.getByType("BODY", "POOL")[0]
pumps = model.getByType("PUMP")
# Get by object name
obj = model["POOL1"]
# Get children of an object
children = model.getChildren(panel)
PoolObject
obj = model["PUMP1"]
# Properties
obj.objnam # Object name (e.g., "PUMP1")
obj.sname # Friendly name (e.g., "Pool Pump")
obj.objtype # Object type (e.g., "PUMP")
obj.subtype # Subtype (e.g., "VSF")
obj.status # Current status
# Check type
obj.isALight # Is this a light?
obj.isALightShow # Is this a light show?
obj.isFeatured # Is this featured?
obj.supportColorEffects # Supports color effects?
# Access attributes
rpm = obj["RPM"]
power = obj["PWR"]
Equipment Types
| Type | Description | Common Subtypes |
|---|---|---|
BODY |
Body of water | POOL, SPA |
PUMP |
Pump | SPEED, FLOW, VSF |
CIRCUIT |
Circuit/Feature | LIGHT, INTELLI, GLOW, DIMMER |
HEATER |
Heater | GENERIC, SOLAR, ULTRA |
CHEM |
Chemistry | ICHLOR, ICHEM |
SENSE |
Sensor | POOL, AIR, SOLAR |
SCHED |
Schedule | - |
Connection Behavior
The library implements robust connection handling:
- Initial Connection: Connects and fetches system info + all equipment
- Keepalive: Sends lightweight queries every 90 seconds (configurable)
- Push Updates: Receives real-time NotifyList updates from IntelliCenter
- Reconnection: Exponential backoff starting at 30 seconds (configurable)
- Circuit Breaker: Pauses after 5 consecutive failures
Development
# Clone repository
git clone https://github.com/joyfulhouse/pyintellicenter.git
cd pyintellicenter
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check src tests
ruff format src tests
# Run type checking
mypy src
License
MIT License - see LICENSE for details.
Related Projects
- intellicenter - Home Assistant integration using this library
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyintellicenter-0.0.2.tar.gz.
File metadata
- Download URL: pyintellicenter-0.0.2.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f64cd683edab51a5068b7d2053c4453a50ce4628db8a237c1b0ab342cf19b27d
|
|
| MD5 |
1b2fecae6545b8aa25e19b30383b7ce6
|
|
| BLAKE2b-256 |
b1012b78198c7f6b9dd28ecdd70272ceb4d2c18de558fcc11fedaf1afcc88f14
|
Provenance
The following attestation bundles were made for pyintellicenter-0.0.2.tar.gz:
Publisher:
publish.yml on joyfulhouse/pyintellicenter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyintellicenter-0.0.2.tar.gz -
Subject digest:
f64cd683edab51a5068b7d2053c4453a50ce4628db8a237c1b0ab342cf19b27d - Sigstore transparency entry: 727919996
- Sigstore integration time:
-
Permalink:
joyfulhouse/pyintellicenter@6b2ac09a2a71605a5222fca2a91c6344088f2f1e -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/joyfulhouse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b2ac09a2a71605a5222fca2a91c6344088f2f1e -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyintellicenter-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pyintellicenter-0.0.2-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5662aa0ce51da36c78252e15e2b8bf90661606ad736af0f2fe5e1941696b1e2
|
|
| MD5 |
90c973dd1fa8685d201bad0736d4a0e3
|
|
| BLAKE2b-256 |
e735c85686485201f14f453a02e35db0aefa13eced7d008f44c5ae8291f45bc2
|
Provenance
The following attestation bundles were made for pyintellicenter-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on joyfulhouse/pyintellicenter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyintellicenter-0.0.2-py3-none-any.whl -
Subject digest:
b5662aa0ce51da36c78252e15e2b8bf90661606ad736af0f2fe5e1941696b1e2 - Sigstore transparency entry: 727919998
- Sigstore integration time:
-
Permalink:
joyfulhouse/pyintellicenter@6b2ac09a2a71605a5222fca2a91c6344088f2f1e -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/joyfulhouse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6b2ac09a2a71605a5222fca2a91c6344088f2f1e -
Trigger Event:
release
-
Statement type: