Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aio_powerrise_api-0.1.0.dev3.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aio_powerrise_api-0.1.0.dev3-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file aio_powerrise_api-0.1.0.dev3.tar.gz.

File metadata

  • Download URL: aio_powerrise_api-0.1.0.dev3.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for aio_powerrise_api-0.1.0.dev3.tar.gz
Algorithm Hash digest
SHA256 2ba797c13e2106e9b963af64e2b6e11fb44ec3a2af7676bef07ed768926b1453
MD5 3bfbca73993998864c97d68f673b5ffb
BLAKE2b-256 b55552939f5b30fa6af4eeeb93ba3359307bec3a5fc017203e8c4d8c82a08435

See more details on using hashes here.

File details

Details for the file aio_powerrise_api-0.1.0.dev3-py3-none-any.whl.

File metadata

File hashes

Hashes for aio_powerrise_api-0.1.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6081be81e3ce9fcfdc22ddcaf452e4ae28462cdba102cd380095cc2387cf3e2
MD5 8eac3d352fa9f187b30a6527c81984cd
BLAKE2b-256 2511cc6818ac9060d9680d8eae759a5ea51a1a4486ee64b73f96d2dcf0bdac93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page