Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Spotify renderer not working
#1
I've just started testing MoOde < and cannot get the Spotify renderer to work. 

From my iPhone, I can connect to the web interface, and it works fine.

My iPhone can also see other Spotify connect devices on the network.


When I ssh into the box and run "sudo ps -x" it seems to be running?

Code:
2957 ?        I<     0:00 [kworker/0:2H-mmc_complete]
3246 ?        I      0:00 [kworker/0:1-events_power_efficient]
3541 ?        I      0:00 [kworker/0:2-events_power_efficient]
3668 ?        S      0:00 sudo librespot --name Moode Spotify --bitrate 160 --format S16 --initial-volume 100 --volume-ctrl log --cache /var/local
3674 ?        S      0:00 librespot --name Moode Spotify --bitrate 160 --format S16 --initial-volume 100 --volume-ctrl log --cache /var/local/www/
3733 ?        S      0:00 sleep 6
3734 pts/0    S+     0:00 sudo ps -x
3735 pts/0    R+     0:00 ps -x


Here is the system info


Code:
Settings
Bit rate
Format
Volume scaling
Initial volume
(%)
Volume normalization
Method
Gain type
Pre-gain
(dB)
Threshold
Attack
(ms)
Release
(ms)
Knee
Autoplay
System information

        
S Y S T E M   P A R A M E T E R S

moOde release        = 7.3.0 2021-06-25
RaspiOS            = 10.6
Linux kernel        = 5.4.77+ #1371
Platform        = Pi-Zero W 1.1 512MB
Architecture        = armv6l (32-bit)
System uptime        = up 41 minutes
Timezone        = Europe/London
Current time        = 2021-08-08 16:23:41

Host name        = moode
Ethernet address    = 192.168.1.39
Ethernet MAC        = 00:e0:4c:53:44:58
WLAN address        = unassigned
WLAN MAC        = no adapter
WLAN country        = US

SoC identifier        = bcm2835
Core count        = 1
Kernel timer freq    = 100 Hz
SDCard freq        = 50 MHz
USB boot        = not available
Warranty        = OK

Root size        = 15G
Root used        = 21%
Root available        = 11G
Root expand        = expanded
Memory free        = 115 MB
Memory used        = 66 MB
SoC temperature        = 32.6°C
Throttled bitmask    = 0x0
Throttled text        = No throttling has occurred

CPU governor        = ondemand
Onboard WiFi        = None
Onboard BT        = None
HDMI output        = Off
LED state        = 1,1
Eth addr wait        = On
USB auto-mounter    = devmon
SSH term server        = Off

PHP-FPM version        = 7.3.19
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        = Pimoroni pHAT DAC
Interface        = I2S
Mixer name        = none
Hardware mixer        = No
Supported formats    = S16_LE, S24_LE, S32_LE
ALSA max volume        = 100
ALSA output mode    = Default (plughw)
ALSA loopback        = Off
MPD max volume        = 100
Volume step limit    = 10
Display dB volume    = Off
Audio source        = Local
Output device        = Local
Resume MPD        = No
Volume knob        = 24
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
RoonBridge        = Not installed
UPnP client        = Off
DLNA server        = Off
GPIO button handler    = Off
UPnP browser        = Off

Auto-shuffle        = Off
Ashuffle mode        = Track
Ashuffle filter        = None
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
CamillaDSP        = off
MPD httpd        = Off
Ignore CUE files    = Yes

P R E F E R E N C E S

Appearance
----------------------
Theme            = Default
Accent color        = Emerald
Alpha blend        = 1.0
Adaptive background    = No
Background image    = No
Cover backdrop        = No
Cover blur        = 20px
Cover scale        = 1.25
Renderer backdrop    = Yes
Font size        = Normal

Playback
----------------------
Show Queue thumbs    = Yes
Show Now-playing icon    = Yes
Show CoverView playbar    = Yes
Show extra metadata    = album,genre,track,disc,date,composer,conductor,performer,encoded
Search site        = Google
Playback history log    = No

