Saturday, January 26, 2019

Using a Raspberry Pi B+ as a Spotify endpoint


I've started using Spotify recently and noticed that it has the ability to play it output on multiple devices, meaning you can use your desktop client or phone client and have it play on your Sonos speakers, or whatever. This is a nice feature, one I fell in love with when Apple had an audio out on an older airport model.

I soon discovered that there are several linux utilities to help accomplish similar tasks and someone has packaged them all together in nice distribution called Pi Musicbox. As the title may infer, it's meant to be run on a Raspberry Pi, if which I have three that are sitting idle. I downloaded the image and burned it to flash and began my journey.

Problem #1: Apparently there is an incompatibility with Spotify and Librespot (linux Spotify Connect endpoint) that makes it difficult to use if you opted to create your Spotify account using Facebook authentication. I normally NEVER do this, but for some odd reason I chose to try it with Spotify. There are several online resources that tell you how to make it work by creating device accounts, etc. None of them worked for me, I spent the better part of a week trying the various methods and none of them worked.

The end result was that I had to cancel my Spotify Premium account. The very last step of cancelling your account puts you in a live chat with a Spotify support person. In my case it was Aubrey V. (whom I discovered was working in the Philippines!). Aubrey walked me through the steps to transition over to non-facebook auth and made sure I could re-use the same email address. 10 minutes later I was set and Pi Musicbox (using Librespot in the background) started working as a Spotify endpoint!


This brings me to .....

Problem #2: Pi Musicbox would only play for one or two songs before it would disappear from the list of available devices on Spotify. After about an hour of digging through logs and watching the system live during playback, I soon discovered that Musicbox was fine, but the Raspberry Pi was rebooting, which was causing the issue. Huh, that's strange....

It was around that point that I realized that I never applied the two heatsinks that came the external case that I had purchased for the Pi b+. Whoops!

After a quick search for the cardboard box, the heatsinks were applied and now the box is much happier and hasn't rebooted after constant playback for an hour.

Apparently those heatsinks aren't just a suggestion!


No comments:

Post a Comment