Async library for controlling the Apart Zone4 preamp via serial
Project description
Zone4
Zone4 is a Python library for interacting with the Apart Zone4 pre-amplifier over serial.
Installation
Use the package manager pip to install zone4.
pip install zone4
Usage
import asyncio
from zone4 import Zone4Manager
async def set_volume(manager, zone, volume):
await manager.zone(zone).set_volume(volume)
async def update(manager, loop):
await manager.update()
loop.create_task(update(manager, loop))
if __name__ == '__main__':
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
manager = Zone4Manager('/dev/ttyS3')
loop.run_until_complete(manager.setup())
loop.create_task(set_volume(manager, 'a', 55))
loop.create_task(update(manager, loop))
loop.run_forever()
loop.close()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zone4-0.0.1.tar.gz.
File metadata
- Download URL: zone4-0.0.1.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e452d8697579a9bb2b07db6449bd92a2e3e9d6e228f4072f594b8e9bd7284a2
|
|
| MD5 |
51b3afc27d33e6c66a00ae0c7fb02cc7
|
|
| BLAKE2b-256 |
d897e0cbedecaabd510a309a80181ecdd618faf1cffabbea786070198557bc9f
|
File details
Details for the file zone4-0.0.1-py3-none-any.whl.
File metadata
- Download URL: zone4-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33946028b991cb3ed8b171d550eb44f2ff10c777318fc664af600c9cd1930a80
|
|
| MD5 |
33ed0a12df111d5724757a1f62f22467
|
|
| BLAKE2b-256 |
ede51ee5f60aaa4ca37096079016295d897294b3b2f85df8b1b5626904918fd0
|