Library
----------------------
One touch action    = Play
Albumview sort order    = by Artist
Tagview sort order    = by Artist
Recently added        = 1 Month
Show sample rate    = No
Cover search pri    = Embedded cover
Pixel ratio        = 1
Thumbnail resolution    = Auto
Thumbnail columns    = 6/2 (Default)

Library (Advanced)
----------------------
Tag view artist        = Artist
Album key        = Album@Artist (Default)
Include comment tag    = No
Library filter        = full_lib
Library filter str    =
Ignore articles        = a,an,the
Show tagview genres    = Yes
Show tagview covers    = Yes
Ellipsis limited text    = No
UTF8 character filter    = No

CoverView
----------------------
Automatic display    = Never
Backdrop style        = Gradient (Linear)

R A D I O   M A N A G E R   S E T T I N G S

Sort tag        = Name
Group method        = No grouping
Show moOde stations    = No action
Show other stations    = No action

M P D   S E T T I N G S

Version            = 0.22.8_p0x3
Volume mixer        = software
ALSA device        = hw:0
SoX resampling        = disabled
Selective resampling    = disabled
SoX quality        = high
SoX multithreading    = off
DSD over PCM (DoP)    = no
Replaygain        = off
Replaygain preamp    = 0
Volume normalization    = No
Audio buffer        = 4 (MB)
Output buffer size    = 128 (MB)
Max playlist items    = 16384
Input cache        = Disabled

B L U E T O O T H   S E T T I N G S

Bluetooth ver        = 5.50
Bluealsa ver        = v3.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.8
Friendly name        = Moode Airplay
ALSA device        = hw:0
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        = Moode Spotify
ALSA device        = plughw:0
Bit rate        = 160
Initial volume        = 100
Volume curve        = log
Volume normalization    = No
Normalization pregain    = 3
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.9.7-1270 "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    = Off
Mouse cursor        = On
Screen blank        = 600 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

