I’m looking for a way to play music, controlled by OpenHAB. I want to play Spotify playlists, and online radio (http://something.com/streaming.mp3).
My current set up are two speakers, a Stereo power amplifier (Pro-Ject Amp Box) and a Chromecast Audio to the Stereo amplifier. Using the ChromeCast binding, I am able to play online radio, and pause any music that is currently playing through the Chromecast. However, the Chromecast binding does not let me stream specified Spotify playlists. I also tried the Spotify binding and the python script to control Spotify through Chromecast. This does not seem to be possible. I’ve searched other forums as well, and it seems that Chromecast cannot be controlled through the standard Spotify Web API. So I’m looking for an alternative solution.
I’m considering to purchase a Raspberry Pi (my first), and a Hifiberry DAC+, and connect it using RCA cables. I’m not sure if there are better DACs available than Hifiberry.
That’s the hardware part. Now I need to find a way to control it via OpenHAB. I have no other requirements than:
- Play/Pause specified Spotify tracks trough OpenHAB;
- Play/Pause specified online radio trough OpenHAB;
What I’ve discovered so far:
- Volumio seems to be a solution that allows playing webradio and Spotify. And it seems that a Volumio binding is being developed (although not yet part of the OH distribution). A channel “playRadioStream” seems to cover online radio. I’m not sure if anyone has experience initiating a specified Spotify playlist using this binding? There also seems to be an MPD binding, but it seems to be less mature than the Volumio binding (I might be wrong).
- The “Pi MusicBox” seems to be able to play webradio and Spotify. But besides the MPD binding, I don’t see any integration options with OH.
- Another solution is to install Raspotify on my Raspberry. This allows me to control audio on my Raspberry trough the Spotify Web API (using the Spotify binding or python script). Next to that, I could use a standard player (e.g. MOC) to play my online radio directly. But here I don’t understand how Raspotify and MOC would ‘work together”. What if both receive a command to play something? Will all music play simultaneously? Also, how can I trigger a command-line based player on my Raspberry to play music from OpenHAB (which is installed on a different machine)?
I prefer a stable, proven, out-of-the-box solution, instead of trying to build/program something myself.
Based on research I’ve done so-far, I’m inclined to go for Raspberry Pi with Hifiberry and Volumio. But I would like to know if other people can share some interesting experiences/insights in playing audio triggered by OpenHAB.