A little programming fun from me with the ROON API

@Georg Obviously your prerogative, but I’m not looking for you to build anything for me or respond to demands from me, but to learn from your code….

Hello Georg,

I have a question regarding the stats shown in your screenshot.

Are you pulling these from calls to the ai or have you managed to pull the data from the Roon api? Reason I ask is that I have just started playing with the roon api and can’t find the basics (ie album year) let alone the level of stats you show. I have pulled the data I have managed to get at from the roon api (ie art keys) and mixed that with data pulled from exports from the roon app and merged in an external db ( which gives me album year - which is the sort field I use).

Hi,

as mentioned before, the Roon API is very limited in what it can do. I gather the information from several different places.

The app currently uses these external sources:

  1. Roon API / Roon Core. This is the primary source. It provides:
  • current playback information
  • artist, title and album metadata
  • cover artwork via image_key
  • zones, queue, playlists and live radio
  • search and matching results from your Roon library and from services integrated into Roon
    Tidal and Qobuz are not queried directly via their own APIs. They are accessed indirectly through Roon.
  1. Last.fm used for:
  • Last.fm playlists by tag
  • tag/genre validation
  • mood/tag enrichment
  • track/album cover fallback
  • album title and track metadata for live radio and Wrapped cover backfill
  • partial release year lookup via track.getInfo, for example album release date or wiki publish date
  • artist information/images where Last.fm provides usable images
  • Requires your Last.fm API key
  1. TheAudioDB used for:
  • artist images as a fallback, especially for Wrapped Top Artists

In short: Roon is the primary source, Last.fm provides metadata/covers/years/tags, TheAudioDB provides artist images, and AI providers generate or supplement playlist suggestions.

1 Like

Next news: Roon now with input for Spotify. Many thanks to @Mark_Hellkamp for the information to Roon audio input.

I did something similar to stream my local classical station from my tuner. My tuner is plugged into a Raspberry Pi via a HiFiBerry ADC HAT. I use LiquidSoap to encode it and send it to an Icecast server. I have a service that detects when the audio signal is detected and uses the Audio Input service to start streaming from the Icecast server. I grab the now playing metadata from the radio stations web site and update it via the Audio Input service. Way overkill, but it keeps me out of trouble :rofl:.

1 Like

I run the Spotify app on my Mac mini M2 Pro server. This ensures that Spotify Connect always works and that Spotify can be controlled through it.

For communication with Roon and for generating the stream for Roon, I have created a Swift app for Mac. The app captures Spotify’s audio output and metadata, converts them into a stream, and sends it to Roon via Roon Audio Input as Ogg FLAC at 48/24.

There are additional ideas and their implementation:
Large display for Roon Live Radio in the browser (here on the iPad)

Additionally, the implementation of an IR remote control for Roon using an ESP32 for start/stop live radio, zones, and Roon playlists (everything configurable):
IR remote control > ESP32 > Wi-Fi > My App > Roon

1 Like

Browser now playing view (on the iPad)

New track history view for Everything, Roon, Live Radio and Spotify, along with matching filters. Every track is clickable and can be played immediately with Roon:

The hardware for Roon IR control:

What is it?

This is the hardware to my app Roon AI to control Roon with an IR remote control.
This allows you to programme up to 10 buttons on an IR remote control and then use them to trigger actions in Roon.

The Next Big Thing.
MRIRR: Roon Audio Endpoint (Squeezebox compatible), I2S-DAC, learning IR remote control to trigger actions in Roon zones, programmable buttons to trigger actions in Roon zones, a round display for showing the album cover or a nice clock and a 7-segment display for status messages. All of this is possible with just a single ESP32S3 module, connected via Wi-Fi to Roon. No additional server services are required.

1 Like

I liked your idea…I’m making mine more of a discovery AI

1 Like

And the next new feature: Personal Radio Mixes from Tidal.
A big thank you for this idea goes to Muness.
This makes it possible to view Tidal’s Personal Radio Mixes – which aren’t displayed by Roon – save them as playlists in Tidal and synchronise them, or add them to the Roon queue.

1 Like

Good stuff Georg, would you mind putting all this to a github repo? I think a lot of people would like to reuse pieces at least!

1 Like

Once again, something I sorely miss in Roon has been fixed: Tidal search for playlists, with a filter for Tidal and user playlists.

3 Likes

This looks really great, why don’t you share it with the community?

1 Like

One more feature: As it’s very tedious to search for audiobooks on Tidal, I import the Audible or DNB catalogue and make it possible to search for the titles found using a search query on Tidal and add them straight away to the album list, and thus make the audiobook available for Roon.

1 Like

Once again, a feature has been added that I’ve sorely missed: I can now, at the touch of a button via my app’s remote function, add the track currently playing to a configurable zone within a freely configurable private playlist on Tidal. Unfortunately, the Roon API doesn’t support this (for whatever reason). That’s why I’m using this workaround via Tidal.

add_to_pl

1 Like