Hello Everyone,
I am about to build a small web radio player with the few resources I have at home. Therefore I am using a Raspi 2 Model B with an USB sound card (cheap ‘Tecknet’ device), an old Logitech 2.1 system, some LED’s and my non-present programming skills. I already got my script under Volumio 1.55 working, which was able to increase and lower the volume, play/pause, and load a certain playlist via keypad. I generated the lists with the Volumio web interface and saved them there. And this just worked fine:
[code]import subprocess
import sys
import time
import RPi.GPIO as GPIO
from keypad import keypad
GPIO.setwarnings(False)
while True:
if name == ‘main’:
# Initialize
kp = keypad(columnCount = 3)
# waiting for a keypress
digit = None
while digit == None:
digit = kp.getKey()
print digit
time.sleep(0.2)
# digit function
if digit == 1:
print "RSA"
subprocess.call(['mpc', 'clear'])
subprocess.call(['mpc', 'load', 'RSA'])
subprocess.call(['mpc', 'play'])
elif digit == "*":
print "Volume -"
subprocess.call(['mpc','volume', '-5' ])
elif digit == "#":
print "Volume +"
subprocess.call(['mpc','volume', '+5' ])
elif digit == 0:
print "Play/Pause"
subprocess.call(['mpc','toggle'])
[/code]
This way, I was able to load the playlist I saved with the name “RSA” by pressing digit number “1” on my keypad.
But now I have some troubles with the latest Volumio version 2.041. It works great so far, but when I am about to generate the playlists the same way I did before, I am not able to load them via python script. When executed, it is just saying “No such playlist”.
1
RSA
volume: 47% repeat: off random: off single: off consume: off
loading: RSA
error: No such playlist
volume: 47% repeat: off random: off single: off consume: off
Volume and toggle are working, so I may have a problem with the right playlist directory?!
Do I have to generate or save the playlist in a special way?
I hope you can help me with this issue.
Thanks in advance.