Librespot Entrypoint: Play Spotify in any (or all) of your Roon zones


It can be shown with mixxx for source point!

Hi All, I currently have a roon trial and am trying to get this working. I can install the extension manager and the entrypoint gateway and librespot entrypoint. Manually starting the radio station works fine, but if I try to set a zone to be auto-controlled, it always fails. Either the spotify device canā€™t connect to the entrypoint, or if I connect an error pops up on Roon saying the radio station canā€™t be played.

I donā€™t see any errors in the librespot entrypoint, but the gateway gives has these recurring errors.

Any idea what Iā€™m going wrong?

2023-02-04T21:33:46.389197724Z ā†’ CONTINUE 1 Subscribed {ā€œmessageā€:ā€œGateway IP: 192.168.15.224ā€,ā€œis_errorā€:false}
2023-02-06T15:54:58.770299375Z events.js:292
2023-02-06T15:54:58.771040918Z throw er; // Unhandled ā€˜errorā€™ event
2023-02-06T15:54:58.771088961Z ^
2023-02-06T15:54:58.771137264Z
2023-02-06T15:54:58.771156244Z Error: connect ETIMEDOUT 192.168.15.52:9300
2023-02-06T15:54:58.771173543Z at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
2023-02-06T15:54:58.771191313Z Emitted ā€˜errorā€™ event on WebSocket instance at:
2023-02-06T15:54:58.771204419Z at emitErrorAndClose (/snapshot/root/node_modules/ws/lib/websocket.js:922:13)
2023-02-06T15:54:58.771217330Z at ClientRequest. (/snapshot/root/node_modules/ws/lib/websocket.js:781:5)
2023-02-06T15:54:58.771233820Z at ClientRequest.emit (events.js:315:20)
2023-02-06T15:54:58.771246607Z at Socket.socketErrorListener (_http_client.js:426:9)
2023-02-06T15:54:58.771259293Z at Socket.emit (events.js:315:20)
2023-02-06T15:54:58.771271935Z at emitErrorNT (internal/streams/destroy.js:92:8)
2023-02-06T15:54:58.771284559Z at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2023-02-06T15:54:58.771297142Z at processTicksAndRejections (internal/process/task_queues.js:84:21) {
2023-02-06T15:54:58.771309850Z errno: ā€˜ETIMEDOUTā€™,
2023-02-06T15:54:58.771322357Z code: ā€˜ETIMEDOUTā€™,
2023-02-06T15:54:58.771334801Z syscall: ā€˜connectā€™,
2023-02-06T15:54:58.771347206Z address: ā€˜192.168.15.52ā€™,
2023-02-06T15:54:58.771359620Z port: 9300
2023-02-06T15:54:58.771384882Z }

OK this is annoying but it is a sequencing problem, at least I had the same behavior and getting disciplined about how I started it was my path to happiness! Step 1: restart your librespot extension. Step 2: open spotify and and choose the librespot entry point. Step 3: choose something to play on spotify, this seems to be important to playing your radio station the first time. Step 4 hit play on your radio station. Once this is working it generally works fine but sometimes there will be some failure and the system will stop and not recognize the entry point in spotify, then start again at step 1, or if it is recognized but no music then stop your radio station, and start over at step 2.It rarely happens at our place now but sometimes Lisa hits something in the wrong order and it needs a jump start. Has not happened in a couple of weeks now.

1 Like

Thanks Todd! I have managed to get it working following your steps. I was able to get it working before except for the auto-controlled zone ā€“ it was returning an error when that setting was one. But I started over and retraced your steps and it looks to be good now ā€“ thanks so much!

1 Like

Hello @Jan_Koudijs ,

Thank you for this ROON extension. Is it possible for me to rename the ā€œLibrespot Entrypointā€ to something else? It could be helpful for the non-techies in the house if they see a name they can relate to/recognize.

Hi @Dennis_Mutsaers,

Are you referring to the device name you see in the Spotify app? Unfortunately that cannot be changed.

I was indeed referring to the device name in the Spotify app. Thank you for replying.

I am not sure what has happened but the Librespot connection has gotten pretty unstable. I cannot figure out what is causing it, anyone else noticing this? Is there something I can look for in the logs? At this point it is only running for a few minute before the radio station stops playing. The Librespot device in Spotify keeps on playing. I can usually just go in and hit play again on the radio station and it restarts but only for a couple of minutes. And Jan, just curious what made you change the entrypoint address, the update caused the radio station to break without warning and I had to go back and change the radiostation address to the one that ends with (RoonGateway) Any help would be appreciated.

Not sure what you mean, the Librespot Entrypoint did not have an update for over a year.

not very clear that you need to install Entrypoint Gateway to be fair. a lot of these issues could be resolved just by making that point a little sooner

1 Like

Well, after a good few hours of not really knowing what I was doing at all, Iā€™m delighted to be streaming Spotify to Roon. Thank you Jan for making this possible (I think you developed this extension?).

Anyway, Roon is indicating that the Spotify stream is a 16 bit Flac file. So, does anyone know if there is a reason why Roon would have this wrong, or might Spotify be quietly streaming at this quality where I am (UK)?

2 Likes

The stream to Roon is converted to Flac by the plugin as part of the process, the native stream would not work for internet radio streams. It also has to do an alsa loop back to capture the stream and encode it in a format that can work as internet radio. Roon has no idea of what its sourced from only what it receives from the loopback and Icecast which is sending out the url stream.

1 Like

can you detail how you managed this please as it would be most helpful!

First up, two parts:

a) have you got the Librespot Entrypoint showing as a ā€˜Spotify Connectā€™ output device?
b) are you actually playing to that Librespot Entrypoint, from Spotify, when you try to make it work in Roon?

iā€™ve managed to get it up and running now. wasnā€™t easy, but iā€™ve done it, thanks all!

@Jan_Koudijs

Hello Jan,
Unless Iā€™m mistaken in the documentation :
https://github.com/TheAppgineer/roon-entrypoints/wiki/Spotify-Connect-via-Audio-Entrypoint
the configuration file is not (anymore ?) /etc/default/raspotify but /etc/raspotify/conf

dp

Hi all!

First of all, thanks to @Jan_Koudijs for providing this extension.

Iā€™m wondering how stable this setup is for other people. Iā€™m currently evaluating roon coming from LMS, Spotify support is not a deal breaker for me but itā€™s definitely nice to have.

My current setup:

  • roon core running dockerized on unraid (wired)
  • Extension Manager/Gateway/Librespot entrypoint running on a Pi3b using DietPi (wireless)
  • Various SqueezeBox and SqueezeLite endpoints around my flat (wired and wireless)
  • One Cambridge CXNv2 streamer in my living room

Playback from my local library, TIDAL and Qobuz works without hiccups on all of my endpoints.
Librespot entrypoint has not been this reliable, unfortunately. I barely manage to listen to 3 songs in a row without playback getting interrupted. Iā€™ve observed 2 different situations when that happens.

  • Spotify keeps streaming to LibreSpot entrypoint, playback from the radio station stops for no obvious reason
  • Spotify stops playback/streaming to LibreSpot entrypoint for no obvious reason

Now, the LMS Spotty plugin has never been completely stable for me and Iā€™m pretty sure that it relies on LibreSpot as well.

Is this something one has to live with or is there a way to achieve stable playback via Spotify?

Thanks & best regards

Matthias