[GH-ISSUE #158] Wanted to check I'm not overlooking the obvious - Volumio on a Raspberry Pi #97

Closed
opened 2026-02-28 14:25:20 +03:00 by kerem · 3 comments
Owner

Originally created by @CliveBryant on GitHub (Jan 8, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/158

Is this designed for use with the Spotify plugin on Volumio running on a Raspberry pi?
That's my setup, and I have managed to get it to work. It solves all the problems I was having with the "official" go-librespot that is installed with the plugin.
But the way I have it working is hard-coded, and becomes a problem when I replicate my setup on another pi for use by a different Spotify account. It is logged in as that other user, but plays using my credentials. If we are both using it at the same time, each of us interrupts the playing of the other.

The plugin stores the userid and access token within /data/configuration/music_service/spop/config.json
But this library needs that data extracted into ~/.config/go-librespot/credentials.json for it to work.
And I haven't yet worked out how that interacts with state.json, except that they seem to require different details else playing won't start via the web browser.

Uninstalling and reinstalling the plugin deletes this library and replaces it with the official one that has a bunch of problems (as we all know!).
Logging out of the official plugin needs to have /data/configuration/music_service/spop/spotifycredentials.json present, else it fails. And logging in when this library is in place doesn't create that file, so you can never log back in as you can never logout, even though you have logged out.

I think the solution is for me to have a startup script that extracts data from /data/configuration/music_service/spop/config.json and establishes it in ~/.config/go-librespot/credentials.json. That can also make sure there is a spotifycredentials.json in /data/configuration/music_service/spop/
It would also need to check that the go-librespot hasn't been changed before starting up the daemon - possibly going off the filesize, and copy it in place if it has changed from this known good library.

All this seems possible, albeit rather "hacky" - hence the question of whether I'm missing something!?!?

Originally created by @CliveBryant on GitHub (Jan 8, 2025). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/158 Is this designed for use with the Spotify plugin on Volumio running on a Raspberry pi? That's my setup, and I have managed to get it to work. It solves all the problems I was having with the "official" go-librespot that is installed with the plugin. But the way I have it working is hard-coded, and becomes a problem when I replicate my setup on another pi for use by a different Spotify account. It is logged in as that other user, but plays using my credentials. If we are both using it at the same time, each of us interrupts the playing of the other. The plugin stores the userid and access token within /data/configuration/music_service/spop/config.json But this library needs that data extracted into ~/.config/go-librespot/credentials.json for it to work. And I haven't yet worked out how that interacts with state.json, except that they seem to require different details else playing won't start via the web browser. Uninstalling and reinstalling the plugin deletes this library and replaces it with the official one that has a bunch of problems (as we all know!). Logging out of the official plugin needs to have /data/configuration/music_service/spop/spotifycredentials.json present, else it fails. And logging in when this library is in place doesn't create that file, so you can never log back in as you can never logout, even though you have logged out. I think the solution is for me to have a startup script that extracts data from /data/configuration/music_service/spop/config.json and establishes it in ~/.config/go-librespot/credentials.json. That can also make sure there is a spotifycredentials.json in /data/configuration/music_service/spop/ It would also need to check that the go-librespot hasn't been changed before starting up the daemon - possibly going off the filesize, and copy it in place if it has changed from this known good library. All this seems possible, albeit rather "hacky" - hence the question of whether I'm missing something!?!?
kerem closed this issue 2026-02-28 14:25:20 +03:00
Author
Owner

@devgianlu commented on GitHub (Jan 8, 2025):

Currently the Volumio plugin uses version 0.0.17.1 which is very outdated with respect to the latest 0.1.3, that's why you are seeing many inconsistencies between the two setups. However, recently, a PR got merged to update it, but I am unsure when a new version of the plugin will come out. That's probably something to ask on their forum.

If you want to get go-librespot running on a separate device I'd recommend simply following the instructions on this repo.

<!-- gh-comment-id:2578011951 --> @devgianlu commented on GitHub (Jan 8, 2025): Currently the Volumio plugin uses version 0.0.17.1 which is very outdated with respect to the latest 0.1.3, that's why you are seeing many inconsistencies between the two setups. However, recently, [a PR](https://github.com/volumio/volumio-plugins-sources/pull/380) got merged to update it, but I am unsure when a new version of the plugin will come out. That's probably something to ask on their forum. If you want to get go-librespot running on a separate device I'd recommend simply following the instructions on this repo.
Author
Owner

@CliveBryant commented on GitHub (Jan 8, 2025):

Thanks for the response - and HUGE WELL DONE on creating this library.
Incidentally, I couldn't get it to run through Go on my Raspberry Pi - else I could have looked at changing the code for my own setup. There were always missing dependencies that I think were due to libogg-dev libvorbis-dev and libasound2-dev. But as the Pi has limited processing power, it might be best to stick to the compiled library anyway.

<!-- gh-comment-id:2578385440 --> @CliveBryant commented on GitHub (Jan 8, 2025): Thanks for the response - and HUGE WELL DONE on creating this library. Incidentally, I couldn't get it to run through Go on my Raspberry Pi - else I could have looked at changing the code for my own setup. There were always missing dependencies that I think were due to libogg-dev libvorbis-dev and libasound2-dev. But as the Pi has limited processing power, it might be best to stick to the compiled library anyway.
Author
Owner

@devgianlu commented on GitHub (Jan 8, 2025):

Thank you for the kind words!

I managed to compile go-librespot on a Raspberry Pi Zero so you should be able to build it pretty much anywhere.

I'll be closing the issue, feel free to open a new one if any problem arises.

<!-- gh-comment-id:2578454045 --> @devgianlu commented on GitHub (Jan 8, 2025): Thank you for the kind words! I managed to compile go-librespot on a Raspberry Pi Zero so you should be able to build it pretty much anywhere. I'll be closing the issue, feel free to open a new one if any problem arises.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/go-librespot#97
No description provided.