Pandora
If you have a Pandora account, you can control it from Home Assistant with this media player.
This integration is only available on Home Assistant Core installation types. Unfortunately, it cannot be used with Home Assistant OS, Supervised or Container.
Installation of Pianobar
This media player uses the Pianobar command-line Pandora client
The version of pianobar that comes with Jessie has a bug, so you have to build a more recent version. The latest version depends on a recent version of libraries associated with FFmpeg, so you should make sure you go through the backport process documented in The FFmpeg integration before doing this. Install the following basic dependencies:
sudo apt-get install git libao-dev libgcrypt11-dev libfaad-dev libmad0-dev libjson-c-dev make pkg-config libcurl4-openssl-dev
And now install the backported FFmpeg-related libraries (note that if you’re using an older version of FFmpeg for other things on this machine, you may encounter issues after doings this):
sudo apt-get -t jessie-backports install libav-tools libavcodec-extra libavcodec-dev libavfilter-dev libavformat-dev
Now clone the Pianobar repository and build pianobar:
git clone https://github.com/PromyLOPh/pianobar.git
cd pianobar
make clean && make
sudo make install
Configure Pianobar to auto-login and start playing a station (optional, see man pianobar
) by creating and editing the ~/.config/pianobar/config
file:
password = Password
user = you@youraccount.com
Test it out by running pianobar
in the command line. You should be able to listen to your Pandora stations.
Configuration in Home Assistant
The Pandora player can be loaded by adding the following lines to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file.
在更改了configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] 文件后,重启 Home Assistant 以应用更改。 该集成现在显示在集成页面的 设置 > 设备与服务 下。其实体在集成卡片上以及实体标签上列出。
# Example configuration.yaml entry
media_player:
- platform: pandora
That’s it! Now you will find a media player. If you click it you will find all your stations listed as different sources. If you switch to one, the station will begin playing.