Reply To: Raspian rc.local pianobar

Home Forums Linux Raspian rc.local pianobar Reply To: Raspian rc.local pianobar

#5105

Jim
Participant

Solved!
I can’t find an edit button to mark this posts description as solved but here it is…

To auto-start a Pandora command line client like pianobar, I created a bash script by typing…
sudo nano pianobar.sh
In the text editor enter these three lines.

#!/usr/bin/env bash
aoss pianobar
exit

Save the file. Since I replaced the pi’s audio driver with alsa, the command is (aoss pianobar) in a standard pianobar install with the default pi audio driver, you would leave out the (aoss) part.

Next alter the users profile which runs at startup.

sudo nano /etc/profile
At the bottom of the file add…

sh /home/pi/pianobar.sh and save.

And that’s it. If you have a properly configured pianobar install and a pandora account, this will auto start whenever the pi boots.

There is a good wiki page detailing the pianobar installation process. Many people claim that the apt-get pianobar install is broken, but you simply needs to address a network error problem and add a (tls fingerprint) to your configuration file.

https://wiki.archlinux.org/index.php/Pianobar

With a couple of inexpensive components you can have a small hi-fi pandora player for about $30. This could easily fit inside a playing card box. The cheapest way to control the pandora functions would be to ssh into device, obviously not a user friendly approach. I’m working on a python script to control pianobar with just a few buttons and possibly add an lcd screen. Most of the functions are easily controlled with a single keyboard stroke however changing stations is a little more difficult since pressing “s” brings up your station list and without seeing it it’s kind of hard to make a choice.