Peppy player

I followed the instructions to disable the rpi-backlight functionality in the player and it seems to have resolved my problem. My Pi remains responsive using either a hard-wired or WiFi connection.

I have a very different question now. Has anyone through about making the GUI user-friendly for the visually impaired? I have an older family member with eye issues and he has a short list of streaming radio stations that he likes. Is there a easy to only have a single genre show-up show he doesn't get lost trying to find his stations? I disabled all the screensavers except for the clock which he likes at 85% size, since he can see it.

Is there a way to streamline the GUI for situations like this?

Frank
 
Hi Frank,

Hopefully that issue will not come back.

Regarding a separate playlist, there are several ways to achieve that.

1. You can use one of the existing genres, remove all existing stations from the playlist (stations.m3u) and add your own stations. Here is the example of one of the playlists: https://github.com/project-owner/Pe...SA/radio-stations/Genre/Children/stations.m3u
Each radio station has two lines in the playlist: the station title (appears on top of UI) and the link to the station stream. The filename of the image which will appear in UI for the station should be the same as the station title. For example for the station 'Rock the Cradle' the filename should be 'Rock the Cradle.png'. The image is not required. If there is no image then the default one will be used. Though it's easier to identify station using different images. The image should be placed in the same folder as the playlist.

2. Create favorites: https://github.com/project-owner/Peppy.doc/wiki/Radio-Favorites
In this case the separate playlist file favorites.m3u will be created in folder /home/pi/Peppy/languages/English-USA/radio-stations/Genre

3. Create your own folder, for example /home/pi/Peppy/languages/English-USA/radio-stations/Genre/Frank
and create playlist file (stations.m3u) and image files in that folder. The new folder will show up in the Genres menu.

You can also increase the size of images in the stations menu by changing 'File Browser' parameters:
https://github.com/project-owner/Peppy.doc/wiki/File-Menu
Despite the name they are also applicable for the radio station menu as well.
For example, set 6 images per screen in the stations menu without any text (station name):
...
hide.folder.name = True
...
rows = 2
columns = 3

I hope it will help.
 
New version (Cezanne Edition) of the Peppy Player was just released.

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 - YouTube Audio Streams (YA Streams). It allows to listen to YouTube audio streams.
https://github.com/project-owner/Peppy.doc/wiki/YA-Streams

ya-streams-png.1071056


- Created new screensaver - Pexels. The screensaver will display pictures from the Pexels web sites (www.pexels.com) using user-defined topics (e.g. nature, animals, city etc.)
https://github.com/project-owner/Peppy.doc/wiki/Pexels

pexels.jpg


- Refactored the Spectrum Analyzer screensaver. It became more customizable.
https://github.com/project-owner/Peppy.doc/wiki/Spectrum-Analyzer

spectrum.png


- Introduced new configuration parameter 'dns.ip' which is used to validate the Internet connection.

- Fixed streaming functionality. It's possible to use Peppy Player as a streaming server again.

- Refactored the playlists in the Configuration Web UI.

ple-1.png


- Fixed the issues with Bluetooth, radio favorites, podcasts, album art and lyrics.
 

Attachments

  • ya-streams.png
    ya-streams.png
    10.1 KB · Views: 796
New version (Seurat Edition) of the Peppy Player was just released.

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:

- Created new screensaver - Monitor. It shows information about CPU, Memory and Disk usage on host computer.
https://github.com/project-owner/Peppy.doc/wiki/Monitor

monitor-1.png


- Created new screensaver - Horoscope. It shows daily horoscopes for 12 zodiac signs.
https://github.com/project-owner/Peppy.doc/wiki/Horoscope

horoscope.png


- Created new screensaver - Stock. It fetches the current information about specified stocks.
https://github.com/project-owner/Peppy.doc/wiki/Stock

stock-1.png


- Added ability to use Album Art as a screen background.

b-7.png


- The player can be started as a service now.

- Fixed audiobooks issues, YA Streams issue, volume issue after switching from the AirPlay mode and Home Navigator issue.
 
Hi

A long time i did nothing with Peppy.
Now the auto start is killing me again.
No matter what way of auto start i try its always:
line 21 in <module>
import pygame
ModuleNotFoundError: No module named pygame

If i start Peppy with
~$ cd /home/haegarthehorrible/opt/Peppy
~$ openvt -s -- python3 peppy.py
over SSH (putty) it works and peppy shows up on the connected HDMI screen.

