Peppy WebRadio

Heute ist Stammtischzeit:
Jeden Donnerstag 20:30 Uhr hier im Chat.
Wer Lust hat, kann sich gerne beteiligen. ;)
  • Hallo homer2009,

    der Codeblock ist nicht notwendig für Zitate oder normalen Text. Codeblock ist wichtig für

    • Terminaleingaben uns -Ausgaben
    • Skripte
    • Textdateien

    peppy.player hat in Beitrag #1088 geschrieben, wie das Waveshare 3.5 LCD(B) Rev.2.0 zu installieren ist.

    Aber der Aufruf unterscheidet sich, je nachdem ob man eine Kommandozeilen-Obefläche oder eine grafische Oberfläche verwendet.

    BetriebssystemAufruf
    Kommandozeilen-OberflächeRaspberry Pi OS - Lite./LCD35B-show-V2 lite
    grafische OberflächeRaspberry Pi OS with desktop./LCD35B-show-V2

    Für den Peppy Player verwendest Du die Kommandozeilen-Oberfläche

    1. folgende Datei muß vorhanden sein: /boot/overlays/waveshare35b-v2.dtbo
    2. zeige bitte deine /boot/config.txt in einem Codeblock (mit Button )

    Schönen Gruß, kle

    -----------------

    Hi homer2009,

    the codeblock is not necessary for quotes or normal text. Codeblock is important for

    • terminal inputs and outputs
    • scripts
    • Text files

    peppy.player wrote in post #1088 how to install the Waveshare 3.5 LCD(B) Rev.2.0.

    But the call differs depending on whether you use a command line interface or a graphical interface.

    Operating systemcall
    command line interfaceRaspberry Pi OS - Lite./LCD35B-show-V2 lite
    graphical user interfaceRaspberry Pi OS with desktop./LCD35B-show-V2


    For the Peppy Player you use the command line interface

    1. the following file must exist: /boot/overlays/waveshare35b-v2.dtbo
    2. please show your /boot/config.txt in a code block (with button )

    Regards, kle

    --------------------

    Translated with http://www.DeepL.com/Translator (free version)

  • Hallo homer2009,

    du bist hier im deutschen Raspberry Pi Forum. Weil die allermeisten Benutzer deutsch sprechen wird hier im Forum in deutsch geschrieben. Dieses Thema "Peppy WebRadio" ist eine Ausnahme. Weil peppy.player, der Author des Peppy Players, besser englisch als deutsch spricht, hat Hyle (Mod.) in diesem Thema vorgeschlagen die Beiträge in deutsch und in englisch zu schreiben.

    Mit DeepL kannst du deine polnischen Beiträge in deutsch und englisch übersetzen.

    I have connected the waveshare 3.5inch RPi LCD (B) Rev2.0 display. Everything started only on the display, the colors are not reproduced correctly. What needs to be done to correct it

    • Für Waveshare 3.5inch LCD(B) Rev2.0:
      Das overlay in config.txt ist korrekt: dtoverlay=waveshare35b-v2
      die dazugehörige Datei ist vorhanden /boot/overlays/waveshare35b-v2.dtbo
    • Solltest du noch ein altes Waveshare 3.5inch LCD(B) haben?
      (das wird mit ./LCD35B-show lite installiert)
      in config.txt: dtoverlay=waveshare35b
      overlay Datei /boot/overlays/waveshare35b.dtbo

    Schönen Gruß, kle

    --- english -------------------------------------------

    Hi homer2009,

    you are here in the German Raspberry Pi forum. Because most of the users speak German, the forum is written in German. This topic "Peppy WebRadio" is an exception. Because peppy.player, the author of the Peppy Player, speaks better English than German, Hyle (Mod.) suggested in this Thread to write the posts in German and in English.

    With DeepL you can translate your polish posts into english and german.

    I have connected the Waveshare 3.5inch RPi LCD (B) Rev2.0 display. Everything started only on the display, the colors are not reproduced correctly. What needs to be done to correct it

    • For Waveshare 3.5inch LCD(B) Rev2.0:
      The overlay in config.txt is correct: dtoverlay=waveshare35b-v2
      the corresponding file exists /boot/overlays/waveshare35b-v2.dtbo.
    • Should you still have an old Waveshare 3.5inch LCD(B)?
      (that is installed with ./LCD35B-show lite)
      in config.txt: dtoverlay=waveshare35b
      overlay file /boot/overlays/waveshare35b.dtbo

    Best regards, kle

    Translated with http://www.DeepL.com/Translator (free version)

  • Hallo,

    ich habe Peppy Player schon ein paar mal erfolgreich installiert. Aber gerade habe ich ein Problem und komme nicht richtig dahinter. Ich habe schon einige Male die Anleitung befolgt.

    Ich installiere das aktuelle Image für Raspberry PI OS Lite von https://www.raspberrypi.com/software/operating-systems/

    Dann folge ich den wesentlichen Schritten, die wo auf https://github.com/project-owner/Peppy.doc/wiki/Expert genannt sind. Da ich das Radio als Headless aufsetze verzichte auf die Schritte für LCD, Drehregler sowie Spotify und Airport, die ich ebenfalls nicht benötige. Da 'Bluealsa' im aktuellen Repo regulär nicht verfügbar ist, habe ich die Version aus testing installiert.

    Da das webinterface nicht erreichbar war, habe ich dann mal manuell per "python peppy.py" und erhalte zunächst folgende Fehlermeldung:


    pi@raspberrypi:~/Peppy $ 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/pi/Peppy/peppy.py", line 34, in <module>

    from ui.screen.radiogroup import RadioGroupScreen

    File "/home/pi/Peppy/ui/screen/radiogroup.py", line 20, in <module>

    from ui.screen.menuscreen import MenuScreen

    File "/home/pi/Peppy/ui/screen/menuscreen.py", line 22, in <module>

    from ui.factory import Factory

    File "/home/pi/Peppy/ui/factory.py", line 32, in <module>

    from util.util import IMAGE_VOLUME, V_ALIGN_CENTER, H_ALIGN_CENTER, IMAGE_TIME_KNOB, KEY_HOME, KEY_PLAYER

    File "/home/pi/Peppy/util/util.py", line 42, in <module>

    from util.imageutil import ImageUtil, EXT_MP4, EXT_M4A

    File "/home/pi/Peppy/util/imageutil.py", line 33, in <module>

    from svg import Parser, Rasterizer

    ImportError: cannot import name 'Parser' from 'svg' (/home/pi/.local/lib/python3.9/site-packages/svg/__init__.py)


    raspblock

  • Hallo,

    der Peppy Player funktioniert z.Z nicht mit bullseye (debian 11.*).

    Das liegt daran, daß dort python3.9.* installiert ist und und die Grafik mit pynanosvg aufbereitet wird.

    pynanosvg funktioniert bis python3.7 (oder auch 3.8, das habe ich nicht getestet).

    Versuche python3.7 in bullseye zu installieren, damit könnte es funktionieren.

    Vergiß nicht pythgon3.7 anstatt python3 zu verwenden

    Schönen Gruß, kle

    --- english -------------------

    the Peppy Player does not work with bullseye (debian 11.*).

    This is because python3.9.* is installed there and the graphics are prepared with pynanosvg.

    pynanosvg works up to python3.7 (or even 3.8, I didn't test that).

    Try to install python3.7 in bullseye, that might work.

    Remember python3 is python3.9.*, use python3.7 for Peppy Player

    Regards, kle

    Edit: hyle das gleiche Problem muß veloci für NewTron Radio lösen. Ich kenne keine Alternative zu pynanosvg (Cairo ist viel zu mächtig).

    2 Mal editiert, zuletzt von kle (15. November 2021 um 16:19)

  • hyle , leider die selbe fehlermeldung.

    kle, habe es ausprobiert..

    zuerst habe ich python 3.7.9 installiert mit den hier beschriebenen schritten: https://tecadmin.net/install-python-3-7-on-ubuntu-linuxmint/

    dann funktionierte es immer noch nicht. nach dem deinstallieren von python und nochmal installieren von python 3.7.9 fehlen mir nun auch zusätzliche python-komponenten, wie 'config'.

    Es ist wohl zum gegenwärtigen Zeitpunkt das beste weiter auf Buster zu setzen. Mit Bullseye gibt es ja eine Reihe von Änderungen, die eventuell zu berücksichtigen wären.

    Ich habe es trotz Installation von Buster nicht hinbekommen. Peppy player startet nicht und die Log-Datei peppy.log bleibt auch leer.

    3 Mal editiert, zuletzt von raspclock (17. November 2021 um 15:20)

  • Guten Abend forum Nutzer,

    Habe ein Problem mit dem Peppy Player in Verbindung mit dem HifiBerry DAC+ RCA. Bekomme kein Ton beim Player. Könnte mir da jemand Helfen?

    Touchscreen funktioniert Prima. Ton erhalte ich nur über aplay.

    aplay -l

    Code
    **** List of PLAYBACK Hardware Devices ****
    card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplus], device 0: HiFiBerry DAC+ HiFi pcm512x-hifi-0 [HiFiBerry DAC+ HiFi pcm512x-hifi-0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
  • Elperator,

    Ich gehe davon aus das deine DAC noch auf mute steht schaue bitte mal in den beiden Beiträgen nach, hier wurde dies schon einmal erklärt.

    #653 und #672

    Gruß Alex

    ___________________

    Elperator,
    I'm assuming that your DAC is still on mute, please take a look at the two posts, this has already been explained here.
    # 653 and # 672

    Regards Alex

  • Guten Abend zusammen,

    kann mir jemand bei folgendem Problem helfen:

    Ich möchte gerne die in peppyalsa produzierten VU-Signale über UART des RaspberryPi an einen Arduino senden. (Wie im Wiki beschrieben: Serial VU-Meter ) In der config.txt des peppymeter screensavers habe ich das Serial interface aktiviert und die korrekten Daten unter Serial.Interface eingetragen:

    [current]

    meter = random

    random.meter.interval = 20

    screen.size = large

    output.display = True

    output.serial = True

    output.i2c = False

    output.pwm = False

    output.http = False

    output.websocket = False

    use.logging = False

    frame.rate = 30

    [serial.interface]

    device.name = /dev/serial0

    baud.rate = 9600

    include.time = True

    update.period = 0.1

    Sobald ich jetzt Peppy starte, fährt die WEB-UI nicht mehr hoch (kein Zugriff über WEB mehr) und der 7"-Bildschirm bleibt schwarz. Schalte ich unter [current] den EIntrag output.serial auf False, funktioniert alles wieder.

    Starte ich Peppy direkt aus der ssh-Konsole mit python3 peppy.py (Vorher das DISPLAY exportiert mit export DISPLAY=:0) startet Peppy zwar. Wenn ich aber via WEB darauf zugreifen will, kommt:

    [2021-11-22 20:18:10,978] {web.py:2243} INFO - 304 GET /fonts?current (192.168.1.24) 5.63ms

    [2021-11-22 20:18:10,990] {web.py:2243} INFO - 101 GET /ws (192.168.1.24) 3.89ms

    [2021-11-22 20:18:10,991] {websockethandler.py:42} DEBUG - Added web client

    [2021-11-22 20:18:10,997] {web.py:1793} ERROR - Uncaught exception GET /ws (192.168.1.24)

    HTTPServerRequest(protocol='http', host='192.168.1.56:8123', method='GET', uri='/ws', version='HTTP/1.1', remote_ip='192.168.

    1.24')

    Traceback (most recent call last):

    File "/home/pi/.local/lib/python3.7/site-packages/tornado/websocket.py", line 647, in _run_callback

    result = callback(*args, **kwargs)

    File "/home/pi/Peppy/web/server/handlers/websockethandler.py", line 48, in on_message

    self.handle_command(d)

    File "/home/pi/Peppy/web/server/handlers/websockethandler.py", line 68, in handle_command

    self.redraw_web_ui()

    File "/home/pi/Peppy/web/server/webserver.py", line 143, in redraw_web_ui

    self.send_json_to_web_ui(self.screen_to_json())

    File "/home/pi/Peppy/web/server/webserver.py", line 177, in screen_to_json

    current_screen = self.peppy.current_screen

    AttributeError: 'Peppy' object has no attribute 'current_screen'

    [2021-11-22 20:18:11,005] {websockethandler.py:55} DEBUG - Removed web client

    Woran kann es liegen?

    Viele Grüße

    Stefan

    Einmal editiert, zuletzt von repman (22. November 2021 um 20:32)

  • OK, and in English:

    Good Evening,

    I need some help regarding the following problem:

    I would like to compute the VU signals produced by peppyalsa on an arduino with neopixels . The arduino will be attached on RXD and TXD of the raspberry pi UART. (Simular situation as described in the wiki : Serial VU-Meter , nixie project of Tobias). In the moment the arduino is not connected yet. In config.txt of the peppymeter screensaver I activated the serial interface as follows:

    [current]

    meter = random

    random.meter.interval = 20

    screen.size = large

    output.display = True

    output.serial = True

    output.i2c = False

    output.pwm = False

    output.http = False

    output.websocket = False

    use.logging = False

    frame.rate = 30

    [serial.interface]

    device.name = /dev/serial0

    baud.rate = 9600

    include.time = True

    update.period = 0.1

    BUT: As soon as I start Peppy with this config file, the web interface does not come up anymore (no access via browser UI nor touchscreen UI). The attached 7-inch screen does not show the peppy interface. If I do switch the entry output.serial to False in [current] section everything works again as expected.

    If I start Peppy from the ssh terminal with python3 peppy.py (after export DISPLAY=:0) Peppy starts but there is no acces via the web interface either. The following error appears:

    [2021-11-22 20:18:10,978] {web.py:2243} INFO - 304 GET /fonts?current (192.168.1.24) 5.63ms

    [2021-11-22 20:18:10,990] {web.py:2243} INFO - 101 GET /ws (192.168.1.24) 3.89ms

    [2021-11-22 20:18:10,991] {websockethandler.py:42} DEBUG - Added web client

    [2021-11-22 20:18:10,997] {web.py:1793} ERROR - Uncaught exception GET /ws (192.168.1.24)

    HTTPServerRequest(protocol='http', host='192.168.1.56:8123', method='GET', uri='/ws', version='HTTP/1.1', remote_ip='192.168.

    1.24')

    Traceback (most recent call last):

    File "/home/pi/.local/lib/python3.7/site-packages/tornado/websocket.py", line 647, in _run_callback

    result = callback(*args, **kwargs)

    File "/home/pi/Peppy/web/server/handlers/websockethandler.py", line 48, in on_message

    self.handle_command(d)

    File "/home/pi/Peppy/web/server/handlers/websockethandler.py", line 68, in handle_command

    self.redraw_web_ui()

    File "/home/pi/Peppy/web/server/webserver.py", line 143, in redraw_web_ui

    self.send_json_to_web_ui(self.screen_to_json())

    File "/home/pi/Peppy/web/server/webserver.py", line 177, in screen_to_json

    current_screen = self.peppy.current_screen

    AttributeError: 'Peppy' object has no attribute 'current_screen'

    [2021-11-22 20:18:11,005] {websockethandler.py:55} DEBUG - Removed web client

    Any ideas to solve that? I need the peppyalsa export of the data via UART to drive my neopixel VU-meter.

    Does anyone use this peppymeter UART functionality with success?

    Best regards

    Stefan

  • Hallo Stefan,

    Ich habe gerade die neueste Renoir Edition auf dem Pi 4 mit dem offiziellen 7"-Display getestet. Ich habe output.serial = True gesetzt und ich konnte den Player starten und die Benutzeroberfläche sehen.

    Welches Display verwendest du? Ist es an GPIO angeschlossen? Sind Sie sicher, dass es nicht die serielle Schnittstelle verwendet?

    Die Standardeinstellungen für das VU-Meter funktionieren nur für den Bildschirmschoner. Wenn Sie also den Bildschirmschoner stoppen, fließen die Daten nicht über die serielle Schnittstelle. Wenn Sie möchten, dass die Daten ständig über die serielle Schnittstelle fließen, müssen Sie die folgende Eigenschaft in der Konfigurationsdatei des Players auf True setzen:

    https://github.com/project-owner/…/config.txt#L21

    Mit freundlichen Grüßen

    --------------------------------------------------------------------------------------

    Hi Stefan,

    I've just tested the latest Renoir Edition running on Pi 4 with the official 7" display attached to it. I set output.serial = True and I was able to start player and see UI.

    Which display do you use? Is it connected to GPIO? Are you sure that it doesn't use the serial interface?

    The default settings for the VU Meter work only for the screensaver. So if you stop screensaver the data will not go through the serial interface. If you need the data flow through the serial interface all the time you need to set the following property in the player config file to True:

    https://github.com/project-owner/…/config.txt#L21

    Best regards

    Peppy Player Entwickler. Ehemaliger DESY (Hamburg) Entwickler :)

  • Hello peppy.player,

    thanks for the quick response!

    I've just tested the latest Renoir Edition running on Pi 4 with the official 7" display attached to it. I set output.serial = True and I was able to start player and see UI.


    Which display do you use? Is it connected to GPIO? Are you sure that it doesn't use the serial interface?

    The default settings for the VU Meter work only for the screensaver. So if you stop screensaver the data will not go through the serial interface. If you need the data flow through the serial interface all the time you need to set the following property in the player config file to True:

    https://github.com/project-owner/…/config.txt#L21

    I started with renoir headless on a RPi 3B+ with hifiberry amp+ and added my screen and hifi in /boot/config.txt. My display is a Watterott 7" touchdisplay. The display is only attached via HDMI, touch function is disabled (means not connected) in the moment. So there is no serial interface connected to the display. Peppy player starts normal, everything is fine until I set output.serial = True in peppymeter/config.txt. If I set it back to False it works again.

    The serial communication to the arduino works in principle: if I send data via minicom to the arduino it receives themand vice versa.

    The data flow is enabled as vu_meter is set to true already.

    Is there another log file I should check? What does the above mentioned error message mean 'Peppy' object has no attribute 'current_screen'.

    Ideas and help to solve the issue is appreciated!

    Here a first impression of my player:

    You can see the neopixel rings around the speakers.

    Regrads

    Stefan

  • Hallo Stefan,

    Du hast ein interessantes Projekt. Das Design ist sehr nah an der ursprünglichen Peppy-Player und Neopixel ist eine schöne Ergänzung. Bitte lass mich wissen, wenn du das Projekt fertiggestellt hast. Ich werde es gerne in die Galerie stellen.

    Ich habe meine Installationsanweisungen überprüft und es sieht so aus, als ob ich die Bibliothek für die serielle Schnittstelle (python3-serial) nur an einer Stelle erwähnt habe:

    https://github.com/project-owner/…c/wiki/Headless

    Haben Sie sie installiert?

    pip3 install python3-serial

    Das ist wahrscheinlich der Grund für Ihre Probleme.

    Beste Grüße.

    ----------------------------------------------------------------------------------

    Hi Stefan,

    You have interesting project. The design is very close to the original Peppy player and neopixel is a nice addition. Please let me know when you finish the project. I'll be glad to place it in the Gallery.

    I've checked my installation instructions and it looks like I mentioned about the library for the serial interface (python3-serial) only in one place:

    https://github.com/project-owner/…c/wiki/Headless

    Did you install it?

    pip3 install python3-serial

    That's probably the reason for your issues.

    Best regards.

    Peppy Player Entwickler. Ehemaliger DESY (Hamburg) Entwickler :)

  • Hallo peppy.player!

    the python3-serial is installed. After deactivating the touchscreen in config.txt the VU-meter works over serial. I have to tune the arduino side now to display different kind of patterns and colors. Of course I will come up with some videos and fotos if everything works so far.

    One question I still have: The VU-meter data send via peppymeter seem to be independent from the volume that is adjusted. There is no relation between loadness and intensity of the data, right?

    I was thinking about show some overdrive if the volume is too high but my values look completely irrespective of the volume.

    Thanks again for your great enthusiasm in this project

    Regards

    Stefan

  • Hallo Stefan,

    Lass uns die Regeln dieses Forums nutzen und Nachrichten auf Deutsch und optional auf Englisch posten.

    Ich bin mir nicht sicher, wie das "Touchscreen"-Flag mit dem seriellen Signal in Verbindung gebracht werden kann.

    Du kannst versuchen, den Lautstärkeregelungstyp 'player' anstelle von 'amixer' zu verwenden:

    https://github.com/project-owner/…config.txt#L166

    Ich denke, in diesem Fall hängt die Amplitude von der Lautstärke des Lautstärkereglers ab.

    Soweit ich mich erinnere, gab es auch eine Möglichkeit, dies in ALSA zu tun. Ich erinnere mich aber nicht mehr daran. Vielleicht kann sich jemand in diesem Forum daran erinnern.

    Und schließlich kann man das serielle Signal anhand des aktuellen Lautstärkepegels skalieren. Aber das muss noch implementiert werden.

    Mit freundlichen Grüßen.

    ---------------------------------------------------------------------------

    Hi Stefan,

    Let's use the rules of this forum and post messages in German and optionally in English.

    I'm not sure how 'touchscreen' flag can be related to the serial signal.

    You can try to use 'player' volume control type instead of 'amixer':

    https://github.com/project-owner/…config.txt#L166

    I think in this case the amplitude will depend on the level of your volume control.

    As far as I remember there was also a way to do that in ALSA. Though I don't remember it. Maybe someone in this forum could remind.

    And finally you can scale the serial signal using the current volume level. But that needs some implementation.

    Best regards.

    Peppy Player Entwickler. Ehemaliger DESY (Hamburg) Entwickler :)

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!