Skip to content

This is a small script to monitor raspotify activity and switch on-off an LED when music is played/stopped.

License

Notifications You must be signed in to change notification settings

kwagga/raspotify-led

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

raspotify-led

This is a small script to monitor raspotify activity and switch on-off an LED when music is played/stopped.

This obviously rely on raspotify as well as having verbose logging enabled.

Install

  • Download/Copy the script onto the Raspberry Pi into a folder of your choice. I use /home/pi/
  • Edit the script and change the gpiopin=18 variable if needed. Note this is BCM form and need to match the GPIO pin where you have a 330Ohm resistor and LED connected to.
  • Make the script executable with chmod +x monitor_librespot_play.sh
  • Edit the /etc/default/raspotify file and add the verbose switch "-v" to one of the arguments. I've used this: BACKEND_ARGS="--backend alsa -v"
  • Restart the raspotify service so that the change takes affect.
  • Start the script with /home/pi/monitor_librespot_play.sh and start streaming music via spotify connect to the pi. The LED should light up. Stop the streaming and it should switch off.

About

This is a small script to monitor raspotify activity and switch on-off an LED when music is played/stopped.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages