New Random Album Extension

image

I’ve had a brief chance to test this with Roon and it works.

So what is it?

Random Albums — a Roon extension

A web UI that shows a screenful of random albums from your Roon library, with
Play Now, Add to Queue, Play Next, Shuffle, and Start Radio
actions targeting any of your zones. Refresh button reshuffles the wall.
Roon-style dark theme (default) plus a light theme.

The Roon API does not let third-party code navigate the Roon app itself, so the album detail view (art, tracks, action buttons) is rendered inside this UI. Tapping Play Now still plays through Roon on the zone you select.

Also included is a mini transport bar, with a share function (generates a MusicD share card, with album review if available) and volume control if your Roon endpoints have variable control.

Now the why?

I love music and between local albums and Qobuz I have a combined album count of ~12k, so sometimes I just don’t want to choose. This presents 12 options on the screen at a time. Nothing taking your fancy, refresh the screen. Play now, add to queue etc. it scrapes Qobuz for album info. Roon’s API restrictions unfortunately restricts pulling this metadata.

I have a version for Lyrion Music Server and Volumio as well. LMS is my choice which has manual search function as well. I haven’t put search inside the Roon version, I may if the Roon API allows the way I want it.

Download it here from my GitHub page. It works on Linux, MacOS and Windows (not tested yet on MacOS or Windows, but there’s no reason why it should not). Installation instructions after screenshots.

Once installed it’ll show in Roon Extensions setting page. Just enable it.

To use it via a web browser enter the IP of the machine running the extension http://<IP_ADDRESS>:3399
With iOS you can save it to the Home Screen and it acts like a full screen app.

Linux

# 1. Install Node + git
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs git
node --version        # must be v18+
which node            # NOTE this path for the service file

# 2. Unpack
cd /opt && sudo tar -xzf ~/roon-random-albums.tar.gz   # → /opt/roon-random-albums

# 3. Dependencies
cd /opt/roon-random-albums && npm install

# 4. Test by hand FIRST
node index.js         # should print "listening on http://0.0.0.0:3399", Ctrl-C

Add as a service

sudo nano /etc/systemd/system/roon-random-albums.service

[Unit]
Description=Roon Random Albums
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
WorkingDirectory=/opt/roon-random-albums
ExecStart=/usr/bin/node /opt/roon-random-albums/index.js
Restart=on-failure
RestartSec=5
User=root

[Install]
WantedBy=multi-user.target

save it, then

sudo systemctl daemon-reload
sudo systemctl enable --now roon-random-albums
sudo systemctl status roon-random-albums
journalctl -u roon-random-albums -f     # live logs (Ctrl-C to exit)

MacOS

# Install Node (choose one):
#   - Download the macOS installer from https://nodejs.org  (LTS), OR
#   - With Homebrew:
brew install node
# git is usually already present; if not:
xcode-select --install     # or: brew install git

node --version             # verify v18+

Unpack and install

cd ~/Applications            # or wherever you want it
tar -xzf ~/Downloads/roon-random-albums.tar.gz
cd roon-random-albums
npm install
node index.js               # test — should print the listening line

Open http://localhost:3399 (or http://:3399 from another device)

Auto-start on macOS (launchd, optional)
Create ~/Library/LaunchAgents/com.local.roon.random-albums.plist


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>            <string>com.local.roon.random-albums</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/bin/node</string>
    <string>/Users/YOU/Applications/roon-random-albums/index.js</string>
  </array>
  <key>WorkingDirectory</key> <string>/Users/YOU/Applications/roon-random-albums</string>
  <key>RunAtLoad</key>        <true/>
  <key>KeepAlive</key>        <true/>
</dict>
</plist>

Adjust the node path (which node) and the /Users/YOU/… paths, then:

launchctl load ~/Library/LaunchAgents/com.local.roon.random-albums.plist

Windows

  1. Install Node.js LTS from https://nodejs.org (the installer adds Node to
    your PATH automatically).
  2. Install Git for Windows from Redirecting….
  3. Open PowerShell and verify: node --version (should be v18+).
  4. Unpack the tarball (right-click → extract, or use 7-Zip), then in PowerShell:
cd C:\Apps\roon-random-albums      # wherever you extracted it
npm install
node index.js                      # test — should print the listening line
  1. Open http://localhost:3399 (or http://:3399 from another device)
    and enable it in Roon → Settings → Extensions.
    Auto-start on Windows (optional)
    Easiest is NSSM (the Non-Sucking Service Manager):
# After downloading nssm.exe:
nssm install RoonRandomAlbums "C:\Program Files\nodejs\node.exe" "C:\Apps\roon-random-albums\index.js"
nssm set RoonRandomAlbums AppDirectory "C:\Apps\roon-random-albums"
nssm start RoonRandomAlbums

Or create a Task Scheduler task: “At startup” → start a program →
node.exe with argument C:\Apps\roon-random-albums\index.js and “Start in”
set to the app folder.

Any errors, just post in this thread and I can assist.

1 Like

I can’t open you dropbox link for download. is it available in guthub as well?

How to send you a PM?

Best DrCWO

@MusicD
Great, thank you!

1 Like

Playing albums at random, that’s a native feature in Roon:

Not yet. I’ll look at adding it later and post the link.

Here you go

Updated the link above as well

You’re correct.

But my use case here is simple.

Choice to use either is there :+1:

Good to see it installs fine for others.

Is this on a tablet or desktop?

Wasn’t 100% sure how it’d turn out on more than a tablet.

As far as I understood it’s not primarily for playing albums in random order but for getting random albums out of your collection and select by hand which one to play.
So you may see albums you forgot about…

1 Like

I like the idea behind this litte Roon Extension. As far as I can see you released it under MIT license.

I’m interested including it in rooExtend. I would be delighted if you could drop me a line regarding this at info@definiteaudio.de.

Best DrCWO

1 Like

I’m confused. Isn’t this exactly what Roon does when one chooses the option to display albums in random order?

In a way yes, but this extension is a simpler affair (by design).

If you take a look at the two screenshots above, which appear to be on tablets, you can see the simplicity of the extension compared to Roon.

This isn’t to replace Roon, but for those days I sit down and think and scroll through my library I sometimes lose out on listening time. On my iPhone I have 12 options at a time. So far I’ve not had the need to refresh the 12 options without adding at least 3 or 4 from the twelve to my queue.

Roon’s random album thing is similar but it takes at least 2 taps/clicks to randomise the library view. Then a further 2 taps/clicks to fresh the random view. Might not seem much, but I feel that’s too many user interactions to achieve what the extension does automatically when you open it.

It’s a companion tool. Nothing more. It’s there to be used by anyone if they wish.

I’m biased I guess, but I’ve been using the version I made for Lyrion Music Server for three days and haven’t once opened the LMS client. For the two days I developed the Roon version I didn’t open the Roon client either.

2 Likes

I also checked it out and Roon on my iPad told me this morning that his is a new feature!

So I think you’re right.
Best DrCWO

1 Like

Thank you for the explanation. :+1:

1 Like

@MusicD
Backend on Linux Lubuntu 26.04
Display on desktop Firefox 151.0.2 Windows 11

iPad Pro (12.9") 2nd generation

Iphone 13 Pro Max

1 Like

Thank you :folded_hands:

Update - manual search added

2 Likes

@MusicD

1 Like

Quicker than planned, the queues in the theme park with my kids were long enough for me to work on this :rofl:

I pushed out v1.2.0 on GitHub followed by a patch update. You can update manually to either or use v1.2.0 and auto update to v1.2.1 via Roon Extensions or the Random Albums extension. It takes a few hours for the updates to come through or restart the Random Albums extension and it’ll come through immediately.

Via Roon



Via the Extension

2 Likes

This is how it was announced:

For me this fulfills all my needs. Nevertheless thanks’ for your effort.

Best DrCWO

Update - v1.3.0

• Built in Random Album Radio

(Next: For v1.4 I plan to introduce 2 new features.
Roon Arc lacks Random Album Radio and this lacks local playback. I’ve introduced local playback to the LMS version which transcodes on the server to AAC 256kbps using HLS. To achieve mobile playback I’ll also look to bake in Tailscale VPN)

1 Like