Skip to content
forked from jacroe/pidora

A small user interface created for my Raspberry Pi using pianobar

Notifications You must be signed in to change notification settings

Capybara/pidora

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Added a little Ruby script to turn my AV receiver on and set the input and startup volume

I'd like to:

  1. send song info to a 16x2 lcd
  2. add volume buttons
  3. port to Sinatra
  • The pInput.rb file was written for a specific Yamaha receiver it probably woudn't work on any others. CEC over HDMI could be another option

Pidora

This is a quick and dirty README. Use at your own risk

  1. Install pianobar, apache2, and libapache2-mod-php5 and their dependencies
  2. Configure Apache2 and PHP the way you like. I followed this guide and moved my www folder to the home directory.
  3. Configure pianobar until you are able to run pianobar from the command line without any interaction. The man file is particularly helpful. If you get a "TLS Handshake failed" error, run this command. It will append the correct TLS fingerprint to your config file.
  4. Create a FIFO file by running mkfifo ctl in your pidora directory. Make this writable by the server.
  5. Edit your pianobar config file by adding the fifo and event_command variables and their location. The event_command should point to the Python script.
  6. Edit the directory location in the python script to point to the root of pidora.
  7. Run pianobar and open Midori to the location of pidora. You should see the song information and the album art. This should fade out with the next song. Try Loving, Banning, and Shelving a song. The appropriate message should fade in then out again.

That's it for the installation. Now let's configure our machine to automatically launch the web browser and pianobar.

  1. Enable the pi to automatically log in and start the x server.
  2. Add the following lines of code to /etc/xdg/lxsession/LXDE/autostart: rm /home/user/pidoraWebLocation/curSong, @midori -a "http://localhost/pidora/" -e Fullscreen, @pianobar perferably with pianobar being called after Midori. This will cause Midori to launch fullscreen with pidora as the location and will start pianobar. I added it to the autostart file in LXDE as I didn't want it to launch until the x server was up and running. It also removes the last played song from Pidora so we get a "Pianobar is starting" message if Midori beats out pianobar (hasn't happened for me).
  3. Follow the instructions here to make the monitor not turn itself off. However, save it to the ~/.xsessionrc instead of ~/.xinitrc.
  4. Finally, remove all the icons on the desktop and set the statusbar to hide automatically. This isn't necessary but it gives less an impression that this is a computer.

Notes

You may be wondering why I wanted this to be graphical. Well, I didn't. The idea was that there would be a small speakers plugged into the 3.5mm jack and that would be that. But because of the analog popping bug in ALSA, it became annoying. So it had to be plugged into HDMI (I'll change this if I ever buy a USB audio dongle; I hear the bug's not present there). Which led me to need something to display while it was running. And this was my solution.

About

A small user interface created for my Raspberry Pi using pianobar

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 72.8%
  • Python 19.1%
  • Ruby 7.1%
  • Perl 1.0%