Pi Radio
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- cwolcott
- Posts: 3
- Joined: Sun Sep 28, 2014 9:00 am
Re: Pi Radio
Running pianobar from the commandline works as expected, it moves on to the next track just fine
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Pi Radio
Okay, I got the band back together here for testing.
Not able to reproduce the problem. pianobar/PiPhi.py advance to the next track without incident.
If it's any help, some versions and settings stuff:
Not able to reproduce the problem. pianobar/PiPhi.py advance to the next track without incident.
If it's any help, some versions and settings stuff:
Code: Select all
$ uname -a
Linux pandora 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux
$ file /usr/local/bin/pianobar
/usr/local/bin/pianobar: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0x57f7c250da8b9c42f8d12bf5bea0d0dcf6b6982f, not stripped
$ cat /etc/modprobe.d/8192cu.conf
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
$ pianobar
Welcome to pianobar (2012.12.01-dev)! Press ? for a list of commands.
[...]
(kill w/ctrl+c)
$ sudo python PiPhi.py
(LCD shows IP address, last-used channel is selected, track starts playing)
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Pi Radio
Maybe fetch the latest script for good measure. Last updated Aug. 22, if you're running an older version:
https://github.com/adafruit/Python-WiFi-Radio
https://github.com/adafruit/Python-WiFi-Radio
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Pi Radio
Okay, problem reproduced. Somewhat at random, Pandora server and pianobar aren't on speaking terms; pianobar's issuing a malformed request or something.
Trying to troubleshoot now. If this can't be solved, that's pretty much it for this project. Maintaining pianobar is untenable.
Trying to troubleshoot now. If this can't be solved, that's pretty much it for this project. Maintaining pianobar is untenable.
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Pi Radio
Okay, I managed to compile a more recent version (pianobar-2013.09.15 -- not the absolute latest, that wouldn't work due to a bunch of libav stuff). So far it's gotten through half a dozen tracks without incident, though that's no guarantee, since it was a weird random phenomenon going on. But you're welcome to try. If this fixes it (please let me know!), I'll update the guide to provide a download link for this instead. I'll leave it running here for a few hours, unless it hangs first.
- NateMac
- Posts: 32
- Joined: Fri Jun 13, 2014 10:52 am
Re: Pi Radio
Can't wait to give this a try tomorrow.pburgess wrote:Okay, I managed to compile a more recent version (pianobar-2013.09.15 -- not the absolute latest, that wouldn't work due to a bunch of libav stuff). So far it's gotten through half a dozen tracks without incident, though that's no guarantee, since it was a weird random phenomenon going on. But you're welcome to try. If this fixes it (please let me know!), I'll update the guide to provide a download link for this instead. I'll leave it running here for a few hours, unless it hangs first.
I'm kinda new to all this, what's the best way to install this from a Mac?
-
- Posts: 14
- Joined: Fri Jul 13, 2012 11:12 am
Re: Pi Radio
Did anyone find a solution to this ? I just powered up my WiFi Raspberry I built a 6 months ago. It now plays one song and stops. I can select another channel and it will play one song and stop. The LCD display is working and it is connecting to wifi without any problems. I took the suggestion to run python from the terminal. Same result. Plays one song and stopped. I did notice the time stopped printing on the screen. If I go and select another channel i see the terminal shows that it selected my station and prints out that song on the screen. The timer also starts counting again.
-Michael KB4JHU
-Michael KB4JHU
-
- Posts: 14
- Joined: Fri Jul 13, 2012 11:12 am
Re: Pi Radio
I ran paniobar and got the following error:
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
/!\ Cannot access audio file: Unknown HTTP status code.
--------------
[img]pi@raspberrypi ~/Python-WiFi-Radio $ pianobar
Welcome to pianobar (2012.12.01-dev)! Press ? for a list of commands.
Login... Ok.
Get stations... Ok.
/!\ Error: Autostart station not found.
0) q 'Weird Al' Yankovic Radio
1) q AC/DC Radio
2) q Aerosmith Radio
3) q Asia Radio
4) q Black Eyed Peas Radio
5) q Carrie Underwood Radio
6) q Creedence Clearwater Revival Radio
7) q Dave Matthews Band Radio
8) q Electric Light Orchestra Radio
9) q Elton John Radio
10) q Elvis Presley Radio
11) q Fleetwood Mac Radio
12) q Foreigner Radio
13) q Garth Brooks Radio
14) q Hootie & The Blowfish Radio
15) q Huey Lewis And The News Radio
16) Imagine Dragons Radio
17) q Jimmy Buffett Radio
18) q Journey Radio
19) q Kansas Radio
20) q Led Zeppelin Radio
21) q Merle Haggard Radio
22) q Michael Jackson Radio
23) q Pink Floyd Radio
24) q Queen Radio
25) Q QuickMix
26) q Rascal Flatts Radio
27) q Steve Miller Band Radio
28) q Sugarland Radio
29) q Taylor Swift Radio
30) q The Beatles Radio
31) q The Eagles Radio
32) q The Monkees Radio
33) q Timbuk 3 Radio
34) q U2 Radio
35) q UB40 Radio
36) q Uncle Kracker Radio
37) q Van Halen Radio
38) q Wolfgang Amadeus Mozart Radio
39) q ZZ Top Radio
[?] Select station: 19
STATION: Kansas Radio | 1689224596556022268
Receiving new playlist... Ok.
SONG: Rock 'N' Roll Fantasy | Bad Company | Desolation Angels
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
/!\ Cannot access audio file: Unknown HTTP status code.
[/img]
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
/!\ Cannot access audio file: Unknown HTTP status code.
--------------
[img]pi@raspberrypi ~/Python-WiFi-Radio $ pianobar
Welcome to pianobar (2012.12.01-dev)! Press ? for a list of commands.
Login... Ok.
Get stations... Ok.
/!\ Error: Autostart station not found.
0) q 'Weird Al' Yankovic Radio
1) q AC/DC Radio
2) q Aerosmith Radio
3) q Asia Radio
4) q Black Eyed Peas Radio
5) q Carrie Underwood Radio
6) q Creedence Clearwater Revival Radio
7) q Dave Matthews Band Radio
8) q Electric Light Orchestra Radio
9) q Elton John Radio
10) q Elvis Presley Radio
11) q Fleetwood Mac Radio
12) q Foreigner Radio
13) q Garth Brooks Radio
14) q Hootie & The Blowfish Radio
15) q Huey Lewis And The News Radio
16) Imagine Dragons Radio
17) q Jimmy Buffett Radio
18) q Journey Radio
19) q Kansas Radio
20) q Led Zeppelin Radio
21) q Merle Haggard Radio
22) q Michael Jackson Radio
23) q Pink Floyd Radio
24) q Queen Radio
25) Q QuickMix
26) q Rascal Flatts Radio
27) q Steve Miller Band Radio
28) q Sugarland Radio
29) q Taylor Swift Radio
30) q The Beatles Radio
31) q The Eagles Radio
32) q The Monkees Radio
33) q Timbuk 3 Radio
34) q U2 Radio
35) q UB40 Radio
36) q Uncle Kracker Radio
37) q Van Halen Radio
38) q Wolfgang Amadeus Mozart Radio
39) q ZZ Top Radio
[?] Select station: 19
STATION: Kansas Radio | 1689224596556022268
Receiving new playlist... Ok.
SONG: Rock 'N' Roll Fantasy | Bad Company | Desolation Angels
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
/!\ Cannot access audio file: Unknown HTTP status code.
[/img]
-
- Posts: 21
- Joined: Tue Apr 16, 2013 6:52 pm
Re: Pi Radio
by tbolt on 25 Sep 2014 14:07kb4jhu wrote:I ran paniobar and got the following error:
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
/!\ Cannot access audio file: Unknown HTTP status code.
--------------
I could never get this Adafruit project to work reliably.
So, I went with this:
http://usualpanic.com/2013/05/raspberry ... net-radio/
As the Author PBurgess said above, trying to maintain Pianobar is untenable
so move on...
- javierodom
- Posts: 1
- Joined: Tue Jan 06, 2015 6:03 am
Re: Pi Radio
This fixed my issue! Thank you! The instance of pianobar which I was using was downloaded yesterday (05 JAN 2015), and was straight from the https://learn.adafruit.com/pi-wifi-radio instructions. It would play the first song, then, with two to four seconds remaining in the track it would hang. If I changed the station via the buttons, it would start playing the next track from that newly selected station (even if same station), but once the end of that track would come around it would hang again. I tried a lot of things, reimaging was the most drastic. All to no avail. This was true if i ran pianobar directly or via PiPhi.py. I found your post, quoted, downloaded the zip, pscp'ed it to my raspberry pi, replaced the binary, chmod'ed it of course, and it seems to be working like a champ!pburgess wrote:Okay, I managed to compile a more recent version (pianobar-2013.09.15 -- not the absolute latest, that wouldn't work due to a bunch of libav stuff). So far it's gotten through half a dozen tracks without incident, though that's no guarantee, since it was a weird random phenomenon going on. But you're welcome to try. If this fixes it (please let me know!), I'll update the guide to provide a download link for this instead. I'll leave it running here for a few hours, unless it hangs first.
My only sadness with this project is that I cannot plus up/LIKE or minus down/DISLIKE tracks as they are playing. I looked at the PiPhi.py file, and tried mimicking the station selection process except with the right button/next track button, but that ended in misery. I started on this around 2pm on the 5th, and it is 3am on the 6th. I am going to get two hours of sleep, then go to work.
BTW, the Pibow Timber does work with this project, but I would recommend getting the longer or taller buttons, and some drilling and cutting of the top portion would be in order. A slight spacer may also be required, or a dimple/hole in the bottom of the top cover to make allowance for the contrast + 'switch.' But it looks nice.
Again, thank you!
Take care, and God bless.
Very Respectfully,
Javier
- jadomini
- Posts: 5
- Joined: Mon Dec 15, 2014 1:08 pm
Re: Pi Radio
I just wanted to say thanks for a great project!! I did have the issue with it not booting all the time but following a suggestion of this post adding the sleep 5 seems to have worked. Thanks again to all
-
- Posts: 21
- Joined: Tue Apr 16, 2013 6:52 pm
Re: Pi Radio
I'm having the same problem..kb4jhu wrote:Did anyone find a solution to this ? I just powered up my WiFi Raspberry I built a 6 months ago. It now plays one song and stops. I can select another channel and it will play one song and stop. The LCD display is working and it is connecting to wifi without any problems. I took the suggestion to run python from the terminal. Same result. Plays one song and stopped. I did notice the time stopped printing on the screen. If I go and select another channel i see the terminal shows that it selected my station and prints out that song on the screen. The timer also starts counting again.
-Michael KB4JHU
Plays one song then stops
if you select a different channel it will play one song, then no Audio.
pburgess, any suggestions?
- PanoushekArt
- Posts: 1
- Joined: Wed Jun 24, 2015 8:06 pm
Re: Pi Radio
Having trouble with this project. Pianobar will run fine on it's own but when I try to start PiPhi, it starts up, I hear about five seconds of the song and then it quits. This is the error I get. I know very, very little about python but am trying to learn it. Any suggestions?
Spawning pianobar...
Receiving station list...
Traceback (most recent call last):
File "PiPhi.py", line 289, in <module>
stationList, stationIDs = getStations()
File "PiPhi.py", line 190, in getStations
pianobar.expect('Select station: ', timeout=10)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1311, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1325, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1409, in expect_loop
raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
<pexpect.spawn object at 0xb6a1ca10>
version: 2.3 ($Revision: 399 $)
command: /usr/bin/sudo
args: ['/usr/bin/sudo', '-u', 'pi', 'pianobar']
searcher: searcher_re:
0: re.compile("Select station: ")
TIME: -03:21/03:29
TIME: -03:21/03:29
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 3576
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
Spawning pianobar...
Receiving station list...
Traceback (most recent call last):
File "PiPhi.py", line 289, in <module>
stationList, stationIDs = getStations()
File "PiPhi.py", line 190, in getStations
pianobar.expect('Select station: ', timeout=10)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1311, in expect
return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1325, in expect_list
return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
File "/usr/local/lib/python2.7/dist-packages/pexpect.py", line 1409, in expect_loop
raise TIMEOUT (str(e) + '\n' + str(self))
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
<pexpect.spawn object at 0xb6a1ca10>
version: 2.3 ($Revision: 399 $)
command: /usr/bin/sudo
args: ['/usr/bin/sudo', '-u', 'pi', 'pianobar']
searcher: searcher_re:
0: re.compile("Select station: ")
TIME: -03:21/03:29
TIME: -03:21/03:29
after: <class 'pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 3576
child_fd: 5
closed: False
timeout: 30
delimiter: <class 'pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
- pburgess
- Posts: 4161
- Joined: Sun Oct 26, 2008 2:29 am
Re: Pi Radio
Hey there. I just did the walkthrough and can confirm it still works.
If it's any help, I'm starting from the latest version of Raspbian (5-5-2015), and also, make sure you're using the version of pexpect specifically mentioned in the guide (version 2.3 -- the latest is 3.3, but don't use that, there's some behavioral changes).
If it's any help, I'm starting from the latest version of Raspbian (5-5-2015), and also, make sure you're using the version of pexpect specifically mentioned in the guide (version 2.3 -- the latest is 3.3, but don't use that, there's some behavioral changes).
Please be positive and constructive with your questions and comments.