Peppy player

Hi,

I didn't try that myself but you can find a lot of pages on the Internet explaining how to make SSD working with Pi. SSD can be used either for audio files storage or for OS and files.

As for reliability, if you didn't enable file logging the player doesn't write that much data to SD. It writes the current player state to a log file only when you gracefully shutdown the player. So, if you do that once a day your SD card will last for about 10 years or so.

Best regards
 
I have been looking into the matter of booting Peppy from USB.
The procedure should be quite simple, you first have make sure a bit in OTP is set (only once in th elife of the device), then write tha image to a usb device with Win32DiskImager or Raspberry Pi Imager. When this is done you connect the USB device, remove the SD card and power up. Done this before and is neve an issue. However with the Peppy image things do not work. You see that a start is made but after that the device comes in a sort of loop showing the activitey led flashing in the same rythem forever..... Tried wit several USB dvices, both USB sticks and also SSD drives, but the outcome is the same. So I decided to try the normal Raspberry Pi OS Lite (Bullseye) on the same device. This work OK, starts up OK and gives me SSH access. So it looks like the Peppy image is missing something causing the startup to complete. Could it be that you stripped stuff out of the Lite OS to gain space or something like that?
 
Hi,

The player uses a regular Buster Lite OS. Probably there is something missing during the player startup which causes that loop.
I would recommend to use one of the Peppy disk images and run/boot as usual. Then disable player startup on boot by running commands:
sudo systemctl stop peppy
sudo systemctl disable peppy
Then create a new disk image from this one where you disabled the player startup:
https://github.com/project-owner/PeppyPlayers.doc/wiki/Disk-Images#disk-image-file-creation-process
Then boot from USB.

Another option - install a Legacy Buster Lite OS, boot from USB and then install the player manually:
https://github.com/project-owner/Peppy.doc/wiki/Expert
This approach needs more time.

Best regards
 
Hi there,

Thanks for letting me know that the Pepy image should not cause any USB-boot problem.
Also thank you for giving me pointers on how to find a solution for this matter.
As usual the information you provide is very detailed and accurate!
I will will take your advise and, over the weekend, I will see hoe far I get.

Thans again for your help and wishing you a good weekend.

Peter.
 
Hi,

So here are the initial findings of my attempt to use USB boot.
I first tried the 5" version of the Marc repository on my SSD drive. This fails when booting, same as described earlier.
Then I tried the headless version and to my surprize the device boots correctly from USB! (??)
With this version I started to make changes to the setup to enable the 5" Chinese screen with touch and enabling a USB sound dongle,. This all as I did with the Signac 5"version on SD-card earlier.
I am getting quite far, but one big issue is that both shutdown (via double click on the screen and via the webpage) and reboot via the webpag don't work. The screen freezes and no shutdown or reboot occur. The device still runs however as SSH remains active.
I believe the problem is that the software unmounts the USB drive and attempts to switch it off. However it cannot do so because the drive is still active.
I get this from the logfile which says (see the last enties):

sudo systemctl start peppy.service[2023-03-25 22:27:15,124] {switchutil.py:47} ERROR - SMBus error
[2023-03-25 22:27:15,125] {switchutil.py:56} DEBUG - 'switch'
[2023-03-25 22:27:15,353] {diskmanager.py:144} DEBUG - Device /dev/sda1 mounted already to /boot
[2023-03-25 22:27:15,353] {diskmanager.py:144} DEBUG - Device /dev/sda2 mounted already to /
[2023-03-25 22:27:15,357] {diskmanager.py:288} DEBUG - Started USB drive plug/unplug observer
[2023-03-25 22:27:15,893] {screensaverdispatcher.py:219} DEBUG - Get screensaver slideshow
[2023-03-25 22:27:15,938] {selector_events.py:53} DEBUG - Using selector: EpollSelector
[2023-03-25 22:27:15,985] {webserver.py:196} DEBUG - Web Server Started
[2023-03-25 22:27:16,225] {peppy.py:407} DEBUG - Audio Server Started
[2023-03-25 22:27:16,760] {collector.py:121} DEBUG - Collection database not found
[2023-03-25 22:27:19,428] {connectionpool.py:815} DEBUG - Starting new HTTPS connection (1): api.discogs.com:443
[2023-03-25 22:27:20,116] {connectionpool.py:393} DEBUG - https://api.discogs.com:443 "GET /database/search?type=mas$
[2023-03-25 22:28:11,237] {diskmanager.py:198} DEBUG - Successfully unmounted /dev/sda1
[2023-03-25 22:28:11,857] {diskmanager.py:221} DEBUG - Poweroff failed with error: Error powering off drive: The dri$
[2023-03-25 22:28:11,990] {diskmanager.py:195} DEBUG - Unmount failed with error: umount: /: target is busy.
[2023-03-25 22:28:12,419] {web.py:2243} INFO - 200 POST /command/reboot?save=true (192.168.123.45) 2045.60ms


Your view is appreciated.

Peter.
 
Hi,

It looks like the issue is in running the player as a service. You can disable the player as a service using these two commands:
sudo systemctl stop peppy
sudo systemctl disable peppy

To start the player on boot not as a service add the following line to the file /etc/rc.local:
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'

