HowTo: Install Roon Extension Manager on Linux

(Jan Koudijs) #1

The Roon Extension Manager Wiki now describes how to install the Extension Manager on a Linux system by using an install script.

https://github.com/TheAppgineer/roon-extension-manager/wiki/Installation#linux

A service will be installed that takes care of auto start up at system boot.

The script is pretty basic, so things might fail on certain distributions. Please let me know how it works out.

It would be nice if someone can test this on a Raspberry Pi, as it might be a good host for Roon extensions.

Important notes!!

  • Use the install script and extensions at your own risk!
  • Make regular backups of your Roon database.
  • The install script and extensions are in beta status, as is the API they depend on. This means that there can be small or even bigger issues!
  • Tests are performed on Fedora and Arch Linux but other distros should work as well.
  • If you are already running some Roon extensions manually you should stop them first.
  • If something goes wrong during installation please copy the output of the install script, post it in this thread and tell which Linux distro and version you’re using.
1 Like
HowTo: Install Roon Extension Manager on macOS
Roon Extension Manager v0.10.1
Roon Extension Manager v0.10.1
(Jan Koudijs) #2

btw Based on this post:

I don’t expect the script to work on QNAP :frowning_face:

(Nathan Wilkes) #3

Tested on a fresh DietPi v6 Raspberry Pi Zero W. Installed the pre-reqs by “apt-get install git npm” but needed to use DietPi to install node.js (“node” in the prereq array in the install script).

Authorized in Roon, took a few seconds to populate the extensions, and installed Alarm Clock successfully.

(Jan Koudijs) #4

Thanks @Nathan_Wilkes.

So it works on the DietPi / Raspberry Pi combination!

Is the service running and could you use the install script ‘as is’?

Your reply reminded me of an older post about prerequisites installation on DietPi, this might be useful information for others:

(Rene Bouwmeester) #5

Just tried the script – not going smoothly on Debian Stretch, I’m afraid:

