Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/troykelly/python-denon-avr-serial-over-ip
Control a serial Denon AVR interface over IP
https://github.com/troykelly/python-denon-avr-serial-over-ip
denon denon-avr-serial hacktoberfest
Last synced: about 2 months ago
JSON representation
Control a serial Denon AVR interface over IP
- Host: GitHub
- URL: https://github.com/troykelly/python-denon-avr-serial-over-ip
- Owner: troykelly
- License: cc0-1.0
- Created: 2020-10-14T02:53:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-13T03:42:41.000Z (over 3 years ago)
- Last Synced: 2024-10-01T09:25:36.306Z (3 months ago)
- Topics: denon, denon-avr-serial, hacktoberfest
- Language: Python
- Homepage:
- Size: 588 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
# Python Library for Denon AVR Serial over IP Control
![PyPI](https://github.com/troykelly/python-denon-avr-serial-over-ip/workflows/Publish%20Python%20%F0%9F%90%8D%20distributions%20%F0%9F%93%A6%20to%20PyPI%20and%20TestPyPI/badge.svg?branch=main) [![GitHub issues](https://img.shields.io/github/issues/troykelly/python-denon-avr-serial-over-ip?style=plastic)](https://github.com/troykelly/python-denon-avr-serial-over-ip/issues) [![GitHub forks](https://img.shields.io/github/forks/troykelly/python-denon-avr-serial-over-ip?style=plastic)](https://github.com/troykelly/python-denon-avr-serial-over-ip/network) [![GitHub stars](https://img.shields.io/github/stars/troykelly/python-denon-avr-serial-over-ip?style=plastic)](https://github.com/troykelly/python-denon-avr-serial-over-ip/stargazers) [![GitHub license](https://img.shields.io/github/license/troykelly/python-denon-avr-serial-over-ip?style=plastic)](https://github.com/troykelly/python-denon-avr-serial-over-ip/blob/main/LICENSE.txt) [![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Ftroykelly%2Fpython-denon-avr-serial-over-ip)](https://twitter.com/intent/tweet?url=https%3A%2F%2Fgithub.com%2Ftroykelly%2Fpython-denon-avr-serial-over-ip&via=troykelly&text=Control%20older%20Denon%20AVR%20models%20via%20their%20serial%20port%20over%20IP%20%23api%23homeautomation)
## Description
Connects to an older Denon AVR serial port using an IP to Serial convertor
### Note
This is in no way affiliated with Denon.
### Issues
I don't have access to a Denon AMP any more directly - so most of this is from old Protocol documentation
### Logging / Debugging
This library uses `logging` just set the log level and format you need.
## Example
The examples below may look a little complex - because this library relies on functions like `.connect()` need to be `await`ed.
### Connect and turn on Zone 2
```python
import asyncio
from denon_avr_serial_over_ip import DenonAVRapi = DenonAVR(
host=10.10.10.10,
longitude=5001,
)async def zone_change(zone):
"""Alert about a zone change"""
_LOGGER.info("Zone %s changed", zone.zone_number)async def connect_turn_on_z2():
await API.connect()
API.zone2.subscribe(zone_change)
await asyncio.sleep(2)
await API.zone2.turn_on()
await asyncio.sleep(2)
await API.zone2.set_volume_level(0.5)
await asyncio.sleep(2)
await API.turn_off()asyncio.get_event_loop().run_until_complete(connect_turn_on_z2())
```## Support