The first way to play Spotify music on Raspberry Pi we show here is to get assistance from Kodi, which is a media center software. Kodi can run on tops of other systems, like OSMC or LibreElec and allows users to listen to and stream thousands of media content from different streaming music and video sits, such as Spotify, YouTube, Netflix, etc. Let's see how it works.
Part 1. How to Install Spotify on Raspberry Pi via Kodi
Kodi is not by default on Raspberry Pi, you need to install Kodi on it firstly. Since the steps are very professional and complicated, you can read on the detailed tutorial on how to install Kodi on your Raspberry Pi provided by Raspberry.
Run Spotify On Raspberry Pi
Within the Spotify menu you can find all your playlists and have access to all songs on Spotify. Hopefully, by the end of this Raspberry Pi Volumio tutorial, you have now successfully setup Volumio on your Raspberry Pi and also have Spotify up and running on it. If you have any issues or have any feedback, then feel free to drop a comment below. Eternally grateful to all the techies here working in their spare time, particularly you with the updated Spotify app and BPA with BBC iPlayer. This has kept my Squeezebox kit running much longer than I ever anticipated - saving me buckets of cash on less capable replacements - so it is the least I can do to help beta (alpha?) test. Make your Raspberry Pi stream! Welcome to the Swiss Army Knife of streaming music using the Raspberry Pi. With Pi MusicBox, you can create a cheap (Sonos-like) standalone streaming music player for Spotify. Raspotify is a Spotify Connect client for Raspbian on the Raspberry Pi that Just Works™. Raspotify is a Debian package and associated repository which thinly wraps the awesome librespot library by Paul.
Just choose a new SD card or flash OSMC to get started with the Kodi media center software. After you have completed the welcome wizard of OSMC, it's time to install Spotify on Kodi. Since I have already wrote the detailed tutorial to get Spotify on Kodi, here I will not repeat it again. Before following the previous source page, please make sure you have enabled SSH, which works to send the repository file to your Raspberry Pi.
When all things have done, you can navigate to the 'Music' option from the main menu and find Spotify in 'Music Add-ons' to play Spotify music via Kodi on Raspberry Pi without any restriction.
HAHAHA. 知人とは繋がらないのにSpotifyには繋がったぜ
最近愛用しているSpotify
AppleにはAirPlay、GoogleにはGoogle Castがあるように、Spotifyには
Spotify Connectがあるのだ。
Spotify Connectってなんぞ
Spotify Connect を使うと、以下のデバイスでSpotifyアプリをリモコンみたいに操作して、他のデバイスでSpotifyを再生することができます。
ようは、スマホアプリをリモコン代わりにして別の機器で音楽再生するやつです。で、具体的にSpotify Connectに接続可能なデバイスは以下にあるのですが
基本的に製品だ。
実のところ、この辺りはAirPlayもGoogle Castも同じでウチのサービス使って製品売るならライセンス契約せいやっていう話なんだが、なんとOSSでConnectすることができるらしいというのを見つけたので試してみました。 前提
因みに、Spotify Connectを利用するには
PREMIUMアカウントが必要。
でもって、Raspberry PiでSpotify Connectする為に必要なLibSpotify は
既に廃止が確定しており、2017年迄にいつか突然使えなくなるのだ。
https://developer.spotify.com/technologies/libspotify/
ということを理解した上でやってみたいヒトは以下の手順でどうぞ。
ディストリビューション
Free spotify with virgin. 今回はいつのまにか正式版がリリースされているVolumio2を使いますが、Raspbian系なら多分問題なく動作すると思われます。
volumio.org
Raspberry Pi Spotify Client
Raspberry Piのセットアップが出来てないヒトはまずはこいつをインストールしましょう。
なお、Spotify Connectに拘る必要がなければVolumio2のSpotify Pluginをインストールすればブラウザ経由でSpotifyを利用できるのでそれはそれでオススメ(コチラもPREMIUMアカウントは必要)。
Spotify Connect Web
Raspberry PiでSpotify Connectをするには以下をインストールするだけ。
以降はsshでの作業。Volumioのログインアカウントは以下の通り。
アプリケーションキーの申請
上記メッセージのURLに飛ぶと以下にリダイレクトされる。
Libspotify Application Keys - Spotify Developer
Spotify onedrive app.
The libspotify key generation and retrieval service has been deprecated, along with libspotify.
You may apply to get a key using our App-key Request Form for private, individual usage. Bear in mind that you should do no new development using libspotify.
フォームから申請しろと言われるので、以下の項目を入力して気長に待つ。
'Describe your integration'には「RPIでSpotifyConnectしたいのです」というアツいメッセージを、'List the Spotify technology/ies used in your integration'には「Spotify Connect」を入れて気長に待つ*1。
1週間位でメールが来たのでメールに添付された「spotify_appkey.key」をscpでRaspberry Piに転送して先程の展開したディレクトリに配置。
起動してみる
spotify-connect-webの起動オプションは以下。
最低限指定するのは「username」と「password」で、PREMIUMアカウントのログイン情報を指定すればよい。
RaspberryPiの音声出力先を指定するにはまず以下でデバイス名を調べる
今回はRaspberry Pi3にDENONのDA-10をUSB接続しているので「DA10」を指定する。ついでにビットレートも最高の320に指定。
この状態でスマホのSpotifyアプリを見ると..
「TestConnect」というのが増えている。コイツがRaspberry Piだ。
「TestConnect」を選択すると見事、音が流れました。
自動起動設定
動作確認できたので、Raspberry Piが起動したら自動的に起動するようにする。
パラメータに「name」というのを追加しているがこれはスマホ等のSpotifyアプリ側で表示される名称。
ここまでやったら再起動してみる。
サービスとして起動しているのを確認。
Spotify mighty app. 「RpiConnect」が起動パラメータで指定した名称。
![]()
Connectされました。
現状のLibSpotifyはいつ使えなくなるかわからないけども、現状は他のAPIでConnectはできないと思うので選択肢はこれしかないのであるが、AirPlayはともかく、Google CastのレシーバーのAPIが公開されてRasspbery Piで実装できたらそれがいいのになあと思ったけれども、SpotifyはGoogle Castにも対応しているので
Chromecast Audioを買えば解決なんじゃねという結論に至りました。
*1:念のため、SpotifyアカウントとDeveloperアカウントを紐付けておいたが必要かどうかは不明
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |