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.5.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

trinnov_altitude-0.1.5-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trinnov-altitude-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8d3386ad7d76e97d9b3299ab41a07f69ee357705311ffe9824382686171e8995
MD5 024fe095fd1e91ee313a293f276c3be4
BLAKE2b-256 30ac3260df75cfab4c349023cec4e9ce58f0bbc881928be9ff50806541a6b446

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for trinnov_altitude-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3d08d90912d5c58d37039eac85e33a0758f4a52e327d0e2e9e536de5760226
MD5 91941074b3f3fc5d278c9cc9bff20e7a
BLAKE2b-256 b84ba4cf5c4240446e99a47c25779e5f87215ed3e33037169107a7aff4eea620

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