Peppy WebRadio

Ein neuer Artikel wurde veröffentlicht
  • Wow, you have 3 different systems.

    Did you buy all enclosures or made some of them yourself?

    As it was mentioned already the only recommendation would be to improve the

    sound quality as the sound from 3.5 mm jack is not so good. But for

    that you need to attach additional DAC or Amplifier to the GPIO. In that

    case the design becomes not so compact. Only if USB DAC is in use...

    Congratulations! Great job!

    If you have any questions/proposals feel free to post it here or contact me directly.

  • Hi peppy.player,

    with the same hardware I used NewTron-Radio.

    Instead of raspbian-lite as OS I used pipaos (pipaos-guarana-console-5.0.img.gz), a very fast and small 'raspbian-jessie-lite'.

    Sound via bluetooth to speaker JBL Go.

    I used the bluez-alsa package for bluetooth.

    Best regards, kle

    Did you buy all enclosures or made some of them yourself?

    I bought them all.

  • ...

    Sound via bluetooth to speaker JBL Go.

    I used the bluez-alsa package for bluetooth.


    Bluetooth is a good alternative. Though I've never used it myself.

    Could you share the details of this connection?

    What are the extra steps required? Do you really need any additional packages?

    Is it reliable connection? Does it work well with WiFi? How far you can move the speakers?

    How about sound quality?

    Thanks in advance!

  • about Raspis, Raspbian and Bluetooth

    RPi 3B and RPi Zero W have an internal bluetooth controller. You need the package pi-bluetooth to use the internal controller.

    Attention: the internal bluetooth controller uses the serial interface.

    Every Raspbian Release (wheezy, jessie and stretch) handles bluetooth devices in a special way.

    wheezy --> alsa --> bt-speaker

    jessie --> alsa --> pulseaudio1 --> bt-speaker

    stretch --> alsa2 --> bt-speaker

    1 pulseaudio sound server uses the pulseaudio-module-bluetooth to send sound to a bt-speaker.

    2 alsa uses bluealsa (package bluez-alsa) to send sound to a bt-speaker.

    jessie and stretch there is the command bluetoothctl to control bluetooth devices (scan, pair, trust, connect, disconnect, remove, ...).

    pulseaudio runs as session daemon.

    mpd runs as system daemon.

    jessie GUI has bluetooth desktop controls to connect a speaker to pulseaudio.

    stretch GUI has bluetooth desktop controls to connect a speaker to bluealsa.

    You can build bluealsa also for jessie (raspbian-jessie-lite, pipaos-guarana-console, )

    If the package pulseaudio-module-bluetooth is installed, remove it. (Afterwards jessie bluetooth desktop controls doesn't work any more!)

    Bluealsa works with jessie/stretch and mpd/vlc1/???mplayer

    1 there is an issue #23 'bad sound with VLC' and a work around. Details in Bluetooth for Peppy Player with VLC.

    Proposals for improvement welcome.

  • Bluetooth for Peppy Player with VLC

    1. The adafruit GUI image for Peppy Player contains pulseaudio-module-bluetooth.
      To prevent problems with bluealsa it shall be removed.
       sudo apt-get remove pulseaudio-module-bluetooth
    2. RPi 3B and RPi Zero W have an internal bluetooth controller.
      1. Install Package pi-bluetooth
         sudo apt-get install pi-bluetooth
      2. Modify /boot/cmdline.txt, remove console=serial0,115200. serial0 is needed by bluetooth.
      3. Check for udev rule to create 'serial0' symlink.
      4. Reboot to view the internal bluetooth controller in bluetoothctl
      5. Check for /dev/serial0 device.
    3. Using bluealsa in stretch or jessie,
      in stretch there is a package bluez-alsa,
      in jessie you must manually build the package from the sources.
      1. Install bluealsa in stretch.
        You can check, if it is already installed dpkg -l | grep "bluez-alsa".
        If it is not installed enter command sudo apt-get install bluez-alsa.
      2. Manually build and install bluealsa in jessie with python 2.7.
        ATTENTION: this guide does not change bluetooth desktop controls. Especially the connect BT speaker to sound server in audio menu will not work.
        1. Check python link with ls -l `which python`.
          If you see /usr/bin/python -> /usr/bin/python2.7 you can ignore steps 2. and 4.
          If you see anything different e.g. /usr/bin/python -> /usr/bin/python3.4 you must follow steps 2. 3. and 4.
        2. (opt.) Link python to python 2.7 (with python 3.4 you can't install libglib2.0-dev) sudo ln -s -f /usr/bin/python2.7 /usr/bin/python
        3. Manually build an install bluealsa in jessie
          Required Packages
          Post #2 from Gymnae
          , from line 15 below
        4. (opt.) Relink python to path before step 2.
          e.g. to python 3.4 again for Peppy Player ln -s -f /usr/bin/python3.4 /usr/bin/python.
    4. Configuration
      I found a runeaudion guide to do that.
      1. Alsa configuration
        Bluealsa issue #23 'bad sound with VLC'. Workaround delay -20000 in '/etc/asound.conf'
        You could do that, even if you are using other players like mplayer or mpd.
      2. Bluealsa service
        1. Create bluealsa service
        2. Start/Enable bluealsa service
          1. sudo systemctl daemon-reload
          2. sudo systemctl start bluealsa
          3. sudo systemctl enable bluealsa
      3. Connect bluetooth device
      4. Test
        aplay -D headset /usr/share/sounds/alsa/Front_Center.wav
    5. If bluetooth device does not connect after boot and switch on
      1. Headset service
        1. Create bt connect script

          Make script executable

          sudo chmod 755 /usr/local/bin/headset

        2. Create headset service

        3. Start/Enable headset service headset

          1. sudo systemctl daemon-reload
          2. sudo systemctl start headset
          3. sudo systemctl enable headset
    6. Change players.txt
      1. nano ~/Peppy/players.txt
      2. ...
      3. [audio]
      4. = vlc
      5. music.folder.linux = /home/pi/Music
      6. ...
      7. [vlc.linux]
      8. #server.command = --aout=alsa --alsa-audio-device=hw --verbose=-1
      9. server.command = --aout=alsa --alsa-audio-device=headset --verbose=-1
    7. Run Peppy Player
      1. cd ~/Peppy
      2. sudo python &

      If it works you can edit /etc/rc.local to autostart Peppy Player

      1. sudo nano /etc/rc.local
      2. ...
      3. cd /home/pi/Peppy
      4. python &
      5. exit 0
  • Bluetooth for Peppy Player with MPLAYER

    same as VLC except

    6. change players.txt

    1. nano ~/Peppy/players.txt
    2. ...
    3. [audio]
    4. = mplayer
    5. music.folder.linux =
    6. ...
    7. [mplayer.linux]
    8. #server.command = mplayer -ao alsa:device=hifiberry -idle -slave -quiet -msglevel statusline=6 -msglevel global=6
    9. server.command = mplayer -ao alsa:device=headset -idle -slave -quiet -msglevel statusline=6 -msglevel global=6
  • Here is the info about some new features of the next Peppy Player release (Vermeer Edition).

    The Home menu will be customizable in config.txt. It will be possible to include only features which you need.

    The support for CD playback will be added and new mode 'CD Player' will be available in the Home menu.

    Here is the example where 'Stream' mode was excluded and 'CD Player' mode was included to the Home menu:


    There will be the menu to select a particular CD drive if you have multiple CD drives connected to your system.

    Here is the screenshot from the Windows machine where I have two DVD drives connected:


    Peppy player will fetch CD info from FreeDB web site and display it in the Track menu:


    The CD player screen will look the same as any other Peppy playback screen:


    More likely the cover art will not be supported in this release. But I'm planning to add it in one of the following releases using either Discogs or MisicBrainz web sites.

    The CD Player mode will be implemented using pygame.cdrom API. It will be used to get CD drives info and track info. Disc ejection was implemented using pygame.cdrom API on Windows platform and using 'eject' command on Linux/Raspbian platform.

    CD Player mode will be available with all features for 'vlc'. It will be available only for one (default) CD drive for 'mplayer'. I'm not sure to what extent it will be available for 'mpd' as I'm just starting that implementation. I was told that there is some buffer overrun issue.