PDA

View Full Version : Spotty: One Player isn't listed, all others are



joky
2018-05-12, 02:26
Hi,

I run multiple squeezelite clients with one LMS, unfortunately one player (player2, of corse the most important) isn't listed in spotify. I checked player settings (spotty) as well as the spotty section in "advanced settings". As soon as I tick on spotify connect on other players, they get listed immediately - not for this specific one.

It is - like the others - a Raspberry Pi 2 with squeezelite 1.8 and latest GIT (v1.9.0-1098). I also tried to reset the player settings without success.
LMS was on version 7.9.0, just updated to 7.9.1. Spotty is Plugin

The helper processes are listed as expected for all squeezelite players:
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /var/lib/squeezeboxserver/cache/spotty/b827eb407b2d -n player1 --disable-audio-cache --bitrate 96 --player-mac b8:27:eb:01:02:03 --lms 192.168.0.1:9000
squeeze+ 27248 0.2 0.0 18716 1820 ? Sl 11:24 0:00 /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /var/lib/squeezeboxserver/cache/spotty/b827eb85f497 -n player2 --disable-audio-cache --bitrate 96 --player-mac b8:27:eb:02:03:04 --lms 192.168.0.1:9000


I have no glue where to look for the reason of this behavior. Has anyone an idea of what's going on?


kind regards

mherger
2018-05-13, 08:40
Can you set logging for plugin.spotty to INFO, try again, then check the server.log for information about this player.

What OS are you running on your Pi?

wuschi
2018-05-15, 11:39
Same problem here. The player in question is "Küche" (00:04:20:1f:1c:6c). It worked for some time, then it was not shown anymore in the spotify app.

Other players are working. The server is running inside a docker container.

I've set the log level to DEBUG, here's the output:


[18-05-15 20:23:23.1311] main::init (387) Starting Logitech Media Server (v7.9.2, 1524841547, Fri Apr 27 17:18:01 CEST 2018) perl 5.022001 - x86_64-linux-gnu-thread-multi
[18-05-15 20:23:24.7920] Plugins::Spotty::Plugin::purgeAudioCache (464) Starting audio cache cleanup...
[18-05-15 20:23:24.7939] Plugins::Spotty::Plugin::purgeAudioCache (487) Max. cache size is: 0MB, current cache size is 0MB
[18-05-15 20:23:24.8004] Plugins::Spotty::Plugin::purgeAudioCache (518) Starting temporary file cleanup... (/srv/squeezebox/cache/spotty)
[18-05-15 20:23:24.8013] Plugins::Spotty::Plugin::purgeAudioCache (538) Audio cache cleanup done!
[18-05-15 20:23:25.6663] Plugins::Spotty::Plugin::findBin (775) Trying helper applicaton: /srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64
[18-05-15 20:23:25.6961] Plugins::Spotty::Plugin::helperCheck (701) Found helper capabilities table: do {
my $a = {
debug => bless(do{\(my $o = 0)}, "JSON::XS::Boolean"),
"lms-auth" => bless(do{\(my $o = 1)}, "JSON::XS::Boolean"),
version => "0.11.0",
"volume-normalisation" => 'fix',
};
$a->{"volume-normalisation"} = \${$a->{"lms-auth"}};
$a;
}
[18-05-15 20:23:25.6970] Plugins::Spotty::Plugin::findBin (778) Found helper applicaton: /srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64
[18-05-15 20:23:26.7294] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:23:26.7304] Plugins::Spotty::Connect::DaemonManager::startHelp er (96) Need to create Connect daemon for b8:27:eb:dc:67:d1
[18-05-15 20:23:26.7330] Plugins::Spotty::Connect::Daemon::start (66) Starting Spotty Connect daemon:
/srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /srv/squeezebox/cache/spotty/b827ebdc67d1 -n Arbeitszimmer --disable-audio-cache --bitrate 96 --player-mac b8:27:eb:dc:67:d1 --lms 172.17.0.2:9000
[18-05-15 20:23:26.7464] Plugins::Spotty::Connect::DaemonManager::startHelp er (96) Need to create Connect daemon for 00:04:20:2c:06:7f
[18-05-15 20:23:26.7507] Plugins::Spotty::Connect::Daemon::start (66) Starting Spotty Connect daemon:
/srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /srv/squeezebox/cache/spotty/0004202c067f -n Bad --disable-audio-cache --bitrate 96 --player-mac 00:04:20:2c:06:7f --lms 172.17.0.2:9000
[18-05-15 20:23:26.7817] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:23:28.1209] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:23:28.1221] Plugins::Spotty::Connect::DaemonManager::startHelp er (96) Need to create Connect daemon for 00:04:20:1f:1c:6c
[18-05-15 20:23:28.1246] Plugins::Spotty::Connect::Daemon::start (66) Starting Spotty Connect daemon:
/srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /srv/squeezebox/cache/spotty/0004201f1c6c -n Küche --disable-audio-cache --bitrate 96 --player-mac 00:04:20:1f:1c:6c --lms 172.17.0.2:9000
[18-05-15 20:24:28.0046] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:25:28.0037] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:26:27.0020] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:27:26.0017] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:28:25.0019] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:29:24.0018] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:30:24.0018] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:31:23.0016] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:32:22.0017] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:33:22.0017] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...
[18-05-15 20:34:21.0015] Plugins::Spotty::Connect::DaemonManager::initHelpe rs (70) Initializing Spotty Connect helper daemons...