You also need to change the reboot function in the peppy.py:
https://github.com/project-owner/Peppy/blob/3f1651587528bad2a4789b81f5f0ae979d2e2c7c/peppy.py#L2815
to this one:
Python:
    def reboot(self, save=True):
        """ Reboot player
        
        :param save: True - save current player state before reboot, False - reboot w/o saving
        """

        self.pre_shutdown(save)

        if self.config[LINUX_PLATFORM]:
            subprocess.call("sudo reboot", shell=True)
        else:
            self.shutdown_windows()

Best regards
 
Hi.

Thanks again for your very prompt reaction!
Must say that I did not try you last suggestion any more because I decided I will drop the idea of using USB boot.
Mostly because the changes from the stock version are getting pretty big and that may bite in case of future version updates.
Your earlier reassurance that there is little worry for the life expectancy of the SD card due to limited write operations, did help to get to this point.

So thanks again for your assisatance and maybe I will come up with other weird ideas in the future.......:ROFLMAO:

Take care,

Peter.
 
I'm having a problem with the first start of Peppy.

Here's what I'm seeing:

raspyadmin@raspberrypi:~/Peppy $ sudo python peppy.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "/home/raspyadmin/Peppy/peppy.py", line 30, in <module>
from event.dispatcher import EventDispatcher
File "/home/raspyadmin/Peppy/event/dispatcher.py", line 22, in <module>
from util.config import *
File "/home/raspyadmin/Peppy/util/config.py", line 28, in <module>
from util.collector import GENRE, ARTIST, ALBUM, TITLE, DATE, TYPE, COMPOSER, FOLDER, FILENAME
File "/home/raspyadmin/Peppy/util/collector.py", line 27, in <module>
from mutagen import File
ModuleNotFoundError: No module named 'mutagen'

Any ideas where I might have screwed up?
 
New version (Klimt Edition) of the Peppy Player was released today.

The disk images with the new release are available here:
https://github.com/project-owner/PeppyPlayers.doc/wiki/Disk-Images

Here are the main features of the new release:

- Added new mode - Archive. It allows to search and play audio files from the Internet Archive web site.
https://github.com/project-owner/Peppy.doc/wiki/Archive

archive.jpg


- Refactored the Voise Assistant. Now it can work offline. By default two language models have been provided for English and German. The models for the other supported languages can be downloaded from the Internet using the Configuration Web UI.
Using the voice commands it's possible to search and play files from a file system and collection.
https://github.com/project-owner/Peppy.doc/wiki/Voice-Assistant

va-flow.png


- Refactored icons. Created a new lightweight set of icons.
https://github.com/project-owner/Peppy.doc/wiki/Icons

line-icons.jpg


- Fixed the Horoscope screensaver:
https://github.com/project-owner/Peppy.doc/wiki/Horoscope

horoscope-3.jpg


- Implemented default ALSA device selection.
https://github.com/project-owner/Peppy.doc/wiki/Audio-Device

audio-device.png


- Improved the on-screen keyboard functionality

- Fixed radio favorites issue.
 
  • Like
Reactions: 1 user
Hi,

I would recommend to use the latest version - Klimt Edition.

Which touchscreen do you use? Could you provide the link to its description? The player disk images have been prepared for specific displays. If you use different display then more likely you need some adjustments. For example, to rotate the screen you can try to modify the property 'display_rotate' in the /boot/config.txt file (at the bottom of the file). You can try to use values 1, 2, 3, 4 or remove that property at all.

Regarding connection issue, you need to use a wired connection. If you don't know an IP address of your Pi then you can just specify the name 'raspberrypi' when you are trying to connect to your Pi over SSH (port 22) for example using the program 'putty'. The username is 'pi' and password is 'Marc' if you use the Marc Edition. When you are connected you can edit the file /boot/config.txt using the command:
sudo nano /boot/config.txt

Best regards
 
Last edited:
Thanks.
I'm using the Raspberry Pi 7" touchscreen: https://www.raspberrypi.com/products/raspberry-pi-touch-display/

Just for reference, when I booted the vanilla Raspberry Pi OS image (Bullseye, I think), everything worked fine. The screen was right-side up and WiFi worked after the initial setup. So, I'm pretty sure I don't have any hardware issues.

I'll try a wired network and change the screen orientation as instructed.
 
I spoke too soon. There are a couple of things that either are not working or that I don't understand.

The main thing is Podcasts.
The default podcast feed list is on the playlist config page, but I don't understand how to access the Podcasts.
The Podcasts page off of the Home menu is empty. Is there something I need to enable?

Another thing that seems to be almost working is the Weather screensaver.
It gets fresh data when I power up the RPi, but it doesn't update at all after that. Any idea why that is happening?
 
Hi,

The Podcasts mode should be enabled by default. So, there is no need to enable anything else.
You just click on 'Podcasts' in the Home menu. That will bring you to the Podcats player. To start playing a podcast you need to click on the CD image and select podcast/episode. First, you select podcast, the player will load episodes and then you select an episode. You can also remove default podcasts and add your own ones. I've just tested that with Klimt Edition and everything worked as expected.

Regarding the Weather screensaver, usually free web services have a limit on the number of requests to their services. If that number exceeds some threshold the requests will be blocked for some period of time. To avoid this kind of situation the screensaver doesn't update weather data too often. Weather doesn't change that often anyway :) But you can get your own API key for that Weather service and specify your own refresh period in the configuration file.

Best regards