Moode Forum
[PROBLEM] Spotify can't connect - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [PROBLEM] Spotify can't connect (/showthread.php?tid=2391)

Pages: 1 2


Spotify can't connect - ivenhoe - 04-19-2020

Hi Folks,


I'm trying the moode player on my RiPi with Hifibery Amp2 - somehow now I get the music if playing radio station (stream) and USB files.
But spotify... still problem - I can't reach it from desktop or phone app - its not offer that can be reach the Moodeaudio - so i can't use it to play Spotify premium.

The moodeplayer and the desktop or phone app are on same (Wi-Fi) network...
So the phone app can offer my desktop Spotify player or vice-versa, but the not see the moode player.

Code:
20200419 121311 worker: -- Start
20200419 121311 worker: Successfully daemonized
20200419 121311 worker: Integrity check (passed)
20200419 121311 worker: Session loaded
20200419 121311 worker: Debug logging (off)
20200419 121311 worker: Device raw: (0:sndrpihifiberry|1:empty|i2s:HiFiBerry Amp2)
20200419 121311 worker: Device cfg: (HiFiBerry Amp2|0|0|Digital|0)
20200419 121311 worker: ALSA volume set to (0%)
20200419 121312 worker: -- System
20200419 121315 worker: Host name     (moode)
20200419 121315 worker: moOde release (6.4.2 2020-02-12)
20200419 121315 worker: Raspbian OS   (10.2)
20200419 121315 worker: Linux kernel  (4.19.97-v7+ #1293)
20200419 121315 worker: Platform      (Pi-3B 1GB v1.2)
20200419 121315 worker: Architecture  (armv7l)
20200419 121315 worker: MPD version   (0.21.16)
20200419 121315 worker: CPU governor  (ondemand)
20200419 121315 worker: USB boot not enabled yet
20200419 121315 worker: File system not expanded yet
20200419 121315 worker: HDMI port off
20200419 121316 worker: File check (OK)
20200419 121316 worker: -- Network
20200419 121316 worker: eth0 exists
20200419 121316 worker: eth0 wait 0 for IP address
20200419 121319 worker: eth0 wait 1 for IP address
20200419 121324 worker: eth0 wait 2 for IP address
20200419 121327 worker: eth0 wait 3 for IP address
20200419 121345 worker: eth0 wait 4 for IP address
20200419 121348 worker: eth0 address not assigned
20200419 121348 worker: wlan0 exists
20200419 121348 worker: wifi country (HU)
20200419 121348 worker: wlan0 trying SSID (TTx2xRAZ)
20200419 121348 worker: IP addr (192.168.1.84)
20200419 121348 worker: Netmask (255.255.255.0)
20200419 121348 worker: Gateway (192.168.1.1)
20200419 121348 worker: Pri DNS (192.168.1.1)
20200419 121348 worker: Domain  (home)
20200419 121349 worker: -- Audio
20200419 121349 worker: ALSA outputs unmuted
20200419 121349 worker: ALSA card number (0)
20200419 121349 worker: Audio output (I2S audio device)
20200419 121349 worker: Audio device (HiFiBerry Amp2)
20200419 121350 worker: Audio formats (S16_LE, S24_LE, S32_LE)
20200419 121350 worker: ALSA mixer name (Digital)
20200419 121350 worker: MPD volume control (software)
20200419 121350 worker: Hdwr volume controller exists
20200419 121350 worker: Max ALSA volume (80%)
20200419 121350 worker: -- Services
20200419 121350 worker: Reset renderer active state
20200419 121350 worker: MPD conf updated
20200419 121350 worker: MPD started
20200419 121351 worker: MPD accepting connections
20200419 121351 worker: Configure MPD outputs
20200419 121351 worker: MPD output 1 ALSA default (off)
20200419 121351 worker: MPD output 2 ALSA crossfeed (off)
20200419 121351 worker: MPD output 3 ALSA parametric eq (on)
20200419 121351 worker: MPD output 4 ALSA graphic eq (off)
20200419 121351 worker: MPD output 5 ALSA polarity inversion (off)
20200419 121351 worker: MPD output 6 ALSA bluetooth (off)
20200419 121351 worker: MPD output 7 HTTP stream (off)
20200419 121351 worker: MPD crossfade (off)
20200419 121351 worker: Audio source (Local)
20200419 121351 worker: Output device (Local)
20200419 121351 worker: Airplay receiver started
20200419 121351 worker: Spotify receiver started
20200419 121351 worker: UPnP renderer started
20200419 121352 worker: DLNA server started
20200419 121352 worker: UPnP browser started
20200419 121352 worker: Audio scrobbler started
20200419 121352 worker: Bluetooth pairing agent started
20200419 121352 worker: Shellinabox SSH started
20200419 121352 worker: USB auto-mounter (udisks-glue)
20200419 121352 worker: -- Music sources
20200419 121352 worker: USB source (Samsung USB)
20200419 121352 worker: NAS and UPnP sources (none configured)
20200419 121352 worker: -- Miscellaneous
20200419 121352 worker: Saved MPD vol level (0)
20200419 121352 worker: Preamp volume level (0)
20200419 121353 worker: MPD volume level (26) restored
20200419 121353 worker: ALSA volume level (80%)
20200419 121353 worker: Auto-play (Off)
20200419 121353 worker: Auto-shuffle service (Off)
20200419 121353 worker: Maintenance interval (3 hrs)
20200419 121353 worker: Screen saver activation (Never)
20200419 121353 worker: Session permissions (OK)
20200419 121353 worker: Watchdog started
20200419 121353 worker: Ready



I hope can give me suggestion or instruction what to do.
Thank you in advance


RE: Spotify can't connect - Tim Curtis - 04-19-2020

Turn everything off except the Spotify renderer. You might have to turn on Bluetooth in order to turn off the Pairing agent.

- All the other renderers
- The eq
- Upnp/dlna
- Etc

Reboot

Confirm that Spotify renderer is running

pgrep -l librespot


RE: Spotify can't connect - TheOldPresbyope - 04-19-2020

@ivenhoe

The Spotify connection method depends on mDNS (also known as Avahi or Bonjour) to advertise the renderer.

Besides Tim's command-line test to see if the Spotify renderer is running, you could also do this from the command line to see how the renderer is advertising itself:

Code:
pi@moodeLR:~ $ avahi-browse -at | grep spotify
+  wlan0 IPv4 Moode650b5 Spotify                            _spotify-connect._tcp local
+  wlan0 IPv4 MoodeLR Spotify                               _spotify-connect._tcp local
+  wlan0 IPv4 c01b1ae2e423a69a-0                            _spotify-connect._tcp local
+  wlan0 IPv6 MoodeLR Spotify                               _spotify-connect._tcp local
+  wlan0 IPv6 Moode650b5 Spotify                            _spotify-connect._tcp local

In this case, the moOde player I'm working from has the hostname 'moodeLR' (case doesn't matter in hostnames). 

What you see here is a compound command that says browse for all avahi services on the LAN and select out of the output only those lines with 'spotify' in them.

Note that the output shows the player I'm working from, with the name I gave it in the Spotify config menu, 'MoodeLR Spotify'.

The output also shows another moOde player and, cryptically, a Facebook Connect Portal gadget my SO just received from her son.

What does this command show when run from your moOde player's command line?

Regards,
Kent

PS - you can reach the command line either by opening moOde's Web SSH terminal (see System config) or by using ssh, or PuTTY, or such, from another host. Either way, log in as user 'pi'.


RE: Spotify can't connect - ivenhoe - 04-19-2020

(04-19-2020, 12:01 PM)Tim Curtis Wrote: Turn everything off except the Spotify renderer. You might have to turn on Bluetooth in order to turn off the Pairing agent.

- All the other renderers
- The eq
- Upnp/dlna
- Etc

Reboot

Confirm that Spotify renderer is running

pgrep -l librespot

Hi Tim,
I was turn off everything trough ssh, reboot and finally take the pgrep - librespot, by your instructions and get back:

Code:
pi@moode:~ $ pgrep -l librespot
1102 librespot
I don't know what this mean (I mean the result: 1102)


RE: Spotify can't connect - ivenhoe - 04-19-2020

(04-19-2020, 12:32 PM)TheOldPresbyope Wrote: @ivenhoe

The Spotify connection method depends on mDNS (also known as Avahi or Bonjour) to advertise the renderer.

Besides Tim's command-line test to see if the Spotify renderer is running, you could also do this from the command line to see how the renderer is advertising itself:

Code:
pi@moodeLR:~ $ avahi-browse -at | grep spotify
+  wlan0 IPv4 Moode650b5 Spotify                            _spotify-connect._tcp local
+  wlan0 IPv4 MoodeLR Spotify                               _spotify-connect._tcp local
+  wlan0 IPv4 c01b1ae2e423a69a-0                            _spotify-connect._tcp local
+  wlan0 IPv6 MoodeLR Spotify                               _spotify-connect._tcp local
+  wlan0 IPv6 Moode650b5 Spotify                            _spotify-connect._tcp local

In this case, the moOde player I'm working from has the hostname 'moodeLR' (case doesn't matter in hostnames). 

What you see here is a compound command that says browse for all avahi services on the LAN and select out of the output only those lines with 'spotify' in them.

Note that the output shows the player I'm working from, with the name I gave it in the Spotify config menu, 'MoodeLR Spotify'.

The output also shows another moOde player and, cryptically, a Facebook Connect Portal gadget my SO just received from her son.

What does this command show when run from your moOde player's command line?

Regards,
Kent

PS - you can reach the command line either by opening moOde's Web SSH terminal (see System config) or by using ssh, or PuTTY, or such, from another host. Either way, log in as user 'pi'.



RE: Spotify can't connect - Tim Curtis - 04-19-2020

(04-19-2020, 04:35 PM)ivenhoe Wrote:
(04-19-2020, 12:01 PM)Tim Curtis Wrote: Turn everything off except the Spotify renderer. You might have to turn on Bluetooth in order to turn off the Pairing agent.

- All the other renderers
- The eq
- Upnp/dlna
- Etc

Reboot

Confirm that Spotify renderer is running

pgrep -l librespot

Hi Tim,
I was turn off everything trough ssh, reboot and finally take the pgrep - librespot, by your instructions and get back:

Code:
pi@moode:~ $ pgrep -l librespot
1102 librespot
I don't know what this mean (I mean the result: 1102)

pgrep returns blank if the program is not running. In your case it returned the name and pid of the program which means its running.


RE: Spotify can't connect - ivenhoe - 04-19-2020

(04-19-2020, 04:36 PM)ivenhoe Wrote:
(04-19-2020, 12:32 PM)TheOldPresbyope Wrote: @ivenhoe

The Spotify connection method depends on mDNS (also known as Avahi or Bonjour) to advertise the renderer.

Besides Tim's command-line test to see if the Spotify renderer is running, you could also do this from the command line to see how the renderer is advertising itself:

Code:
pi@moodeLR:~ $ avahi-browse -at | grep spotify
+  wlan0 IPv4 Moode650b5 Spotify                            _spotify-connect._tcp local
+  wlan0 IPv4 MoodeLR Spotify                               _spotify-connect._tcp local
+  wlan0 IPv4 c01b1ae2e423a69a-0                            _spotify-connect._tcp local
+  wlan0 IPv6 MoodeLR Spotify                               _spotify-connect._tcp local
+  wlan0 IPv6 Moode650b5 Spotify                            _spotify-connect._tcp local

In this case, the moOde player I'm working from has the hostname 'moodeLR' (case doesn't matter in hostnames). 

What you see here is a compound command that says browse for all avahi services on the LAN and select out of the output only those lines with 'spotify' in them.

Note that the output shows the player I'm working from, with the name I gave it in the Spotify config menu, 'MoodeLR Spotify'.

The output also shows another moOde player and, cryptically, a Facebook Connect Portal gadget my SO just received from her son.

What does this command show when run from your moOde player's command line?

Regards,
Kent

PS - you can reach the command line either by opening moOde's Web SSH terminal (see System config) or by using ssh, or PuTTY, or such, from another host. Either way, log in as user 'pi'.

Hi Kent,

I was take it by your instructions, and get next:

Code:
pi@moode:~ $ avahi-browse -at
+  wlan0 IPv6 moode                                         Microsoft Windows Network local
+  wlan0 IPv4 moode                                         Microsoft Windows Network local
+  wlan0 IPv6 moode                                         _device-info._tcp    local
+  wlan0 IPv4 moode                                         _device-info._tcp    local
+  wlan0 IPv6 moode                                         Remote Disk Management local
+  wlan0 IPv4 moode                                         Remote Disk Management local
+  wlan0 IPv6 moOde audio player: moode                     Web Site             local
+  wlan0 IPv4 moOde audio player: moode                     Web Site             local

I was also take moodeutl -a and get:

Code:
pi@moode:~ $ moodeutl -a
1               Kernel architecture
2               Airplay renderer
4               DLNA server
8               MPD audio scrobbler
16              Squeezelite renderer
32              UPnP client for MPD
64              Require squashfs for software update
128             Google Play music service
256             Local display
512             Input source select
1024            UPnP volume sync
2048    y       Spotify Connect renderer
4096            GPIO button handler
8192            UPnP media browser
16384           Bluetooth renderer
and finally:

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

moOde release           = 6.4.2 2020-02-12
Raspbian OS             = 10.2
Linux kernel            = 4.19.97-v7+ #1293
Platform                = Pi-3B 1GB v1.2
Architecture            = armv7l (32-bit)
System uptime           = up 16 minutes
Timezone                = Europe/Budapest
Current time            = 2020-04-19 18:44:16

Host name               = moode
Ethernet address        = unassigned
Ethernet MAC            = b8:27:eb:bc:cd:98
WLAN address            = 192.168.1.84
WLAN MAC                = b8:27:eb:e9:98:cd
WLAN country            = HU

SoC identifier          = bcm2837
Core count              = 4
Kernel timer freq       = 100 Hz
SDCard freq             = 50 MHz
USB boot                = not enabled
Warranty                = OK

Root size               = 3.4G
Root used               = 79%
Root available          = 684M
Root expand             = not expanded
Memory free             = 669 MB
Memory used             = 84 MB
SoC temperature         = 50.5°C

CPU governor            = ondemand
Onboard WiFi            = On
Onboard BT              = Off
HDMI output             = Off
Eth addr wait           = On
Max USB current         = Off
USB (UAC2) fix          = Off
Pi-3B+ eth fix          = Off
SSH term server         = On

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            = HiFiBerry Amp2
Interface               = I2S
Mixer name              = Digital
Hardware volume         = Controller detected
Max ALSA volume         = 80
Audio source            = Local
Output device           = Local
Resume MPD              = Yes
Volume knob             = 23
Volume mute             = Unmuted
Saved MPD vol           = 0
Preamp volume           = 0
ALSA version            = 1.1.8-1+rpt1
SoX version             = 0.1.2-3

Spotify receiver        = On

Auto-shuffle            = Off
Autoplay                = Off
Rotary encoder          = Off
Encoder params          = 100 2 3 23 24
Polarity inversion      = Off
Crossfeed               = Off
Crossfade               = Off
Parametric EQ           = Default
Graphic EQ              = Off
MPD httpd               = Off

A P P E A R A N C E   S E T T I N G S

Theme                   = Pure Black
Accent color            = Emerald
Alpha blend             = 1.0
Adaptive background     = No
Background image        = No
Cover backdrop          = Yes
Cover blur              = 20px
Cover scale             = 1.25
CoverView auto-display  = Never
CoverView style         = Theme
Auto-shuffle filter     = None
Extra metadata          = Yes
Playback history        = No

L I B R A R Y   S E T T I N G S

Instant play action     = Clear/Play
Show genres column      = Yes
Album grouping          = by Artist
Compilation identifier  = Various Artists
Recently added          = 3 Months
Ignore articles         = a,an,the
UTF8 character filter   = No
Hi-res thumbs           = Auto
Cover search pri        = Embedded cover
Pixel ratio             = 0.8955223880597015

M P D   S E T T I N G S

Version                 = 0.21.16
Volume control          = software
ALSA device             = hw:0
SoX resampling          = 48000:32:2
SoX quality             = high
SoX multithreading      = off
DSD over PCM (DoP)      = no
Replaygain              = auto
Replaygain preamp       = 0
Volume normalization    = No
Audio buffer            = 8192 (kb)
Output buffer size      = 131072 (kb)

S P O T I F Y   S E T T I N G S

Friendly name           = MoodeSpotify
ALSA device             = eqfa4p
Bit rate                = 320
Initial volume          = 18
Volume curve            = Logarithmic
Volume normalization    = No
Normalization pregain   = 1
Resume MPD              = Yes

M O O D E   S T A R T U P   L O G

20200419 184407 worker: -- Start
20200419 184407 worker: Successfully daemonized
20200419 184407 worker: Integrity check (passed)
20200419 184407 worker: Session loaded
20200419 184407 worker: Debug logging (off)
20200419 184407 worker: Device raw: (0:sndrpihifiberry|1:empty|i2s:HiFiBerry Amp2)
20200419 184407 worker: Device cfg: (HiFiBerry Amp2|0|0|Digital|0)
20200419 184408 worker: ALSA volume set to (0%)
20200419 184408 worker: -- System
20200419 184409 worker: Host name     (moode)
20200419 184409 worker: moOde release (6.4.2 2020-02-12)
20200419 184409 worker: Raspbian OS   (10.2)
20200419 184409 worker: Linux kernel  (4.19.97-v7+ #1293)
20200419 184409 worker: Platform      (Pi-3B 1GB v1.2)
20200419 184409 worker: Architecture  (armv7l)
20200419 184409 worker: MPD version   (0.21.16)
20200419 184409 worker: CPU governor  (ondemand)
20200419 184409 worker: USB boot not enabled yet
20200419 184409 worker: File system not expanded yet
20200419 184409 worker: HDMI port off
20200419 184409 worker: File check (OK)
20200419 184409 worker: -- Network
20200419 184410 worker: eth0 exists
20200419 184410 worker: eth0 wait 0 for IP address
20200419 184413 worker: eth0 wait 1 for IP address
20200419 184416 worker: eth0 wait 2 for IP address



RE: Spotify can't connect - TheOldPresbyope - 04-19-2020

@ivenhoe

If those 8 lines were the entire output from the 'avahi-browse -at' command, then something's wrong.

Assuming you are using moOde's default name for the Spotify renderer, there also should have been lines like

Code:
+  wlan0 IPv4 Moode Spotify                               _spotify-connect._tcp local
+  wlan0 IPv6 Moode Spotify                               _spotify-connect._tcp local


Your renderer is running but it's not advertising an avahi (mDNS) service. That's why your phone's Spotify app and desktop browser's Spotify player can't find it.

I'm not sure what needs to be looked at next. Perhaps @Tim Curtis has a thought.

Regards,
Kent


RE: Spotify can't connect - ivenhoe - 04-19-2020

(04-19-2020, 05:12 PM)TheOldPresbyope Wrote: @ivenhoe

If those 8 lines were the entire output from the 'avahi-browse -at' command, then something's wrong.

Assuming you are using moOde's default name for the Spotify renderer, there also should have been lines like

Code:
+  wlan0 IPv4 Moode Spotify                               _spotify-connect._tcp local
+  wlan0 IPv6 Moode Spotify                               _spotify-connect._tcp local


Your renderer is running but it's not advertising an avahi (mDNS) service. That's why your phone's Spotify app and desktop browser's Spotify player can't find it.

I'm not sure what needs to be looked at next. Perhaps @Tim Curtis has a thought.

Regards,
Kent
Yes - I understand you - waiting @Tim Curtis answer - hoping there is solution - because this is the original downloaded Moode...


RE: Spotify can't connect - Tim Curtis - 04-19-2020

The OP should do the following:

1. Download a fresh image of moOde from moodeaudio.org and write it to a known good SDCard
2. Connect Pi via Ethernet to the Router
3. Power it up
4. Turn on only the Spotify renderer using the Audio Config screen.
5. NOTE: Do not use the diagnostic utility moodeutl -a/d to turn features on and off.

6. Verify that librespot is running
pgrep -l librespot

7. Probe the network for "Moode Spotify" service
avahi-browse -at

If Moode Spotify is not listed in the output then there is some sort of network issue external to moOde software.