The spotty helpers are running:


squeeze+ 19 12 0 20:23 ? 00:00:00 /srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /srv/squeezebox/cache/spotty/b827ebdc67d1 -n Arbeitszimmer --disable-audio-cache --bitrate 96 --player-mac b8:27:eb:dc:67:d1 --lms 172.17.0.2:90
squeeze+ 20 12 0 20:23 ? 00:00:00 /srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /srv/squeezebox/cache/spotty/0004202c067f -n Bad --disable-audio-cache --bitrate 96 --player-mac 00:04:20:2c:06:7f --lms 172.17.0.2:9000
squeeze+ 31 12 0 20:23 ? 00:00:00 /srv/squeezebox/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /srv/squeezebox/cache/spotty/0004201f1c6c -n Küche --disable-audio-cache --bitrate 96 --player-mac 00:04:20:1f:1c:6c --lms 172.17.0.2:9000

btw, how can i configure a higher bitrate for the spotty helpers?

mherger
2018-05-15, 13:27
Could you please rename your "Küche" to "Kueche" and try again? I thought I had umlauts covered, but turns out I called my kitchen Radio "Hilfskoch" :-).


btw, how can i configure a higher bitrate for the spotty helpers?

That's not the streaming rate. Streaming would use whatever you've chosen to use (highest would be 320kbps). The bitrate used in the daemon startup is to keep bandwidth usage by the helper application low. Streaming is done using another spotty instance... (yes, it's all a bit complicated).

wuschi
2018-05-16, 03:13
Hi Michael,

thanks for your quick response. I guess I found the cause by myself:


Could you please rename your "Küche" to "Kueche" and try again? I thought I had umlauts covered, but turns out I called my kitchen Radio "Hilfskoch" :-).

Already tried that, but it makes no difference.

However, i played around a little bit yesterday and it seems i have found the root cause:

I have spotify family and was creating the kids accounts last week. I tested the kids accounts by playing an album from the library on the kitchen radio.
After testing I emptied the kitchen playlist. And this is where the spotify connect device "disappeared" in my spotify app. In fact I think it was bound to the kid account.
When I started to play another album from my personal spotify account from the lms web interface on my kitched radio yesterday, it reappeared again as a connect device.

I tried to reproduce this and noticed that simply listing the albums from my personal spotify library is sufficient to have it re-added as a connect device.

So i guess I had some misunderstanding as to how spotify connect works:
I thought that when nothing is being streamed to a device then it will be announced to all accounts as an available spotify connect device, but this seems to not be the case.

Maybe this is what the "announce in local network" checkbox is meant for, but this doesn't seem to have any effect in my installation, probably due to running it inside a docker container.
So if this is the case, i guess I have to find out how advertise the spotify devices (mdns?) from my docker container.



That's not the streaming rate. Streaming would use whatever you've chosen to use (highest would be 320kbps). The bitrate used in the daemon startup is to keep bandwidth usage by the helper application low. Streaming is done using another spotty instance... (yes, it's all a bit complicated).

ok, thanks for clarifying that. I'm just trying to comprehend what's going on behind the scenes.

Kind regards,
Thomas

mherger
2018-05-16, 04:44
So i guess I had some misunderstanding as to how spotify connect works:
I thought that when nothing is being streamed to a device then it will be announced to all accounts as an available spotify connect device, but this seems to not be the case.

Maybe this is what the "announce in local network" checkbox is meant for, but this doesn't seem to have any effect in my installation, probably due to running it inside a docker container.

You're correct: if local announcement is working, then you should see the device, no matter what account it was used with. As long as you're on the same network - which probably isn't the case due to docker. If that's not given, then spotty would be run using the credentials of whatever account was last used on the device. Therefore you wouldn't see it if your daughter last used it. etc.

wuschi
2018-05-16, 07:26
You're correct: if local announcement is working, then you should see the device, no matter what account it was used with. As long as you're on the same network - which probably isn't the case due to docker. If that's not given, then spotty would be run using the credentials of whatever account was last used on the device. Therefore you wouldn't see it if your daughter last used it. etc.

ok, thanks for the confirmation.
For a start i am now running the docker container with "--net=host", and this seems to work as intended.

btw, thanks for this great plugin!

joky
2018-05-20, 01:14
Can you set logging for plugin.spotty to INFO, try again, then check the server.log for information about this player.

What OS are you running on your Pi?

Hi,
sorry for my late reply. I run Raspbian GNU/Linux 8 Jessie, update to 8 Stretch is planned for next days or weeks.

Set logging for spotty to "debug", result:
[18-05-20 10:13:59.9484] Plugins::Spotty::Connect::Daemon::start (66) Starting Spotty Connect daemon:
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /var/lib/squeezeboxserver/cache/spotty/831300ba -n bar --disable-audio-cache --bitrate 96 --player-mac b8:27:eb:40:7b:2d --lms 192.168.0.1:9000 --disable-discovery
[18-05-20 10:13:59.9551] Plugins::Spotty::Connect::DaemonManager::startHelp er (100) Need to (re-)start Connect daemon for b8:27:eb:85:f4:97
[18-05-20 10:13:59.9558] Plugins::Spotty::Connect::Daemon::start (66) Starting Spotty Connect daemon:
/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -c /var/lib/squeezeboxserver/cache/spotty/d7829ffa -n saal --disable-audio-cache --bitrate 96 --player-mac b8:27:eb:85:f4:97 --lms 192.168.0.1:9000 --disable-discovery



bar is running fine, saal is not listed at all,...

regards

mherger
2018-05-20, 06:02
See posting #6 in this thread.

joky
2018-05-20, 06:26
See posting #6 in this thread.

I don't run LMS in docker but directly on a Ubuntu Server, squeezelite is a RPI in the same physical/logical network as LMS and my mobile,.. :confused:

mherger
2018-05-20, 12:31
>> See posting #6 in this thread.
>
> I don't run LMS in docker but directly on a Ubuntu Server, squeezelite
> is a RPI in the same physical/logical network as LMS and my mobile,..

My comment wasn't about Docker, but about local announcement not being
available. If that's the case, then you'd only see the device which is
configured to run under your account, but not the other. In your case I
see from the log that they don't run using the same account.

--

Michael

joky
2018-05-20, 14:43
okay, the option to disable announcement was indeed activated. I now enabled announcing, restartet LMS service, but still not visible to users.

joky
2018-05-21, 04:21
okay, I saw in the configuration-folder of for the helper the various credentials:
/var/lib/squeezeboxserver/cache/spotty/[mac]/credentials.json

I realized I only saw those players, that are assigned to my account. The "missing" one was assigned to another account.

In fact, the announcement didn't work at all as the firewall blocked the HTTP-server provided by each instance. I added an exemption for those ports and it worked fine,.. so I'll need to find a method to automatically open the dynamically assigned ports somehow or a method to fix the port,..

mherger
2018-05-21, 06:02
> I realized I only saw those players, that are assigned to my account.
> The "missing" one was assigned to another account.

Exactly.

> In fact, the announcement didn't work at all as the firewall blocked the
> HTTP-server provided by each instance. I added an exemption for those
> ports and it worked fine,.. so I'll need to find a method to
> automatically open the dynamically assigned ports somehow or a method to
> fix the port,..

What kind of firewall is this? Local to the system?

--

Michael

joky
2018-05-21, 09:00
yes, it's the default ubuntu firewall (ufw).