Always on 'Now Playing' screen over HDMI

Hi,

I want to use my RPi with Pi Musicbox as a Spotify Connect receiver connected to my TV. Is it possible to have a fullscreen display of what’s currently playing at all times? Seeing as I won’t ever interact directly with the GUI on the Pi.

That’d be nice but we don’t gave anything like that built in. I don’t personally have any idea what’s currently the best option either.

1 Like

Gabriel – it’s funny you should ask that, as I wanted something similar. I wanted to run my Musicbox in to my AV receiver as an HDMI source, with the sound coming out the speakers and a display of what’s playing on the video (TV). I didn’t find anything to do this, so I took a copy of mopidy-musicbox-webclient (which is awesome) and hacked it into a “passive” now-playing display, which can be added as a web client extension to Mopidy.

I’ll upload the source to github tomorrow, and reply back in this thread with a link.

Now, my first use was to use it just as a display, and to continue to control Mopidy in the usual way (MPD or with the web client) – so right now, it’s not supporting Spotify Connect yet. But I included a QR image to make it really easy to open the UI from your phone, so it’s pretty easy to use from any phone. And, I started in with the Spotify web API this afternoon, and hope to add (limited, to a single user) support for Spotify Connect over the next week or so.

As far as I can tell, doing what you want (pure Spotify Connect head) isn’t really straightforward – either you just go directly to Spotify to see what the user’s playing (which only works if you’re configured for a single user), or you’d need to change the way Musicbox is using librespot to use a different service which would expose its own API (along the lines of https://github.com/Fornoth/spotify-connect-web, more or less, I think …), which is way more involved than I plan to tackle, particularly since Mopidy has its own great web interfaces.

1 Like

This sounds great, please do!

I’ve added my hack on github at https://github.com/UpDryTwist/twitch-viewer . Configuration is discussed in the readme – main thing is to replace the QR code image with an image for your own local URL, assuming the rest of your MusicBox configuration is vanilla. I also included some brief discussion on auto-running Chromium to show the page automatically, for what that’s worth.

I spent the afternoon yesterday beating my head against figuring out how to handle Spotify authentication simply (without writing a whole handler flow), and just didn’t make it anywhere. I’m sure there’s some way to use the authentication code / refresh code picked up by mopidy_spotify and mopidy_spotify_web, but despite browsing through their code, I just couldn’t figure it out. So adding in support for Spotify Connect isn’t likely to happen in the short term, unless someone can point me in the right direction …

As I’m traveling a lot this month, and this pretty much works for me (got the OK from my family ;), probably won’t be much more in the way of change in the near term, other than maybe adding “previously played” and “up next” cards.

Hope this is useful!

(Oh, last disclaimer: I haven’t really been a developer since the '90s, long before Javascript and CSS came of age, so apologies for clumsy code!)

1 Like

Thanks for sharing this. Looks really good. I particularly like the idea of
using a QR code.

This is excellent. Thanks for sharing. I’ll get to work on this tonight and see if I can figure it out.

Edit: I just burned the Pi MusicBox image and was up and running with Connect in 15 minutes. Very easy! It seems like Connect is not yet fully integrated with the rest of the software. The ‘Now Playing’ screen in the web UI is unaware of what’s playing over Connect, for example.

I noticed that after a while the screen blanked, which is the second best thing to having a ‘Now Playing’ screen on at all times. As much as I love a CLI, it looks a lot nicer in the livingroom without one. :slight_smile: