I’ve bought a Pi Zero W and Pirate Audio line-out to build a simple Mopidy-spotify powered music box for my daughter (6).
I did this previously with a Pi1B, using python scripts calling out to MPC, with reasonable success, tho in use it was a little fragile. With the Pi1B having died, I’m starting again and hoping to deliver something better.
So, I’ve setup the pi+hat successfully per the guide, Iris works (tho won’t be used in day to day use). Can confirm quality of the audio output is far superior to using the onboard equipment on the Pi1.
I’ve connected the boards with wire rather than the headers, so that I can break out to larger buttons on the case.
So far, so good.
What I’m struggling with is modifying the raspberry-gpio plugin.
I’d like to add a button handler to the extension, to select between Spotify playlists. Each press it should empty the queue and load the next playlist on a list.
I probably also need to add an ‘on start’ method, to load an initial playlist on power-up.
However, my experimentation thus far has been… Unsuccessful. Reading the Mopidy API guide, and guessing as to how that would translate into Python had resulted in a non-functional plugin, and I can’t find any helpful examples to crib from.
Anyone with experience of the Mopidy API in Python who can advise, with suggestions, example code, etc - I’d be absolutely delighted to receive it! I shall continue to experiment in the meanwhile!