User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Mon Oct 03, 2016 8:16 pm

If you are not using squeezelite then just delete the mode from this line: http://github.com/elParaguayo/PiRadio/b ... ain.py#L22

The code is a bit rough and doesn't handle errors brilliantly at the moment. To move back up a level you need to select "back" in the menu.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
karrika
Posts: 1070
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 5:56 am

Thank you for publishing the code. I found out that squeezelite is no longer found at googlecode. Could the binary be hosted at PiRadio? (I did find a file with the same name at https://github.com/Hypfer/squeezelite-d ... te-armv6hf )

I have used squeezeplayer on my android setup in the kitchen but I would like to try my skills in creating a PiRadio kind of setup that could have my wifes favourite records easily available.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 6:33 am

elParaguayo wrote:If you are not using squeezelite then just delete the mode from this line: http://github.com/elParaguayo/PiRadio/b ... ain.py#L22

The code is a bit rough and doesn't handle errors brilliantly at the moment. To move back up a level you need to select "back" in the menu.
The problem for me is that the 'menu' isn't working - there is nothing to select visible on the display. However if I press the button on the encoder, the first item in the (hidden) menu is selected. So I removed the squeezelite entry from the line you outlined, and moved Bluetooth to be the first item. When I now press the button, Bluetooth is selected, and is working - also the metadata is shown on the display ;)
Tonight I will connect up the volume encoder and take another look, although I wont have a lot of time to look at it.....
Cheers,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 9:02 am

karrika wrote:Thank you for publishing the code. I found out that squeezelite is no longer found at googlecode. Could the binary be hosted at PiRadio? (I did find a file with the same name at https://github.com/Hypfer/squeezelite-d ... te-armv6hf )

I have used squeezeplayer on my android setup in the kitchen but I would like to try my skills in creating a PiRadio kind of setup that could have my wifes favourite records easily available.
I'm a bit concerned that it's not at google code any more. I might visit the logitech forum and see if someone's hosting it elsewhere. If not, I don't have any real concerns about hosting the Pi compatible version on PiRadio.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 10:08 am

texy wrote:The problem for me is that the 'menu' isn't working - there is nothing to select visible on the display. However if I press the button on the encoder, the first item in the (hidden) menu is selected. So I removed the squeezelite entry from the line you outlined, and moved Bluetooth to be the first item. When I now press the button, Bluetooth is selected, and is working - also the metadata is shown on the display ;)
Tonight I will connect up the volume encoder and take another look, although I wont have a lot of time to look at it.....
Cheers,
Texy
Well, yes, that does sound like a problem!

Just a thought, which branch of the code are you using?

It might be worth adding some debugging to the display code so you can print the LCD lines to your screen and see whether or not they are registering properly.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 10:17 am

Hi,
I am using the Master branch from github. Hopefully I'll have time to play tonight. I'll probably end up using one of my 2.8" TFT displays, once I am happy everything else is working. The Roberts R300 I got from eBay, listed as non-working, in fact does, albeit with a very scratchy volume control.........

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 10:24 am

OK - I've been using v0.2 as it's got some improvements. It's a bit better than Master but there's still something I need to fix so hadn't merged yet. Unfortunately other parts of my life have taken over so development on this has really slowed down!
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 4:30 pm

karrika wrote:Thank you for publishing the code. I found out that squeezelite is no longer found at googlecode. Could the binary be hosted at PiRadio? (I did find a file with the same name at https://github.com/Hypfer/squeezelite-d ... te-armv6hf )
That seems to be a clone of the google code binaries. Triode is one of the developers so it's good to see his name on that github account.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 6:42 pm

elParaguayo wrote:OK - I've been using v0.2 as it's got some improvements. It's a bit better than Master but there's still something I need to fix so hadn't merged yet. Unfortunately other parts of my life have taken over so development on this has really slowed down!
So is v0.2 in a useable state at present?
I've made some progress - both encoders are connected and working. I can 'scroll' through the menu choices now. A couple of issues, probably down to my bad configuration :
- no metadata with airplay - I assume I mis-configured during installation, I used

Code: Select all

./configure --sysconfdir=/etc --with-alsa --with-avahi --with-ssl=openssl --with-metadata --with-systemd
- InternetRadio works for the initial first station, ie Radio1, but when I try and change the station, it crashes, and I have to reboot to re-run. If I change the order of the station list so that Radio2 is the first station, then that plays fine, but again I cannot change it. Also strangely after the Pi is rebooted, but PiRadio is not started, as I don't have it auto running at the moment, the radio station audio can be heard.

It's a great bit of code all the same. I just need to iron out these little issues.
Cheers,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 6:54 pm

So you've found two of the issues that I've got!

Airplay metadata - it is possible but I've not tried to implement it yet. The shairport service can send metadata to a pipe which the radio could read. There's some info here: https://github.com/mikebrady/shairport- ... ata-reader

Radio - I've no idea why it crashes! I'm keen to debug that one when I have the time.

Yes, v0.2 is useable - it's what I've got running at home.

As for rebooting, I've got a separate script that runs in the background. Holding both buttons down restarts the radio service (but this is only relevant if the radio is running as a service).

Question for you, when you start the radio does the code immediately jump into the first "mode" e.g. Bluetooth, Radio etc? It does on mine and I can't work out why!
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 7:30 pm

Ah - well I'm glad it's not only me with these issues :D
I think the issue I have with the menu selection is the same as going into the first mode - did you intend to have the selection menu up first - well that would be the logical approach, UNLESS you want it to 'remember' the previous selection on reboot (obviously it would need to have a look-up file, or some other method to achieve this).

Currently I am looking into enabling the USB sound card I have now fitted - it's been a while since I've done this........

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 7:58 pm

I certainly thought about having it go straight into the first mode, but I don't think I ever actually implemented it.

As for the radio, mpc is giving a return code of 1 which is causing the crash - unhelpfully there doesn't seem to be any error message. I may be able to stop the crash by just ignoring the error message but that feels like a hack. I'd rather understand why mpc is giving an error.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 8:44 pm

Can't get USB DAC to work...will have to wait until the weekend now.

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 8:53 pm

I haven't tried USB audio but have been tempted as there is some static on the speaker. Don't know if that's the amp or the pi.

Also curious as to whether this would make any difference.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: (Yet another) Vintage Pi-Radio

Tue Oct 04, 2016 9:02 pm

texy wrote:Can't get USB DAC to work...will have to wait until the weekend now.
This works for me, in /etc/modprobe.d/alsa-base.conf:

Code: Select all

options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Wed Oct 05, 2016 6:38 am

elParaguayo wrote:I haven't tried USB audio but have been tempted as there is some static on the speaker. Don't know if that's the amp or the pi.

Also curious as to whether this would make any difference.
Ah - I didn't know about that. I'll give that a go....
Thanks,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Wed Oct 05, 2016 6:39 am

Douglas6 wrote:
texy wrote:Can't get USB DAC to work...will have to wait until the weekend now.
This works for me, in /etc/modprobe.d/alsa-base.conf:

Code: Select all

options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835
I had it in my mind that that only applied to older wheezy builds, but I will give that a go as well.
Thanks,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
karrika
Posts: 1070
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: (Yet another) Vintage Pi-Radio

Wed Oct 05, 2016 7:06 am

elParaguayo wrote:I haven't tried USB audio but have been tempted as there is some static on the speaker. Don't know if that's the amp or the pi.

Also curious as to whether this would make any difference.
Last summer the natural Pi audio through the 3.5mm plug was much better than before. We used it for all sound at the theater. No problems with static or hiss.

Next year I plan to test the Audio Injector HAT's. They have rotary knobs to adjust both external input and master output. It allows us to have the music and sound effects on the SD card in the Pi controlled by QLC+ and easy mixing of an external source. This would be overkill for PiRadio (unless you want to sing karaoke in a microphone while cooking).

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Wed Oct 05, 2016 7:08 am

I never want to sing karaoke. Ever.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Wed Oct 05, 2016 11:54 am

elParaguayo wrote:I certainly thought about having it go straight into the first mode, but I don't think I ever actually implemented it.

As for the radio, mpc is giving a return code of 1 which is causing the crash - unhelpfully there doesn't seem to be any error message. I may be able to stop the crash by just ignoring the error message but that feels like a hack. I'd rather understand why mpc is giving an error.
I'll do some more debugging by trying mpd/mpc outside of the PiRadio environment and see if that gives me any more clues.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Wed Oct 05, 2016 6:50 pm

Pretty sure it's not my code.

From the command line I can jump around the playlist but it sometimes stops and gives me an "error: timeout" message and I'm the unable to send any further commands via mpc. Some googling to be done methinks...

EDIT: Seems to be behaving better if I use ALSA as the audio output for mpd rather than pulse.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Thu Oct 06, 2016 4:04 pm

Douglas6 wrote:
texy wrote:Can't get USB DAC to work...will have to wait until the weekend now.
This works for me, in /etc/modprobe.d/alsa-base.conf:

Code: Select all

options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835
Thank you - now working with usb soundcard.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Fri Oct 07, 2016 7:44 am

Hoping to have a crack at the Airplay metadata this weekend. I've got a pretty good idea as to how to do it.
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

texy
Forum Moderator
Forum Moderator
Posts: 5160
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: (Yet another) Vintage Pi-Radio

Fri Oct 07, 2016 8:17 am

elParaguayo wrote:Hoping to have a crack at the Airplay metadata this weekend. I've got a pretty good idea as to how to do it.
That would be great - it looks a very complex subject. Also, although not relevant for the 20 x 4 display, album art would also be useful, and for Bluetooth......I'll duck now :lol:

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
elParaguayo
Posts: 1943
Joined: Wed May 16, 2012 12:46 pm
Location: London, UK

Re: (Yet another) Vintage Pi-Radio

Fri Oct 07, 2016 8:35 am

texy wrote:
elParaguayo wrote:Hoping to have a crack at the Airplay metadata this weekend. I've got a pretty good idea as to how to do it.
That would be great - it looks a very complex subject. Also, although not relevant for the 20 x 4 display, album art would also be useful, and for Bluetooth......I'll duck now :lol:

Texy
It is complex. Fortunately, someone else has already done the bulk of the hard work so it's just a case of reading a pipe and looking for the relevant tags and decoding the data.

I think the album art is available over Airplay metadata but is disabled by default. Enabling it and capturing should follow the same process above. However, I don't have much interest in doing it.

No idea about Bluetooth artwork but, again, not something I'm immediately interested in.

That said, if I've got time I'll probably end up taking a look to see if it's possible just as an intellectual exercise!
RPi Information Screen: plugin based system for displaying weather, travel information, football scores etc.

Return to “Graphics, sound and multimedia”