Skip to main content

Async Python client for Stewart Filmscreen CVM control protocol.

Project description

Stewart Filmscreen Python Library

Async Stewart Filmscreen CVM client for long-running integrations (Home Assistant primary target).

Status

This is a clean implementation focused on reliability, explicit typing, and deterministic parsing.

Protocol reference used:

Design boundary:

  • This library owns protocol parsing, transport behavior, reconnect behavior, and safe command pacing.
  • Integrations built on top of it should focus on product-specific entity mapping and UX, not duplicate queueing or protocol safety rules.

Installation

pip install stewart-filmscreen

Quick Start

import asyncio

from stewart_filmscreen.client import StewartFilmscreenClient


async def main() -> None:
    client = StewartFilmscreenClient(
        host="192.168.1.50",
        username="your_username",
        password="your_password",
    )

    try:
        await client.start()
        await client.wait_authenticated(timeout=10)

        await client.move_down("1.1.1.MOTOR")
        await client.stop("1.1.1.MOTOR")
        await client.recall_preset(3)
    finally:
        await client.stop_client()


asyncio.run(main())

By default, commands are paced with a conservative 1.0s inter-command delay because some CVM controllers become unreliable when requests are sent too rapidly. Override command_throttle_seconds only if you have verified your controller tolerates a lower value.

Preset commands are validated against the documented CVM slot range of 1-32.

Development

uv sync --group dev
uv run ruff check .
uv run ruff format --check .
uv run ty check stewart_filmscreen
uv run pytest -v

Real Device Integration Tests (Read-Only)

The test suite includes a manual, read-only integration tier for validating behavior against a real CVM.

  • Marker: integration_real
  • Opt-in gate: STEWART_ITEST=1
  • Target host: STEWART_HOST=<ip-or-hostname>
  • Optional port override: STEWART_PORT=23
  • Credentials: STEWART_USERNAME, STEWART_PASSWORD
  • Optional metadata: STEWART_MAC
  • If the device is offline/unreachable, tests are skipped.

Set up local env:

cp .env.example .env

Run the real-device tests:

set -a && source .env && set +a && uv run pytest -v -m integration_real

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

stewart_filmscreen-0.1.2.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

stewart_filmscreen-0.1.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file stewart_filmscreen-0.1.2.tar.gz.

File metadata

  • Download URL: stewart_filmscreen-0.1.2.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stewart_filmscreen-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1997ea6c48f673f0aa834c1b59257ff4a03b0c53b0218eed2a960e3cd5ea2228
MD5 debecddac9f0961d35ad536d61d93cd0
BLAKE2b-256 4da951c2a56d7464dbcfaacbf7ccd345a391c47ea0ebd1f9eab652719f79c933

See more details on using hashes here.

Provenance

The following attestation bundles were made for stewart_filmscreen-0.1.2.tar.gz:

Publisher: publish.yml on binarylogic/py-stewart-filmscreen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stewart_filmscreen-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stewart_filmscreen-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 918c4863eeebd6bc5bf14111cdd2035b78a2d2dccc82b3f0f298f0a87af4d5d4
MD5 cd96bdb7a830c0a73daef0746d2827bc
BLAKE2b-256 28f42b67d790458d109c1b78796e0ca5e4174fd839cd08fb6a6515a733d6bbeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for stewart_filmscreen-0.1.2-py3-none-any.whl:

Publisher: publish.yml on binarylogic/py-stewart-filmscreen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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