Roon Extension: Roon Web Controller v1.0.0 (on GitHub)

I was thinking a config file in the same directory. Something that the application could look at at runtime but isn’t a part of the Git project, if that makes any sense.

A CLI option could potentially work, though. I could put it in the systemd service file. It feels a little less clean that way, but it’d be doable.

Thanks!

I like it. Both an optional local configuration file and an optional command line option have been implemented in the “dev” branch and pushed to github. It will be in the next release which is coming very soon.

Order of precedence:

  1. Optional Command Line setting (see below for node app.js -h output)
  2. Optional configuration file (config/local.json) which is not tracked by git. An example file is tracked by git and is included (config/local.json.EXAMPLE). See below for the content. Simply copy this file to “config/local.json” and change the port as desired.
  3. Default port “8080”

Output of node app.js -h

Roon Web Controller

  A web based controller for the Roon Media System.

  Usage: node app.js <options>

Options

  -h, --help          Display this usage guide.
  -p, --port number   Specify the port the server listens on.

  Project home: https://github.com/pluggemi/roon-web-controller

Content of config/local.conf.EXAMPLE

// Copy this file to "local.json" and change the port as desired.
{
  "server": {
    "port": "1234"
  }
}
1 Like

@Mike_Plugge nice, A settings under roon extensions would also look clean… @St0g1e has it this way under his implementation of the webui… . I can see this been useful when there is no Roon UI available.

I absolutely do not want to make a server port setting something that is in the extension changeable via another remote.

The reason is that requires that extension be running in order to make a port change. And if another process is already running on that port, you would never be able to change the port with the extension settings. There is also the possibility of a potentially malicious user changing the port via a client to something that is in use and causing a denial of service style attack.

Server port settings belong on the server side where only an approved admin can make the change. As a senior Linux sysadmin of 20+ years, that is something that I cannot budge on.

@Mike_Plugge understood. :sunglasses:
@Mike_Plugge can you add an option to enable and disable debug on the conf file?

Thanks.

Actually debug has been removed.

The debug you were using was very specific to the issue you reported and helped me fix.

I see.
Ok thanks.

Awesome! Thank you so much for adding that config option. It’ll definitely make it easier to keep up with updates.

Listening on port 8080

-> REQUEST 0 com.roonlabs.registry:1/info
/root/roon-web-controller/node_modules/node-roon-api/moo.js:61
const m = Buffer.from(header + ‘\n’);
^

TypeError: this is not a typed array.
at Function.from (native)
at Moo.send_request (/root/roon-web-controller/node_modules/node-roon-api/moo.js:61:22)
at WebSocket.ret.ws.onopen.ret.moo.send_request (/root/roon-web-controller/node_modules/node-roon-api/lib.js:326:17)
at WebSocket.onOpen (/root/roon-web-controller/node_modules/ws/lib/WebSocket.js:456:14)
at emitNone (events.js:67:13)
at WebSocket.emit (events.js:166:7)
at WebSocket.establishConnection (/root/roon-web-controller/node_modules/ws/lib/WebSocket.js:887:8)
at ClientRequest.upgrade (/root/roon-web-controller/node_modules/ws/lib/WebSocket.js:778:25)
at ClientRequest.g (events.js:260:16)
at emitThree (events.js:97:13)Preformatted text

I have a problem, I do not want to run

What version of NodeJS are you running? It needs to be at version 6 or higher.

And DO NOT run node at root. It runs perfectly fine as a standard user.

I have just pushed the nearly final version 1.1.0 release of this app to the “dev” branch on git hub. There are still some minor CSS and layout tweaks that are on my pre-release TODO list. But it is largely ready to go. I will be working on finalizing the release, including updating screenshots and the README. Assuming no blocker bugs, it will be made generally available in the next day or two along with a new thread on this forum for the release announcement.

Give it a shot and see what you think. You can get the “dev” branch by running:
git clone -b dev https://github.com/pluggemi/roon-web-controller.git roon-web-controller-dev

This will create a new directory for the dev version. Note that since the main version and the dev version listen on the same port, you will have to stop one to run the other.

If you are updating an existing “dev” install, be sure to run “npm install” since there are new dependencies.

This was a fun bug to track down. It is fixed in the dev release I posted. Turns out that the control buttons were not getting updated with a new zone_id when the zone was switched…

1 Like

@Mike_Plugge awesome. Let me know when I can do a pull and test.
Thanks!

@Tech_Whisky_Lab It is ready now

Roon Web Controller v1.1.0 is now available.

Please see this new forum post for details and comments.

1 Like

This would be perfect with the RaspTouch I-Sabre ES9028Q2M KALI :wink: