Hauptmenü

[gelöst] MPD

Begonnen von Peter_Listig, 29 Januar 2022, 14:14:40

Vorheriges Thema - Nächstes Thema

Peter_Listig

Hallo,

habe mit neuem Raspbian Pi OS und MPD das Problem,
dass die Wiedergabe des Players nach ca 3 Sekunden
stoppt.

Neues OS
Meues Fhem
MPS ebenfalls neu

Vieln Dank für Hinweise


Peter
Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

Wernieman

Nimm für die Debugsuche bitte erstmal FHEM raus und steuer MPD mit Konsole (mpc). Kommt da das gleiche Problem?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Peter_Listig

Hallo Wernieman,

danke für den Ansatz - das Problem besteht leider auch da.

Ich habe Raspbian und Fhem noch mal neu installiert ...
Auf meinem Produktivsystem (Raspi3/Jessie) zeigt der Befehl mpd --version die Version Music Player Daemon 0.19.1 an.
Auf dem neuen System  kommt  -bash: mpd: Kommando nicht gefunden - also noch nicht installiert  ...

Kann ich die Installation mit "sudo apt-get install mpd mpc alsa-utils"  beginnen und dann entsprechend   https://wiki.fhem.de/wiki/MPD  durchführen oder gibt es für Raspbian Pi OS bezüglich "mpd mpc alsa-utils" einen anderen Installationsmodus ?

Es reicht, wenn ich die Richtung kenne - durchbeissen tue ich mich meistens alleine.

Nochmals Danke


Gruß Peter
Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

Wernieman

Du kannst wie immer bei Debian es so installieren. Raspian ist "nur" ein aufgebohrtes Debian ...
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Peter_Listig



hab's neu aufgesetzt - gleiches Ergebnis  >:(

Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

MadMax-FHEM

Zitat von: Peter_Listig am 30 Januar 2022, 01:55:55

hab's neu aufgesetzt - gleiches Ergebnis  >:(

Was neu aufgesetzt?

Raspbian OS: welche Version (und "Typ" : mit/ohne Desktop)

fhem: wie? debian.fhem.de - > the easy way? Manuell?

Hast du mpd per apt installiert?
Wie (genauer Befehl)?
Kamen Fehler?

Poste doch mal Ausgaben der Console!

Wir können ja deinen Bildschirm nicht sehen und auch nicht wissen was du tust...

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

Peter_Listig

Hallo Joachim,

aktuell ist diese Desktopversion meine Basis:


pi@raspi4:/ $ cat /etc/issue
Raspbian GNU/Linux 10 \n \l


und


pi@raspi4:/ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspi4:/ $


Fhem habe ich mit   sudo wget http://fhem.de/fhem-6.0.deb  /  sudo dpkg -i fhem-6.0.deb
installiert und auf Version 6.1.25220  upgedatet

Weitere Hardware (CULs Raspbee Rademacher USB-Stick)
iat noch nicht angeschlossen.

Zum Testen habe ich eine Playlist "Radiosender.m3u" angelegt.
Die hinterlegten Sender werden sauber und ohne Fehler wiedergegeben.

Zum besseren Verständnis:

Im Verzeichnis  "/var/lib/mpd/music/"  habe ich einige kurze mp3-Dateien
eingefügt - Klingeltöne und Ansagen - die von FHEM ausgegeben werden,
wenn es z.B.  an der Haustür läutet (mit Homematic Klingelsensor HM-Sen-DB-PCB
gekoppelt).

Das Ganze funtioniert auf dem Raspi3 (Aktivsystem) problemlos. Nur auf
dem Raspi4 wird ca. eine halbe Sekunde abgeschnitten.

Testweise habe ich ein Paar Musiktitel in das Verzeichnis kopiert - auch
hier das Gleiche ...

Auch auf der Konsole habe ich eine Playlist "Ringtones" angelegt und
eine Datei hinzugefügt. Sie wirde weder mit


mpc play 1


noch unter FHEM komplett ausgegeben.

Die einzelnen Dateien werden auf dem Desktop mit VLC (Internes Audio Analog Stereo)
komplett abgespielt.


Vielleicht fällt Dir oder anderen noch was dazu ein.

Gruß

Peter
Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

Wernieman

Wenn Du abspielst (und bitte OHNE Fhem-MPD-Module), was sagt dann "mpc stats" .. und zusätzlich wenn er nicht mehr abspielt.

- Mit welchem User läuft bei Dir der mpd?
- Hast Du einen besonderen Sounddeamon (abgesehen von alsa), z.B. pulsaudio/jack etc.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Peter_Listig

Hallo zusammen,

hier habe ich mal die Konfigurationen zusammengestellt:


mpd Status


pi@raspi4:/var/lib/mpd $ sudo nano /var/lib/mpd/state
sw_volume: 57
audio_device_state:1:My ALSA Device
state: stop
random: 0
repeat: 0
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: -1.000000
playlist_begin
0:ASAP-Milow.mp3
playlist_end
pi@raspi4:/var/lib/mpd/playlists $


Konfigurationsdatei in Auszügen


pi@raspi4:/var/lib/mpd $ sudo nano /etc/mpd.conf

# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
music_directory         "/var/lib/mpd/music"
#
#
# This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use
# playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled.
#
playlist_directory              "/var/lib/mpd/playlists"
#

........

# For network
bind_to_address         "localhost"
#
# And for Unix Socket
#bind_to_address                "/run/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port                           "6600"
#

...........

# This setting enables automatic update of MPD's database when files in
# music_directory are changed.
#
#auto_update    "yes"
#
# Limit the depth of the directories being watched, 0 means only watch
# the music directory itself.  There is no limit by default.
#
#auto_update_depth "3"
#
----------

# Audio Output ################################################################
#
# MPD supports various audio output types, as well as playing through multiple
# audio outputs at the same time, through multiple audio_output settings
# blocks. Setting this block is optional, though the server will only attempt
# autodetection for one sound card.
#
# An example of an ALSA output:
#
audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:1,0"        # optional
        mixer_type      "software"      # optional
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional




ab hier habe ich den Test


pi@raspi4:/var/lib/mpd/playlists $ mpc clear
volume: 57%   repeat: off   random: off   single: off   consume: off
pi@raspi4:/var/lib/mpd/playlists $




pi@raspi4:/var/lib/mpd/playlists $ mpc playlist
pi@raspi4:/var/lib/mpd/playlists $ mpc add ASAP-Milow.mp3
pi@raspi4:/var/lib/mpd/playlists $ mpc playlist
Milow - ASAP
pi@raspi4:/var/lib/mpd/playlists $ mpc play 1
Milow - ASAP
[playing] #1/1   0:00/2:58 (0%)
volume: 57%   repeat: off   random: off   single: off   consume: off
pi@raspi4:/var/lib/mpd/playlists $


Nach ca. 10 Sekunden ...


pi@raspi4:/var/lib/mpd/playlists $ mpc stats
Artists:      3
Albums:       0
Songs:       23

Play Time:    0 days, 0:07:05
Uptime:       0 days, 5:50:10
DB Updated:   Sun Jan 30 16:51:36 2022
DB Play Time: 0 days, 0:11:29
pi@raspi4:/var/lib/mpd/playlists $


Auffällig DB Updated - deshalb     mpc update


