Async Python API for Hunter Douglas PowerRise shade systems using the Platinum Hub
Project description
aio-powerrise-api
Async Python API for Hunter Douglas PowerRise® shade systems.
This library communicates with a PowerRise® Platinum bridge (PlatLink-PDBU) over a plain-text TCP protocol on port 522 and exposes an API that is intentionally similar to aio-powerview-api so that it can be integrated into Home Assistant with minimal effort.
Quick Start
import asyncio
from aiopowerrise import Hub
async def main():
hub = Hub("192.168.1.100")
await hub.connect()
# Get all data
house = await hub.get_data()
# List shades
for shade_id, shade in house.shades.items():
print(f"Shade {shade_id}: {shade.name} position={shade.position}")
# Move a shade (0-100%)
await hub.shades.move(shade_id=1, position=50)
# Activate a scene
await hub.scenes.activate(scene_id=0)
await hub.close()
asyncio.run(main())
CLI
A command-line tool is included for testing and debugging:
# Discover hubs on the network
powerrise-cli discover
# Get all data from hub
powerrise-cli --host 192.168.1.100 get-data
# List shades
powerrise-cli --host 192.168.1.100 shades
# Move a shade
powerrise-cli --host 192.168.1.100 move-shade --id 1 --position 50
# Activate a scene
powerrise-cli --host 192.168.1.100 activate-scene --id 0
# List scenes
powerrise-cli --host 192.168.1.100 scenes
# List rooms
powerrise-cli --host 192.168.1.100 rooms
Architecture
The library follows the same pattern as aio-powerview-api:
- Hub – Top-level entry point; manages connection to the bridge
- Shades – Collection manager for shade resources
- Scenes – Collection manager for scene resources
- Rooms – Collection manager for room resources
- BaseShade – Individual shade resource with move/open/close/stop
- Scene – Individual scene resource with activate
- Room – Individual room resource
Protocol
The PowerRise® Platinum bridge speaks a simple line-based text protocol on TCP
port 522. Commands start with $ and fields are separated by -.
| Command | Description |
|---|---|
$dat |
Retrieve all data (rooms, shades, scenes, positions, etc.) |
$dmy |
Keep-alive / dummy ping |
$pss{shade}-{feature}-{level}- |
Set shade position (level 0-255) |
$rls |
Release shade (after position command) |
$inm{scene}- |
Invoke / activate a scene |
$mrp{scene}-{room}-{cmd}-{level}-0- |
Position scene+room |
$sml{scene}-{shade}-{linked}- |
Set scene link |
Data Parsing
After sending $dat, the hub streams lines prefixed with $ identifiers:
| Prefix | Content |
|---|---|
$cr |
Room definition |
$cs |
Shade definition |
$cm |
Scene definition |
$cp |
Shade position |
$cq |
Scene-shade link |
$cx |
Scene-room position |
$ct |
House title |
$ca |
Timed event |
$firm |
Firmware version |
$LEDl |
LED brightness |
$upd01- |
End of data marker |
Development
pip install -e ".[dev]"
pytest
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 aio_powerrise_api-0.1.0.dev2.tar.gz.
File metadata
- Download URL: aio_powerrise_api-0.1.0.dev2.tar.gz
- Upload date:
- Size: 45.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa072c99ea23178240e82b6864137410e29de7c09465fdac1a84279ac2833bd4
|
|
| MD5 |
e32f2a79787715876ccffae966492c13
|
|
| BLAKE2b-256 |
1cc862bfcbab703978be32dd39c8b9771e1fe1ece38fce92c36d0807ddb13084
|
File details
Details for the file aio_powerrise_api-0.1.0.dev2-py3-none-any.whl.
File metadata
- Download URL: aio_powerrise_api-0.1.0.dev2-py3-none-any.whl
- Upload date:
- Size: 35.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36d90be6df8a8dc15a700cc0e66ec57e54f765c9ce5480f523d335e1182553ab
|
|
| MD5 |
600a0e2812e35fecb17b22e9649966f2
|
|
| BLAKE2b-256 |
38abda9fc2a37583e00a7fe077cb817353122cddcc233f3a61b3ffdc73b4e7bd
|