Giter Club home page Giter Club logo

integration-denonavr's Introduction

Denon AVR integration for Remote Two

Using denonavr and uc-integration-api

The driver discovers Denon or Marantz AVRs on the network. A media player entity is exposed to the core.

Supported attributes:

  • State (on, off, playing, paused, unknown)
  • Title
  • Album
  • Artist
  • Artwork
  • Source

Supported commands:

  • Turn on
  • Turn off
  • Next
  • Previous
  • Volume up
  • Volume down
  • Play/pause
  • Source select

Usage

Setup

  • Requires Python 3.11
  • Install required libraries:
    (using a virtual environment is highly recommended)
pip3 install -r requirements.txt

For running a separate integration driver on your network for Remote Two, the configuration in file driver.json needs to be changed:

  • Set driver_id to a unique value, uc_denon_driver is already used for the embedded driver in the firmware.
  • Change name to easily identify the driver for discovery & setup with Remote Two or the web-configurator.
  • Optionally add a "port": 8090 field for the WebSocket server listening port.
    • Default port: 9090
    • Also overrideable with environment variable UC_INTEGRATION_HTTP_PORT

Run

python3 intg-denonavr/driver.py

See available environment variables in the Python integration library to control certain runtime features like listening interface and configuration directory.

Build self-contained binary for Remote Two

After some tests, turns out python stuff on embedded is a nightmare. So we're better off creating a single binary file that has everything in it.

To do that, we need to compile it on the target architecture as pyinstaller does not support cross compilation.

x86-64 Linux

On x86-64 Linux we need Qemu to emulate the aarch64 target platform:

sudo apt install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Run pyinstaller:

docker run --rm --name builder \
    --platform=aarch64 \
    --user=$(id -u):$(id -g) \
    -v "$PWD":/workspace \
    docker.io/unfoldedcircle/r2-pyinstaller:3.11.6  \
    bash -c \
      "python -m pip install -r requirements.txt && \
      pyinstaller --clean --onefile --name intg-denonavr intg-denonavr/driver.py"

aarch64 Linux / Mac

On an aarch64 host platform, the build image can be run directly (and much faster):

docker run --rm --name builder \
    --user=$(id -u):$(id -g) \
    -v "$PWD":/workspace \
    docker.io/unfoldedcircle/r2-pyinstaller:3.11.6  \
    bash -c \
      "python -m pip install -r requirements.txt && \
      pyinstaller --clean --onefile --name intg-denonavr intg-denonavr/driver.py"

Versioning

We use SemVer for versioning. For the versions available, see the tags and releases in this repository.

Changelog

The major changes found in each new release are listed in the changelog and under the GitHub releases.

Contributions

Please read our contribution guidelines before opening a pull request.

License

This project is licensed under the Mozilla Public License 2.0. See the LICENSE file for details.

integration-denonavr's People

Contributors

zehnm avatar martonborzak avatar

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.