Skip to main content

A client library to interact with Savant Audio Switches (e.g. SSA-3220).

Project description

Savant Audio Switch Client

image

The savantaudio-client package allows users to download the contents of this GiHub repository, containing a client library to control Savant Audio Switches such as the SSA-3220/SSA-3220D.

Installing

Install and update using pip:

pip3 install savantaudio-client

Or you can clone this repo using:

    git clone https://github.com/akropp/savantaudio-client.git

Usage

The client is based on asyncio, so all calls must be made in the context of an event loop. A basic example which connects to a switch device and fetches all of the inputs/outputs is as follows:

import logging
import asyncio
import savantaudio.client

logging.basicConfig(handlers=[logging.StreamHandler()], encoding='utf-8', level=logging.INFO)
savantaudio.client._LOGGER.setLevel(logging.DEBUG)
switch = savantaudio.client.Switch(host='192.168.1.216', port=8085)

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(switch.refresh())
print(str(switch))
loop.run_until_complete(switch.link(11, 8))
loop.run_until_complete(switch.output(11).set_volume(-20))
print(str(switch.output(11)))
loop.run_until_complete(switch.unlink(11))
print(str(switch.output(11)))

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

savantaudio-client-1.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

savantaudio_client-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file savantaudio-client-1.0.0.tar.gz.

File metadata

  • Download URL: savantaudio-client-1.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for savantaudio-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3c0f4465b88fdfbae85ddefe2b98c38aaaa844ac70d6c4c401fb288a236bf477
MD5 a0a43795302248e18451bb7601414f8e
BLAKE2b-256 51874b828228c5f72072d620a617595dcceebf74767c580788e2cf4edad8924f

See more details on using hashes here.

File details

Details for the file savantaudio_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for savantaudio_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71730a622658ed995666898a06d91c2a931c9b0ac3786070583b6df8c6bb54a6
MD5 8abfa123a40b05be21f671248fc72939
BLAKE2b-256 270660279ff32c43c3ce621d29ec4e21c6908e5d32504ab4774bb203f40f5158

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