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.

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

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

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: