Skip to main content

"Python client for interfacing with the Trinnov Altitude processor."

Project description

Trinnov Altitude Python Library

A Python library for interacting with the Trinnov Altitude processor via the TCP/IP automation protocol provided by the Trinnov Altitude.

Overview

The Trinnov Altitude processor is an audio/video processor that exposes an automation protocol over TCP/IP for remote control.

The interface is a two-way communication protocol. At any time the processor can broadcast messages to all connected clients reflecting the current processor state. For example, the user could turn the volume knob on the processor itself, which would broadcase volume change messages to all connected clients.

Therefore, it's important to architect usage of this library to handle state changes asynchronously. You should not be polling the processor for state changes. Instead, you should register a callback that fires when changes are received.

Installation

pip install trinnov-altitude

Setup

Connect

from trinnov_altitude.trinnov_altitude import TrinnovAltitude

# Instantiate the Trinnov Altitude client. Adjust the `host` and `client_id`
# accordingly.
altitude = TrinnovAltitude(host = "192.168.1.90", client_id = "my_altitude_integration")

# Connect to the Trinnov Altitude processor
await altitude.connect()

# Disconnect
await altitude.disconnect()

Subscribe to updates

from trinnov_altitude.trinnov_altitude import TrinnovAltitude

altitude = TrinnovAltitude(host = "192.168.1.90", client_id = "my_altitude_integration")

# Define your callback
def callback(message):
    # react to the change here
    pass

# Register the callback. It will be called each time a message is received
# from the processor.
altitude.register_callback(callback)

await altitude.connect()

Commands

All commands assume you have setup your Trinnov Altitude client.

Change the volume

# Get the current volume level
altitude.volume

# Change the processor's volume
await altitude.set_volume(-45)

# See the new volume level. Once sent, the processor
altitude.volume

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

trinnov-altitude-0.1.4.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

trinnov_altitude-0.1.4-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file trinnov-altitude-0.1.4.tar.gz.

File metadata

  • Download URL: trinnov-altitude-0.1.4.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for trinnov-altitude-0.1.4.tar.gz
Algorithm Hash digest
SHA256 da81405884e6dd3966875c4dd49bc4f5a3f70f03821d62fcd38429a70c1774be
MD5 14ca7526a17bfea0bc4ba9c531598ed0
BLAKE2b-256 27fd64e12bac662566f7bbd3dbd3f3bf9faff784a3195e85763dd7252c9bc220

See more details on using hashes here.

File details

Details for the file trinnov_altitude-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for trinnov_altitude-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 10cf176b2460a21efb9f66cfb45fb7aacb50c6301d4c876bb55df9eb0c3719da
MD5 2fadfd6b0150e14ad57cf353a2077494
BLAKE2b-256 cc47b69c0f8d59c0858977918c8f0b7fb01f16dcfddf5ffed9279b6a0cd0e26f

See more details on using hashes here.

Supported by

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