Giter VIP home page Giter VIP logo

python-denon-avr-serial-over-ip's Introduction

Python Library for Denon AVR Serial over IP Control

PyPI GitHub issues GitHub forks GitHub stars GitHub license Twitter

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 awaited.

Connect and turn on Zone 2

import asyncio
from denon_avr_serial_over_ip import DenonAVR

api = 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

Buy Me A Coffee

python-denon-avr-serial-over-ip's People

Contributors

troykelly avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

grotan1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.