pi@raspi4:/var/lib/mpd/playlists $ mpc update
Milow - ASAP
[playing] #1/1   0:41/2:58 (23%)
Updating DB (#2) ...
volume: 57%   repeat: off   random: off   single: off   consume: off
pi@raspi4:/var/lib/mpd/playlists $


jedoch keine Änderung


pi@raspi4:/var/lib/mpd/playlists $ mpc stats
Artists:      3
Albums:       0
Songs:       23

Play Time:    0 days, 0:07:50
Uptime:       0 days, 5:50:54
DB Updated:   Sun Jan 30 16:51:36 2022
DB Play Time: 0 days, 0:11:29
pi@raspi4:/var/lib/mpd/playlists $


Service neu gestartet ...


pi@raspi4:/var/lib/mpd/playlists $ sudo service mpd restart
pi@raspi4:/var/lib/mpd/playlists $


Aber keine Änderung


pi@raspi4:/var/lib/mpd/playlists $ mpc stats
Artists:      3
Albums:       0
Songs:       23

Play Time:    0 days, 0:00:08
Uptime:       0 days, 0:00:07
DB Updated:   Sun Jan 30 16:51:36 2022
DB Play Time: 0 days, 0:11:29
pi@raspi4:/var/lib/mpd/playlists $


Nach dem Song-Ende


pi@raspi4:/var/lib/mpd/playlists $ mpc stats
Artists:      3
Albums:       0
Songs:       23

Play Time:    0 days, 0:01:15
Uptime:       0 days, 0:01:18
DB Updated:   Sun Jan 30 16:51:36 2022
DB Play Time: 0 days, 0:11:29
pi@raspi4:/var/lib/mpd/playlists $


Die letzten Zeilen des Logfiles ...


pi@raspi4:/var/lib/mpd $ tail -8 /var/log/mpd/mpd.log
Jan 30 23:19 : client: [12] closed
Jan 30 23:31 : client: [13] opened from local
Jan 30 23:31 : client: [13] closed
Jan 30 23:31 : client: [14] opened from 127.0.0.1:46052
Jan 30 23:31 : client: [14] closed
Jan 30 23:31 : player: played "Posteinwurf.mp3"
Jan 30 23:32 : client: [15] opened from 127.0.0.1:46056
Jan 30 23:32 : client: [15] closed
pi@raspi4:/var/lib/mpd $



Unterschiedlich sind Raspi3


pi@raspi3:~ $ cat /proc/asound/cards
0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
pi@raspi3:~ $


und Raspi4


pi@raspi4:~ $ cat /proc/asound/cards
0 [b1             ]: bcm2835_hdmi - bcm2835 HDMI 1
                      bcm2835 HDMI 1
1 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                      bcm2835 Headphones
pi@raspi4:~ $


bezüglich der Ausgänge

Ausserdem konnte ich nur die erste dieser beiden Anweisungen ausführen


sudo modprobe snd_bcm2835

pi@raspi4:/var/lib/mpd $ sudo amixer cset numid=3 1
amixer: Cannot find the given element from control default

pi@raspi4:/var/lib/mpd $


Ich kann mir keinen Reim darauf machen, vielleicht fällt Euch eine
falsche Einstellung auf.


Gruß

Peter
Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

Peter_Listig

Nachtrag User Group Netzwerk


# current user.
#
user                            "mpd"
#
# This setting specifies the group that MPD will run as. If not specified
# primary group of user specified with "user" setting will be used (if set).
# This is useful if MPD needs to be a member of group such as "audio" to
# have permission to use sound card.
#
#group                          "nogroup"
# For network
bind_to_address         "localhost"
#
# And for Unix Socket
#bind_to_address                "/run/mpd/socket"
#
# This setting is the TCP port that is desired for the daemon to get assigned
# to.
#
#port                           "6600"
#

Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

Wernieman

Mir fällt aktuell auch nichts ein ....

Wenn Du mit einem anderen Programm (z.B. aplay o.Ä.) einen Song wiedergibst, spielt das durchgehend?

Nicht das irgendetwas sich kurzfristig immer das Sounddevice "klaut"
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Peter_Listig

Hallo zusammen,


den Fehler habe ich trotz Neuinstallation von "Buster" und vieler Tests
nicht gefunden ...

Jedoch damit:


pi@RASPI4:/var/lib/mpd/playlists $ cat /etc/issue
Raspbian GNU/Linux 11 \n \l




pi@RASPI4:/var/lib/mpd/playlists $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@RASPI4:/var/lib/mpd/playlists $


wird ein Titel einer Playlist mit


mpc play 1


wieder komplett ausgegeben. Unter FHEM kann ich noch keine
Aussage machen, da es noch nicht installiert ist.

Weitere Nachricht sodann ...

Gruß

Peter
Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+

Peter_Listig

Tagchen,

also FHEM ist installiert - MPD auch
und alles läuft wie es soll ...

Trotzdem danke für die "Anteilnahme" ;-)

Gruß

Peter
Raspi4 / Debian Bullseye / FB 7490 / FHEM 6.x / CUL433 / CUL868 / aculfw / FrtizFon / DECT200 / IT / Homematic / ZigBee (Raspbee) /  Rademacher / HE / km200  / DS214+