Git Product home page Git Product logo

roon-cec-controller-extension's Introduction

roon-cec-controller-extension

Roon CEC Controller Extension should allow you to control Roon Core (⏮, ⏪, ▶️, ⏯, ⏸, ⏹, ⏩, ⏭ ) from your audio amplifier remote control, having your amplifier connected to a Roon Bridge via HDMI using CEC protocol.

You should install this extension on a device connected to your HDMI amplifier, probably your Roon Bridge (although you may have the Roon Bridge and the Roon Core on the same computer).

NB: This extension is heavily inspired by roon-extension-powermate.

Roon CEC Controller Extension Schematic

It relies on

It should work with any device that supports libcec:

This is a work in progress (but it works for me). Use at your own risks.

Todo:

  • Add volume control from Roon Core to the amplifier.
  • Display music titles on Amplifier
  • Power on amplifier / switch source automatically

Install Node

Installing Node.js via package manager

wget -qO- https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

Install CEC components

Install cec-utils and libcec (if not already installed)

sudo apt-get install cec-utils

Oh no, it doesn't work!

If you see the following error message while running the program, you probably have to take a closer look at the two following paragraphs.

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at _errnoException (util.js:992:11)
    at Pipe.onread (net.js:618:25)

Raspberry Pi: /dev/vchiq permission errors

If you are on Raspberry Pi, you probable need to do these:

echo 'SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"' > /etc/udev/rules.d/10-vchiq-permissions.rules
usermod -a -G video YourUnprivilegedUser

Log off, log back in.

Pulse-Eight adapter: '/dev/ttyACM0': Permission denied

If you are using a Pulse-Eight Intel NUC CEC Adapter, you probably want to add the current user to dialout group so that you have access to /dev/ttyACM0:

usermod -a -G dialout USERNAME

Log off, log back in.

Testing cec-utils

echo "scan" | cec-client -s -d 1

Install and run roon-cec-controller-extension

git clone https://github.com/benjaminbellamy/roon-cec-controller-extension.git
cd roon-cec-controller-extension/
npm install
node .

Open Roon Control software, go to Setting, then Extensions and enable Roon CEC Controller.

Run as a service

Using systemd (Linux)

  • Edit roon-cec-controller-extension.service so that ExecStart and WorkingDirectory directories match your configuration.
  • Copy roon-cec-controller-extension.service to /etc/systemd/system/:
sudo cp roon-cec-controller-extension.service /etc/systemd/system/
  • Give access to nobody to your CEC hardware, for instance on NUC:
usermod -a -G dialout nobody
  • Run the service:
systemctl start roon-cec-controller-extension.service 
  • Enable it to run on boot:
systemctl enable roon-cec-controller-extension.service 

Et voilà !

roon-cec-controller-extension's People

Contributors

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