20210808 154215 worker: -- Start
20210808 154215 worker: Successfully daemonized
20210808 154217 worker: Integrity check (passed)
20210808 154222 worker: File check (OK)
20210808 154225 worker: Session vacuumed
20210808 154225 worker: Session loaded
20210808 154225 worker: Debug logging (OFF)
20210808 154226 worker: -- Audio debug
20210808 154226 worker: ALSA cards: (0:sndrpihifiberry | 1:empty | 2:empty | 3:empty
20210808 154226 worker: MPD config: (0:Pimoroni pHAT DAC | mixer:(none) | card:0)
20210808 154226 worker: ALSA mixer actual (none)
20210808 154226 worker: ALSA volume (none)
20210808 154226 worker: -- System
20210808 154251 worker: Host     (moode)
20210808 154251 worker: moOde    (7.3.0 2021-06-25)
20210808 154251 worker: RaspiOS  (10.6)
20210808 154251 worker: Kernel   (5.4.77+ #1371)
20210808 154251 worker: Platform (Pi-Zero W 1.1 512MB)
20210808 154251 worker: ARM arch (armv6l, 32-bit kernel)
20210808 154251 worker: MPD ver  (0.22.8_p0x3)
20210808 154251 worker: CPU gov  (ondemand)
20210808 154251 worker: USB boot not available
20210808 154252 worker: File system expanded
20210808 154252 worker: HDMI port off
20210808 154252 worker: -- Network
20210808 154253 worker: eth0 exists
20210808 154254 worker: IP addr (192.168.1.39)
20210808 154254 worker: Netmask (255.255.255.0)
20210808 154254 worker: Gateway (192.168.1.1)
20210808 154254 worker: Pri DNS (192.168.1.1)
20210808 154254 worker: Domain  (Home.local)
20210808 154254 worker: wlan0 does not exist
20210808 154254 worker: -- Audio config
20210808 154256 worker: MPD conf updated
20210808 154256 worker: ALSA card number (0)
20210808 154256 worker: MPD audio output (Pimoroni pHAT DAC)
20210808 154257 worker: Audio formats (S16_LE, S24_LE, S32_LE)
20210808 154257 worker: ALSA mixer name (none)
20210808 154257 worker: MPD volume control (software)
20210808 154257 worker: Hdwr volume controller not detected
20210808 154257 worker: ALSA output mode (Default: plughw)
20210808 154257 worker: ALSA loopback (Off)
20210808 154257 worker: Reset renderer active flags
20210808 154257 worker: CamillaDSP (off)
20210808 154257 worker: -- MPD startup
20210808 154257 worker: MPD started
20210808 154259 worker: MPD accepting connections
20210808 154300 worker: MPD output 1 ALSA Default (on)
20210808 154300 worker: MPD output 2 ALSA Bluetooth (off)
20210808 154300 worker: MPD output 3 HTTP Server (off)
20210808 154300 worker: MPD crossfade (off)
20210808 154300 worker: MPD ignore CUE files (yes)
20210808 154300 worker: -- Feature availability
20210808 154300 worker: Source select (available)
20210808 154300 worker: Source select (source: MPD)
20210808 154300 worker: Source select (output: Pimoroni pHAT DAC)
20210808 154300 worker: Bluetooth (available)
20210808 154300 worker: Airplay renderer (available)
20210808 154300 worker: Spotify renderer (available: started)
20210808 154300 worker: Squeezelite (available)
20210808 154300 worker: RoonBridge renderer (not installed)
20210808 154300 worker: UPnP renderer (available)
20210808 154300 worker: DLNA server (available)
20210808 154300 worker: UPnP browser (available)
20210808 154300 worker: GPIO button handler (available)
20210808 154300 worker: Stream recorder (n/a)
20210808 154300 worker: -- Music sources
20210808 154300 worker: USB sources (none attached)
20210808 154300 worker: NAS and UPnP sources (none configured)
20210808 154300 worker: -- Other
20210808 154300 worker: USB volume knob (Off)
20210808 154300 worker: USB auto-mounter (devmon)
20210808 154300 worker: LED0 (On)
20210808 154300 worker: LED1 (sysclass does not exist)
20210808 154300 worker: Saved MPD vol level (0)
20210808 154300 worker: Preamp volume level (0)
20210808 154301 worker: MPD volume level (30) restored
20210808 154301 worker: ALSA volume level (None)
20210808 154301 worker: Auto-play (Off)
20210808 154301 worker: Maintenance interval (3 hours)
20210808 154301 worker: Screen saver activation (Never)
20210808 154301 worker: Session permissions (OK)
20210808 154301 worker: Watchdog started
20210808 154301 worker: Ready
20210808 154355 worker: Job spotifysvc
20210808 162035 worker: Job spotifysvc


Any suggestions?


Thanks

Adrian
Reply
#2
Turn Debug logging on in System config
Restart the Spotify renderer
Turn Debug logging off


Post the librespot launch string from the Moode log
Code:
moodeutl -l | grep librespot
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Code:
pi@moode:~ $ moodeutl -l | grep librespot
20210809 101421 startSpotify(): (librespot --name "Moode Spotify" --bitrate 160 --format S16 --initial-volume 100 --volume-ctrl log --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device "_audioout" --onevent /var/local/www/commandw/spotevent.sh > /dev/null 2>&1 &)
pi@moode:~ $


Thanks...  Here you go.

Code:
pi@moode:/var/local/www/commandw $ sudo netstat -tulpn | grep LISTEN
tcp        0      0 0.0.0.0:6600            0.0.0.0:*               LISTEN      685/mpd
tcp        0      0 0.0.0.0:35145           0.0.0.0:*               LISTEN      10059/librespot
tcp        0      0 0.0.0.0:58185           0.0.0.0:*               LISTEN      2250/php-fpm: pool
tcp        0      0 0.0.0.0:56553           0.0.0.0:*               LISTEN      2001/php-fpm: pool
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      468/smbd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/init
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      401/nginx: master p

It seems to be bound to the port!



Adrian
Reply
#4
I don't see anything suspicious. Try turning it off in Audio Config and then running from the cmd line with -v. It will print out debug info.

Code:
sudo librespot -v --name "Moode Spotify" --bitrate 160 --format S16 --initial-volume 100 --volume-ctrl log --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device "_audioout" --onevent /var/local/www/commandw/spotevent.sh
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
The plot thickens... 

Code:
pi@moode:~ $ pgrep librespot
709
pi@moode:~ $ kill 709
-bash: kill: (709) - Operation not permitted
pi@moode:~ $ sudo kill 709
pi@moode:~ $ pgrep librespot
pi@moode:~ $ sudo librespot -v --name "Moode Spotify" --bitrate 160 --format S16 --initial-volume 100 --volume-ctrl log --cache /var/localut" --onevent /var/local/www/commandw/spotevent.sh
[2021-08-09T13:53:49Z INFO  librespot] librespot 0.2.0 UNKNOWN (Built on 2021-05-08, Build ID: QjBBATle)
[2021-08-09T13:53:49Z DEBUG librespot_connect::discovery] Zeroconf server listening on 0.0.0.0:46805

Then nothing...

Quick question...   did you compile librespot with libmdns or DNS - sd?
Reply
#6
Have a look at COMPONENT 4B in the Build Recipe.
https://github.com/moode-player/moode/bl...recipe.txt
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
@bpgoa

<<ETA: sorry, auto fill-in grabbed the wrong user handle first time out>>

FYI, I don't recall any other user saying they couldn't discover the moOde Spotify Connect service from their iOS device. 

In my case, the Spotify app on my iPad 9.7 and on my iPhone SE (both running iOS 14.7.1) work just fine against my moOde players. So do the Spotify app on my Google Nexus 6P phone (Android 11) and the Spotify app on my Linux laptop.


Regards,
Kent
Reply
#8
@Tim Curtis  -  thanks  - found the section, and you aren't specifying, so will try and find out what the default is.

@TheOldPresbyope  thanks - it's not just from my iPhone, which by the way finds other AVAHI devices (including the LMS instances of Spotify connect which I believe use the same code) but also from the web client, which again finds all the other Spotify renderers (two TV's, LMS) .  It may be network related,  hence trying to find out what exact protocol it's using. 

FWIW, it's on a pi zero w (arm v6) in case that makes a difference.

Any other troubleshooting ideas welcomed!
Reply
#9
(08-09-2021, 06:01 PM)bpgoa Wrote: @Tim Curtis  -  thanks  - found the section, and you aren't specifying, so will try and find out what the default is.

@TheOldPresbyope  thanks - it's not just from my iPhone, which by the way finds other AVAHI devices (including the LMS instances of Spotify connect which I believe use the same code) but also from the web client, which again finds all the other Spotify renderers (two TV's, LMS) .  It may be network related,  hence trying to find out what exact protocol it's using. 

FWIW, it's on a pi zero w (arm v6) in case that makes a difference.

Any other troubleshooting ideas welcomed!

Network related? Seems likely, actually, which means poking around moOde's logs may not tell you anything.

There's been various posts in places like the Spotify Community Forum regarding Spotify Connect's use of mDNS and SSDP. 

I have no reason to expect an RPi Zero W to behave differently, but all mine are packed away ATM so can't confirm. I have only an RPi 4B in service here in our hotel room.

As an aside, are you running a virgin moOde installation or have you installed other software on the RPi such as a firewall, PiHole, etc.?

Regards,
Kent
Reply
#10
ok....


I replaced the Raspberry Pi Zero with a pi 3......


It works!


Long story...

Firstly, the Pi Zero was a completely clean build and the only things changed were through the configure interface. DAC is the simple PhatDAC. It also has a rotary encoder and a small OLED running over IIC. I plugged the PC and pi zero into a dumb switch and tested from the web client to the device. The web client could not find it.

I built a new installation on a Pi 3. Changed the DAC and hey presto. It all worked.
Reply


Forum Jump: