I recently discovered spotifyd, an open source alternative to the deprecated libspotify. I happened to also have a pi-zero W from a while back, and a pHAT DAC amplifier.

It was a relatively trivial job to set up the pi zero w headless, get audio output to the pHAT DAC, install spotifyd and use it as a spotify connect device connected to my old Cambridge Audio A1.

Install guides:

I tried a similar project a few years ago, using MPD and spotify plugin, but at the time it was too unreliable. Thanks to the folks who spent the time creating spotifyd!

I should get a case for the pi some time, at the moment it’s just freely sitting on the shelf next to the speakers.