With peppy.service i get the module not found error and:
~$ sudo systemctl status peppy.service
× peppy.service - Peppy
Loaded: loaded (/etc/systemd/system/peppy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-10-22 16:01:19 UTC; 5min ago
Process: 2954 ExecStart=openvt -s -w -- python3 peppy.py (code=exited, status=8)
Main PID: 2954 (code=exited, status=8)
CPU: 253ms

Oct 22 16:01:19 LISA systemd[1]: peppy.service: Scheduled restart job, restart counter is at 5.
Oct 22 16:01:19 LISA systemd[1]: Stopped Peppy.
Oct 22 16:01:19 LISA systemd[1]: peppy.service: Start request repeated too quickly.
Oct 22 16:01:19 LISA systemd[1]: peppy.service: Failed with result 'exit-code'.
Oct 22 16:01:19 LISA systemd[1]: Failed to start Peppy.

I did install pygame with:
~$ python3 -m pip install -U pygame==1.9.6
Python is 3.8.9 and
~$ python3
>> import pygame
does work.

Its Armbian Ubuntu 22.04.1 LTS on a Odroid C2
 
Hmm, your environment looks OK to me.

Did you try to start the player using the "old" approach from the /etc/rc.local file without service?

Could you try to run command 'from svg import Parser' in python3? I know that Python 3.9 has the issue with pynanosvg library and there is no workaround at the moment. Therefore I still use Python 3.7 on all disk images. I'm not sure about Python 3.8.

Do you have both pip and pip3?
 
It looks like you can import from the 'svg' module. That means that pynanosvg was installed properly.

To check that you have pip3 just run it from command line: pip3 --version

How do you start player? Do you use /etc/rc.local or peppy.service? For the former you need this line in the /etc/rc.local file:
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'
The peppy.service should be disabled in this case.
If you use peppy.service the line which starts player in the /etc/rc.local should be commented out.
 
It doesn't matter if i use rc.local or peppy.service.
I tried 3.7.0 and the behavior is the same.

Here is what i did:
Code:
---------------------------------------------------
Configure autologin
---------------------------------------------------
~$ sudo nano /etc/systemd/logind.conf
>> CHANGE <<
#NAutoVTs=6
>> TO <<
NAutoVTs=1

~$ sudo usermod -a -G tty haegarthehorrible
~$ sudo nano /lib/udev/rules.d/50-udev-default.rules
>> CHANGE <<
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
>> TO <<
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

~$ sudo systemctl edit getty@tty1
>> ADD THIS TO THE FILE <<
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin haegarthehorrible --noclear %I 38400 linux
>> ADD THIS TO THE FILE <<

~$ sudo systemctl enable getty@tty1.service
~$ sudo shutdown -r now

---------------------------------------------------
Install independent Python 3
---------------------------------------------------
~$ cd /tmp
~$ wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
~$ tar zxvf Python-3.7.0.tgz
~$ cd Python-3.7.0
~$ ./configure --enable-optimizations --prefix=$HOME/opt/python-3.7.0
~$ make
~$ make install

~$ cd ~
~$ nano .profile
>> ADD THIS TO THE FILE <<
#Python path
export PATH=$HOME/opt/python-3.7.0/bin:$PATH
>> ADD THIS TO THE FILE <<

~$ . ~/.profile
~$ which python3
   /home/haegarthehorrible/opt/python-3.7.0/bin/python3
~$ python3 --version
   Python 3.7.0

---------------------------------------------------
Install Python packages for Peppy
---------------------------------------------------
~$ cd /home/haegarthehorrible/opt/python-3.7.0

~$ python3 -m pip install --upgrade pip
~$ python3 -m pip install --upgrade setuptools
~$ python3 -m pip install -U wheel
~$ python3 -m pip install -U pygame==1.9.6
~$ python3 -m pip install -U python-vlc
~$ python3 -m pip install -U python-mpv
~$ python3 -m pip install -U tornado
~$ python3 -m pip install -U discogs_client
~$ python3 -m pip install -U cython
~$ python3 -m pip install -U pynanosvg
~$ python3 -m pip install -U pgen
~$ python3 -m pip install -U oauth2
~$ python3 -m pip install -U feedparser
~$ python3 -m pip install -U mutagen
~$ python3 -m pip install -U pexpect
~$ python3 -m pip install -U Pillow
~$ python3 -m pip install -U smbus
~$ python3 -m pip install -U pyudev
~$ python3 -m pip install -U pyowm
~$ python3 -m pip install -U youtube-dl==2020.12.2
~$ python3 -m pip install -U pafy
~$ python3 -m pip install -U numpy
~$ python3 -m pip install -U psutil
~$ python3 -m pip install -U yfinance
~$ python3 -m pip install -U pyaztro

~$ python3
>>> import pygame
    pygame 1.9.6
    Hello from the pygame community. https://www.pygame.org/contribute.html
>>> quit()
 
Hmm, this is weird.
So, as you said this works fine:
Code:
~$ openvt -s -- python3 peppy.py
But when you start either from the /etc/rc.local or peppy.service it fails with message that pygame not found, right?
Somehow python3 cannot find installed libraries during startup. Just a wild guess - is it possible that you have several python3 symbolic links?
You can try to specify the absolute path to Python: $HOME/opt/python-3.7.0/bin/python in the /etc/rc.local or peppy.service to make sure that that version is used for the player.
 
Thanks.
Code:
openvt -s -w -- /home/haegarthehorrible/opt/python-3.7.0/bin/python3 peppy.py
works in peppy.service.
"-w" was missing

What does not work now is shutdown.
No matter if sudo shutdown -h nowover ssh or Peppy, i'm asked for the password on the connected screen.

Is the right way that i'm fully logged in after boot? So that i see haegarthehorrible@LISA:~$ on the screen?
 
OK stupid me was using sudo to shutdown. That's the reason i was ask for the password.

What Python do you use exactly?
3.7.0 or 3.7.9 or something in between?

Is the patched libsdl1.2 also needed for a headless Peppy that is controlled via Web UI with a touchscreen device (Tablet, Smartphone)?