A client library to interact with Savant Audio Switches (e.g. SSA-3220).
Project description
Savant Audio Switch Client
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for savantaudio-client-0.1.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04a7886d2240047a5ba37f7a96107e7a22d4c3c7e72fa3a66ffcde36376b2653 |
|
MD5 | ae70d775c541e481c0f452c8801b6342 |
|
BLAKE2b-256 | 9d8de35f9bceb12b5f79af13bf1dd83ec2d472e3a06d3b5bcd6342296ebb831f |
Close
Hashes for savantaudio_client-0.1.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfd5b412d47940cada49397deadbe5c6980148b45b0e384b4f67de1a4918631a |
|
MD5 | 7fca0b6c2de6b6cdcfd0f25235981d25 |
|
BLAKE2b-256 | 0c299793f6a6ee488d1c9a1b9b698e7bafc4f01ab9c517f9c2bb638003e32ebe |