Python API for controlling Anthem Receivers
Project description
This is a Python package to interface with Onkyo receivers.
This package was created primarily to replace onkyo-eiscp <https://github.com/miracle2k/onkyo-eiscp/> which is used in the media_player platform for the Home Assistant automation platform but it is structured to be general-purpose and should be usable for other applications as well.
The structure of this code is _very_ heavily inspired by the Python Anthem library <https://github.com/nugget/python-anthemav/> and the protocol used is copied directly from the onkyo-eiscp library. Go check there to see how it works.
In this library, you send requests as per the onkyo-eiscp spec (volume=55) and then … nothing. All requests are fire and forget. To understand what’s happening with the reciever, you’ll need to provide a callback_function that gets called whenever something changes on the reciever.
Your callback function will recieve a tuple consisting of 3 values (a triple?): zone: [main, zone1, zone2, zone3, zone4, dock] name: (volume, power, etc..) value: (volume_up, 55, tv)
I essentially mashed the two projects together and it seems to work so 🤷♂️…
Requirements
Python 3.4 or newer with asyncio
An Onkyo reciever
Installation
You can, of course, just install the most recent release of this package using pip. This will download the more rececnt version from PyPI and install it to your host.
pip install pyeiscp
If you want to grab the the development code, you can also clone this git repository and install from local sources:
cd py-eiscp pip install .
And, as you probably expect, you can live the developer’s life by working with the live repo and edit to your heart’s content:
cd py-eiscp pip install . -e
Testing
The package installs a command-line tool which will connect to your receiver, power it up, and then monitor all activity and changes that take place. The code for this console monitor is in pyeiscp/tools.py and you can invoke it by simply running this at the command line with the appropriate IP and port number that matches your receiver and its configured port:
eiscp_monitor --host 10.0.0.100 --port 60128
Credits
Most of this package was written by David McNett.
Pretty much everything else was written by @miracle2k
I just mushed it all together.
How can you help?
First and foremost, you can help by forking this project and coding. Features, bug fixes, documentation, and sample code will all add tremendously to the quality of this project.
If you have a feature you’d love to see added to the project but you don’t think that you’re able to do the work, I’m someone is probably happy to perform the directed development in the form of a bug or feature bounty.
If you’re anxious for a feature but it’s not actually worth money to you, please open an issue here on Github describing the problem or limitation. If you never ask, it’ll never happen
If you just want to thank me for the work I’ve already done, I’m happy to accept your thanks, gratitude, pizza, or bitcoin. My bitcoin wallet address can be on Keybase or you can send me a donation via PayPal.
Or, if you’re not comfortable sending me money directly, I’ll be nearly as thrilled (really) if you donate to the ACLU, EFF, or EPIC and let me know that you did.
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
Built Distribution
File details
Details for the file pyeiscp-0.0.7.tar.gz
.
File metadata
- Download URL: pyeiscp-0.0.7.tar.gz
- Upload date:
- Size: 44.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7f0aa5f3861e30172b17ac1bbdd6462125b14c9caec3cd1bca090155fe95ef2 |
|
MD5 | ed39f78be0bc203f44aa7763086ea16d |
|
BLAKE2b-256 | a07bea3c307460514a594785786ab447ea9a82da30047821d3fcbc10ed0e715a |
File details
Details for the file pyeiscp-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: pyeiscp-0.0.7-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9548c65f34f2753e3284ecbfdd640d6b3329fead5158815dd2506fb9c620aa32 |
|
MD5 | 044ce6374adc2c8ab5d1c3b6deaac803 |
|
BLAKE2b-256 | d591f8a6ded64b2b4343972860943dbaacc99b3c2a77a49bf098d02e741121f2 |