06-04-2020, 03:43 PM
(This post was last modified: 06-18-2020, 01:35 PM by adixor.
Edit Reason: clarified what is weird in the logs (the Stop)
)
Hi all
I had an issue on 6.5.2 and I am not sure if I am the only one seeing it... But for me it's identical on 2 separate RPI boxes. Spotify fails to play properly when I switch on it from my mobile Spotify app.
Activating debug for librespot, I have this:
(Note the "Stop" command coming in right when the file should in fact start playing).
So immediately after the play event there's a Stop event. This happens every time I try to swtich, again on 2 boxes. No music is heard and the mobile device (Android in my case) sometimes continues showing that the file is playing, sometimes it just stops (time counter not incrementing) but in any case, after this the phone becomes desyncrhonized with the Moode box and even if I try again I end up in the same situation.
Clearing the Spotify credentials (from the UI) sometimes helps but just for a short while, this soon happens again.
What I did was to try and manually run the librespot command with all sorts of parameters and combinations, and my latest finding is that if I remove this parameter, everything runs perfectly:
I have also modified the /var/www/inc/playerlib.php and removed this from the command line of librespot and all seems ok now across multiple restarts, no issues. However I don't know if removing this flag is problematic or not but it's a good enough workaround for me right now though so wanted to share it with others who may have this issue.
later edit: after a reboot also clear the Spotify credentials from the Audio Settings (that's an alias for "rm /var/local/www/spotify_cache/credentials.json"). This will not be created anymore once we remove the "--cache" parameter and it seems to me it causes the issue I have.
Hope that helps
adixor
Logs for one of my RPIs:
I had an issue on 6.5.2 and I am not sure if I am the only one seeing it... But for me it's identical on 2 separate RPI boxes. Spotify fails to play properly when I switch on it from my mobile Spotify app.
Activating debug for librespot, I have this:
Code:
[...]
[2020-06-04T15:30:45Z INFO librespot_playback::player] <Into The Night> loaded
[2020-06-04T15:30:45Z INFO librespot::player_event_handler] Running ["/var/local/www/commandw/spotevent.sh"] with environment variables {"TRACK_ID": "0rhyBUAgNXwdyvGVXSrLzc", "PLAYER_EVENT": "start"}
[2020-06-04T15:30:45Z DEBUG librespot_playback::player] command=Stop
[2020-06-04T15:30:45Z INFO librespot::player_event_handler] Running ["/var/local/www/commandw/spotevent.sh"] with environment variables {"TRACK_ID": "0rhyBUAgNXwdyvGVXSrLzc", "PLAYER_EVENT": "stop"}
[...]
(Note the "Stop" command coming in right when the file should in fact start playing).
So immediately after the play event there's a Stop event. This happens every time I try to swtich, again on 2 boxes. No music is heard and the mobile device (Android in my case) sometimes continues showing that the file is playing, sometimes it just stops (time counter not incrementing) but in any case, after this the phone becomes desyncrhonized with the Moode box and even if I try again I end up in the same situation.
Clearing the Spotify credentials (from the UI) sometimes helps but just for a short while, this soon happens again.
What I did was to try and manually run the librespot command with all sorts of parameters and combinations, and my latest finding is that if I remove this parameter, everything runs perfectly:
Code:
--cache /var/local/www/spotify_cache
I have also modified the /var/www/inc/playerlib.php and removed this from the command line of librespot and all seems ok now across multiple restarts, no issues. However I don't know if removing this flag is problematic or not but it's a good enough workaround for me right now though so wanted to share it with others who may have this issue.
later edit: after a reboot also clear the Spotify credentials from the Audio Settings (that's an alias for "rm /var/local/www/spotify_cache/credentials.json"). This will not be created anymore once we remove the "--cache" parameter and it seems to me it causes the issue I have.
Hope that helps
adixor
Logs for one of my RPIs:
Code:
pi@moode-attic:~ $ sudo /var/www/command/sysinfo.sh
S Y S T E M P A R A M E T E R S
moOde release = 6.5.2 2020-05-03</li>
Raspbian OS = 10.3
Linux kernel = 4.19.115-v7l+ #1305
Platform = Pi-4B 4GB v1.1
Architecture = armv7l (32-bit)
System uptime = up 4 minutes
Timezone = Europe/Amsterdam
Current time = 2020-06-04 17:40:01
Host name = moode-attic
Ethernet address = 192.168.1.41
Ethernet MAC = dc:a6:32:62:fe:62
WLAN address = unassigned
WLAN MAC = no adapter
WLAN country = NL
SoC identifier = bcm2711
Core count = 4
Kernel timer freq = 100 Hz
SDCard freq = 50 MHz
USB boot = not available
Warranty = OK
Root size = 7.1G
Root used = 39%
Root available = 4.2G
Root expand = expanded
Memory free = 3262 MB
Memory used = 273 MB
SoC temperature = 61.3°C
CPU governor = ondemand
Onboard WiFi = Off
Onboard BT = Off
HDMI output = On
LED state = 1,1
Eth addr wait = On
Max USB current = Off
USB (UAC2) fix = Off
Pi-3B+ eth fix = Off
SSH term server = Off
PHP-FPM version = 7.3.11
NGINX version = 1.14.2
SQLite3 version = 3.27.2
Hostapd version = 2.8-devel
WiringPi version = 2.50
RPi.GPIO version = 0.7.0
A U D I O P A R A M E T E R S
Audio device = USB audio device
Interface = USB
Mixer name = Speaker
Hardware volume = Controller detected
Max ALSA volume = 70
Max MPD volume = 100
Volume step limit = 10
Audio source = Local
Output device = Local
Resume MPD = No
Volume knob = 0
Volume mute = Unmuted
Saved MPD vol = 0
Preamp volume = 0
ALSA version = 1.1.8-1+rpt1
SoX version = 0.1.2-3
Bluetooth controller = Off
Pairing agent = Off
Airplay receiver = Off
Spotify receiver = On
Squeezelite = Off
UPnP client = Off
DLNA server = Off
GPIO button handler = Off
UPnP browser = Off
Auto-shuffle = Off
Autoplay = Off
Rotary encoder = Off
Encoder params = 100 2 3 23 24
USB volume knob = Off
Polarity inversion = Off
Crossfeed = Off
Crossfade = Off
Parametric EQ = Off
Graphic EQ = Off
MPD httpd = Off
A P P E A R A N C E S E T T I N G S
Themes and backgrounds
----------------------
Theme = Lilium
Accent color = Emerald
Alpha blend = 1.0
Adaptive background = No
Background image = No
Cover backdrop = No
Cover blur = 20px
Cover scale = 1.25
Library options
----------------------
Instant play action = Clear/Play
Show tagview genres = No
Show tagview covers = Yes
Ellipsis limited text = No
Albumview sort order = by Artist
Tagview sort order = by Artist
Compilation identifier = Various Artists
Recently added = 1 Month
Ignore articles = a,an,the
UTF8 character filter = No
Hi-res thumbs = Auto
Cover search pri = Embedded cover
Pixel ratio = 1.5
Coverview screen saver
----------------------
CoverView auto-display = Never
CoverView style = Gradient (Radial)
Other options
----------------------
Font size = Larger
Auto-shuffle filter = None
Extra metadata = track,disc,date,composer,encoded
Playback history = Yes
M P D S E T T I N G S
Version = 0.21.22
Volume control = software
ALSA device = hw:1
SoX resampling = disabled
SoX quality = very high
SoX multithreading = off
DSD over PCM (DoP) = no
Replaygain = off
Replaygain preamp = 0
Volume normalization = No
Audio buffer = 4096 (kb)
Output buffer size = 131072 (kb)
B L U E T O O T H S E T T I N G S
Bluetooth ver = 5.50
Bluealsa ver = 2.0.0
Speaker sharing = No
Resume MPD = No
PCM buffer time = 500000 (μs)
A I R P L A Y S E T T I N G S
Version = 3.3.6
Friendly name = Moode Airplay
ALSA device = hw:1
Interpolation = soxr
Output bit depth = S16
Output sample rate = 44100
Session interruption = no
Session timeout = 120 (ms)
Latency offset = 0.0 (secs)
Audio buffer = 0.2 (secs)
Resume MPD = No
S P O T I F Y S E T T I N G S
Friendly name = Attic
ALSA device = plughw:1
Bit rate = 320
Initial volume = 100
Volume curve = Logarithmic
Volume normalization = No
Normalization pregain = 0
Autoplay = No
Resume MPD = No
S Q U E E Z E L I T E S E T T I N G S
Version = 1.8.7-1052 "DSD/SRC enabled"
Friendly name = Moode
ALSA device = hw:0
ALSA params = 80:4::1
Output buffers = 40000:100000
Task priority = 45
Codec list = flac,pcm,mp3,ogg,aac,alac,dsd
Other options = -W -D 500 -R E -S /var/local
Resume MPD = No
L O C A L D I S P L A Y S E T T I N G S
Local UI display = On
Mouse cursor = Off
Screen blank = off Secs
Wake display on play = Off
Brightness = 255
Pixel aspect ratio = Default
Rotate screen = 0 Deg
M O O D E S T A R T U P L O G
20200604 173516 worker: -- Start
20200604 173516 worker: Successfully daemonized
20200604 173516 worker: Integrity check (warning: playerlib.php)
20200604 173516 worker: Integrity check (passed with warnings)
20200604 173516 worker: Session loaded
20200604 173516 worker: Debug logging (on)
20200604 173516 worker: Device raw: (0:ALSA|1:Device|i2s:none)
20200604 173516 worker: Device cfg: (USB audio device|1|1|Speaker|0)
20200604 173517 worker: ALSA volume set to (0%)
20200604 173517 worker: -- System
20200604 173518 worker: Host (moode-attic)
20200604 173518 worker: moOde (6.5.2 2020-05-03)
20200604 173518 worker: Raspbian (10.3)
20200604 173518 worker: Kernel (4.19.115-v7l+ #1305)
20200604 173518 worker: Platform (Pi-4B 4GB v1.1)
20200604 173518 worker: ARM arch (armv7l, 32-bit kernel)
20200604 173518 worker: MPD ver (0.21.22)
20200604 173518 worker: CPU gov (ondemand)
20200604 173518 worker: USB boot not available
20200604 173518 worker: File system expanded
20200604 173518 worker: HDMI port on
20200604 173518 worker: File check (OK)
20200604 173518 worker: -- Network
20200604 173519 worker: eth0 exists
20200604 173519 worker: IP addr (192.168.1.41)
20200604 173519 worker: Netmask (255.255.255.0)
20200604 173519 worker: Gateway (192.168.1.1)
20200604 173519 worker: Pri DNS (192.168.1.2)
20200604 173519 worker: Domain (None)
20200604 173519 worker: wlan0 does not exist
20200604 173519 worker: -- Audio
20200604 173519 worker: ALSA outputs unmuted
20200604 173519 worker: ALSA card number (1)
20200604 173519 worker: Audio output (USB audio device)
20200604 173519 worker: Audio formats (S16_LE)
20200604 173519 worker: ALSA mixer name (Speaker)
20200604 173519 worker: MPD volume control (software)
20200604 173519 worker: Hdwr volume controller exists
20200604 173519 worker: Max ALSA volume (70%)
20200604 173519 worker: Reset renderer active flags
20200604 173519 worker: -- MPD
20200604 173520 worker: MPD conf updated
20200604 173520 worker: MPD started
20200604 173520 openMpdSocket(): connection failed (1)
20200604 173520 openMpdSocket(): errorno: 111, Connection refused
20200604 173520 worker: MPD accepting connections
20200604 173520 worker: Configure MPD outputs
20200604 173520 worker: MPD output 1 ALSA default (on)
20200604 173520 worker: MPD output 2 ALSA crossfeed (off)
20200604 173520 worker: MPD output 3 ALSA parametric eq (off)
20200604 173520 worker: MPD output 4 ALSA graphic eq (off)
20200604 173520 worker: MPD output 5 ALSA polarity inversion (off)
20200604 173520 worker: MPD output 6 ALSA bluetooth (off)
20200604 173520 worker: MPD output 7 HTTP stream (off)
20200604 173520 worker: MPD crossfade (off)
20200604 173520 worker: -- Feature availability
20200604 173520 worker: Source select (available)
20200604 173520 worker: Source select (source: MPD)
20200604 173520 worker: Source select (output: USB audio device)
20200604 173521 worker: Bluetooth (available)
20200604 173521 worker: Airplay renderer (available)
20200604 173521 worker: Spotify renderer (available)
20200604 173521 worker: (librespot --name "Attic" --bitrate 320 --initial-volume 100 --disable-audio-cache --backend alsa --device "plughw:1" --onevent /var/local/www/commandw/spotevent.sh -v > /home/pi/librespot.txt 2>&1 &)
20200604 173521 worker: Spotify renderer (started)
20200604 173521 worker: Squeezelite renderer (available)
20200604 173521 worker: UPnP renderer (available)
20200604 173521 worker: DLNA server (available)
20200604 173521 worker: UPnP browser (available)
20200604 173521 worker: Audio scrobbler (available)
20200604 173521 worker: GPIO button handler (available)
20200604 173521 worker: -- Music sources
20200604 173521 worker: USB sources (none attached)
20200604 173521 sourceMount(): result=()
20200604 173521 worker: NAS and UPnP sources (mountall initiated)
20200604 173521 worker: -- Miscellaneous
20200604 173521 worker: USB volume knob (Off)
20200604 173521 worker: USB auto-mounter (udisks-glue)
20200604 173521 worker: LED0 (On)
20200604 173521 worker: LED1 (On)
20200604 173522 worker: Saved MPD vol level (0)
20200604 173522 worker: Preamp volume level (0)
20200604 173522 worker: MPD volume level (0) restored
20200604 173522 worker: ALSA volume level (70%)
20200604 173522 worker: Auto-play (Off)
20200604 173522 worker: LocalUI started
20200604 173522 worker: Maintenance interval (3 hrs)
20200604 173522 worker: Screen saver activation (Never)
20200604 173522 worker: Session permissions (OK)
20200604 173522 worker: Watchdog started
20200604 173522 worker: Ready
20200604 173530 loadLibrary(): Cache data returned to client, length (6496767)
20200604 173531 enhanceMetadata(): coverurl: (/coverart.php/NAS%2FMusic%2F%3Dcompilatii%2FDeep%20%26%20Chilled%20Euphoria%20disc%202%2F09%20-%20Humate%20-%20Love%20Stimulation%20%28Michael%20Woods%20Mix%29.mp3)
20200604 173531 enhanceMetadata(): Song file
20200604 173531 engine-mpd: Metadata returned to client: Size=(31)