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.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c447cfd5597627a71ba7e7420ba0d4828dd8878a336f832b354e4ef4cb2a1fba |
|
MD5 | e4b7777a430a16c4f215134b4186259c |
|
BLAKE2b-256 | 5e118ee6d56e24a2eeeaf0ed234aff52fbc8ecae1a2d5675a496e31931274b3c |
Close
Hashes for savantaudio_client-0.1.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0814dca9b7bcc8ab9c225d56ed11cda2248167d8a601b372cf0a2bc8ff85e05a |
|
MD5 | 4775a9d6bc7a31d33e86abb6cd54700d |
|
BLAKE2b-256 | 450f6a1f0fae3a4c9de17dd978323fcbdba3d437061beec3565f07858d485e84 |