rene@linuc:~$ sudo /home/rene/setup.sh
[sudo] password for rene:
Checking prerequisites…
OK
Configuring npm @ /home/rene/.RoonExtensions…
Installing extensions…
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/lib
└─┬ roon-extension-manager@0.5.1 (git+https://github.com/TheAppgineer/roon-extension-manager.git#d9ec9a7224c94ab9e727cb158447d9d9ab52e6d2)
├─┬ node-api-extension-installer@0.5.1 (git://github.com/theappgineer/node-api-extension-installer.git#242327d5f944ac1f74f52e692c047a5ed5a036e5)
│ └── node-api-extension-runner@0.2.2 (git://github.com/theappgineer/node-api-extension-runner.git#d433d0da42edbf23dccad6f8340bbd03ca3e58d6)
├── node-api-time-input@0.1.0 (git://github.com/theappgineer/node-api-time-input.git#04ef452ca5c575dc72f51a1b15681105299df613)
├── node-roon-api@0.0.1 (git://github.com/roonlabs/node-roon-api.git#caca92e99fd6becfc97761d32333cf4cd914b438)
├── node-roon-api-settings@1.0.0 (git://github.com/roonlabs/node-roon-api-settings.git#67cd8ca156c5bcd01ea63833ceaaec6d6a79654d)
└── node-roon-api-status@1.0.0 (git://github.com/roonlabs/node-roon-api-status.git#504c918d6da267e03fbb4337befa71ca3d3c7526)

/usr/lib
└─┬ roon-extension-manager-updater@0.2.0 (git+https://github.com/TheAppgineer/roon-extension-manager-updater.git#a1d0fe355d809ba93f4ad4975d162a82fb91d423)
└─┬ node-api-extension-installer@0.4.0 (git://github.com/theappgineer/node-api-extension-installer.git#043c0851ae8394a58b2a04778dd9ffa4dd78cd71)
└── node-api-extension-runner@0.2.2 (git://github.com/theappgineer/node-api-extension-runner.git#d433d0da42edbf23dccad6f8340bbd03ca3e58d6)

–2018-02-04 11:18:54-- https://raw.githubusercontent.com/TheAppgineer/roon-extension-manager-packaging/master/linux/roon-extension-manager.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 151.101.36.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 184 [text/plain]
Saving to: ‘roon-extension-manager.sh’

roon-extension-manager.sh 100%[=================================================>] 184 --.-KB/s in 0s

2018-02-04 11:18:55 (2.34 MB/s) - ‘roon-extension-manager.sh’ saved [184/184]

mv: cannot move ‘roon-extension-manager.sh’ to ‘/home/rene/.RoonExtensions/lib/’: Not a directory
Setting up service…
Created symlink /etc/systemd/system/multi-user.target.wants/roon-extension-manager.service → /etc/systemd/system/roon-extension-manager.service.

Roon Extension Manager installed successfully!
Select Settings->Extensions on your Roon Remote to manage your extensions.

The ~/.RoonExtensions dir is empty. Service file is installed but understandably fails to load.

(Jan Koudijs) #6

It goes wrong at the Configuring npm step, the extensions ended up in the /usr/lib directory. I will add some checks to make sure that installation doesn’t move on in this case.

Can you check a few things for me?

Is there an npmrc file in the /usr/etc directory or in your home directory?

What version of npm is installed?

What is the output of the following command?

npm config get
(Rene Bouwmeester) #7

Hey Jan,

rene@linuc:/usr/etc$ ls -a
.  ..

rene@linuc:/usr$ npm -v
3.10.10

rene@linuc:~$ npm config get
; cli configs
user-agent = "npm/3.10.10 node/v6.12.3 linux x64"

; userconfig /home/rene/.npmrc
prefix = "/home/rene/.RoonExtensions"

; node bin location = /usr/bin/node
; cwd = /home/rene
; HOME = /home/rene
; "npm config ls -l" to show all defaults.

FWIW: I don’t see the extensions in /usr/lib either – is there any place I should clean them up?

(Jan Koudijs) #8

I forgot about the node_modules subdirectory, do you see them in /usr/lib/node_modules?

The manager and updater should be there, you can remove them with:

npm uninstall -g roon-extension-manager
npm uninstall -g roon-extension-manager-updater

The correct installation directory is configured via the .npmrc file in your home directory, but I don’t know if this is used in the sudo case. What is the output of npm config get if you rename this file?

(Rene Bouwmeester) #9

Yup – overlooked node_modules. :slight_smile: Uninstalled now.

Renamed to .npmrc.bak. Output:

rene@linuc:~$  npm config get
; cli configs
user-agent = "npm/3.10.10 node/v6.12.3 linux x64"

; node bin location = /usr/bin/node
; cwd = /home/rene
; HOME = /home/rene
; "npm config ls -l" to show all defaults.

rene@linuc:~$
(Nathan Wilkes) #10

@Jan_Koudijs , confirmed, script run as is, as root.

Service still running, and survives being started / stopped / disabled / enabled in the normal way.

1 Like
(Jan Koudijs) #11

You are now back at the default configuration. I don’t know if this solves the problem, quickest way to find out is give it another try. In the worst case you have to repeat the clean up and I have to continue the investigation.

(Rene Bouwmeester) #12

Bingo. Everything in the right place and running nicely.

Great addition, Jan.

1 Like
#13

Hi Jan,
I’ve just installed Roon-Extension-Manager with the installation script on my new fresh install of Fedora 27 minimal install which runs Roon Server.
It appears that Extension Manager fistly blinking about 5 or 6 time in “Extensions” of Roon Settings Window and then disappears. So I don’t get Extension Manager anymore. :frowning:

“systemctl status roon-extension-manager” command gives me the following result:

● roon-extension-manager.service - Roon Extension Manager
   Loaded: loaded (/etc/systemd/system/roon-extension-manager.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit-hit) since Wed 2018-02-07 22:26:10 CET; 3min 27s ago
  Process: 2145 ExecStart=/root/.RoonExtensions/lib/roon-extension-manager.sh (code=exited, status=0/SUCCESS)
 Main PID: 2145 (code=exited, status=0/SUCCESS)

févr. 07 22:26:10 RoonServer systemd[1]: roon-extension-manager.service: Service hold-off time over, scheduling restart.
févr. 07 22:26:10 RoonServer systemd[1]: Stopped Roon Extension Manager.
févr. 07 22:26:10 RoonServer systemd[1]: roon-extension-manager.service: Start request repeated too quickly.
févr. 07 22:26:10 RoonServer systemd[1]: Failed to start Roon Extension Manager.
févr. 07 22:26:10 RoonServer systemd[1]: roon-extension-manager.service: Unit entered failed state.
févr. 07 22:26:10 RoonServer systemd[1]: roon-extension-manager.service: Failed with result 'start-limit-hit'.
[root@RoonServer ~]#

This “Start request repeated too quickly” seems very strange, isn’t it?
Do you know what’s the matter?
Many thanks in advance for your help.

Best regards,
Dom.

(Jan Koudijs) #14

What versions of node.js and npm are included?

node --version
npm --version

The extension manager terminates after startup. Can you provide me the output of the following commands?

cd /root/.RoonExtensions/lib/node_modules/roon-extension-manager
node . ignore service
#15

Hi Jan,

many thanks for your reply:

node version is v8.9.4

npm version is 5.6.0

The result of the command “cd /root/.RoonExtensions/lib/node_modules/roon-extension-manager
node . ignore service”
is:

-> REQUEST 0 com.roonlabs.registry:1/info
<- COMPLETE 0 Success {“core_id”:“0df0d2d8-8c32-4361-a065-e62b2c6dd4ec”,“display _name”:“RoonServer”,“display_version”:“1.4 (build 300) stable”}
-> REQUEST 1 com.roonlabs.registry:1/register {“extension_id”:“com.theappgineer. extension-manager.RoonServer”,“display_name”:"Roon Extension Manager @RoonServer ",“display_version”:“0.6.0”,“publisher”:“The Appgineer”,“email”:“theappgineer@gm ail.com”,“required_services”:[],“optional_services”:[],“provided_services”:[“com .roonlabs.settings:1”,“com.roonlabs.status:1”,“com.roonlabs.pairing:1”,“com.roon labs.ping:1”],“website”:“https://community.roonlabs.com/t/roon-extension-manager /26632”,“token”:“0d9ad9a1-1092-473d-8d71-2a791d88a52e”}
<- CONTINUE 1 Registered {“core_id”:“0df0d2d8-8c32-4361-a065-e62b2c6dd4ec”,“disp lay_name”:“RoonServer”,“display_version”:“1.4 (build 300) stable”,“token”:“0d9ad 9a1-1092-473d-8d71-2a791d88a52e”,“provided_services”:[],“http_port”:9100}
Core paired.
<- REQUEST 1 com.roonlabs.status:1/subscribe_status {“subscription_key”:“5”}
-> CONTINUE 1 Subscribed {“message”:null,“is_error”:null}
<- REQUEST 2 com.roonlabs.pairing:1/subscribe_pairing {“subscription_key”:“6”}
-> CONTINUE 2 Subscribed {“paired_core_id”:"0df0d2d8-8c32-4361-a065-e62b2c6dd4ec "}
/root/.RoonExtensions/lib/node_modules/roon-extension-manager/node_modules/node- api-extension-installer/lib.js:121
_queue_action(REPOS_NAME, { action: ACTION_INSTALL, url: REPOS_G IT });
^

ReferenceError: REPOS_GIT is not defined
at ApiExtensionInstaller.query_installs (/root/.RoonExtensions/lib/node_mod ules/roon-extension-manager/node_modules/node-api-extension-installer/lib.js:121 :74)
at exec (/root/.RoonExtensions/lib/node_modules/roon-extension-manager/node
modules/node-api-extension-installer/lib.js:701:17)
at ChildProcess.exithandler (child_process.js:267:7)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:554:12)
[root@RoonServer roon-extension-manager]#

I hope it will help.

It appears that REPS_GIT is not defined. ???

(Jan Koudijs) #16

That surely helps, it’s a bug I have to fix.

#17

Ok Jan,

many thanks in advance for this bug fix. :wink:

(Jan Koudijs) #18

The fix is available.

In order to recover you have to update the manager at the command line

npm update -g roon-extension-manager

After that you should be able to start the service.

#19

Yes it works Jan!!!

Good job!!!
Congratulations and many thanks for the bug fix.

Dom.

1 Like
(Mike Plugge) #20

FYI - I have written up a guide to install Roon Web Controller on DietPi. https://github.com/pluggemi/roon-web-controller/wiki/Diet-Pi-Installation

It can easily adapted to install the Roon Extension Manager by changing the GIT link in the “Fetch Software” section and by changing the paths in the “Configure to start at boot” section.

If there is interest - I can do a complete write up to install Roon Extension Manager on DietPi.

@Dan_Knight - I don’t have a login for the DietPi forums. Do you believe there is any interest in this over there?

2 Likes