Max2Play Home › Forums › Max2Play Add-ons › Spotify connect needs to be restarted after a few hours
- This topic has 9 replies, 4 voices, and was last updated 5 years, 9 months ago by Heiner premium.
-
Posted in: Max2Play Add-ons
-
2. November 2017 at 23:24 #32265
Hi max2play team,
I am running max2play Beta-170823 on a Raspberry PI 2 with a Hifi Berry DAC+ Pro.
Squeezelite is very stable (with a roon server). Spotify also works fine. But after some time of not using (Raspi is always on) the Spotify Client (iOS or MAC) can not find the Spotifiy Connect on my raspberry. The service on the raspi is still running. After stopping and starting the Spotify connect on the raspi is fond immediately and is working fine.
After some hours of not using I have reproducible the same effect.Regards
Thorsten3. November 2017 at 12:20 #32270Hi Thorsten,
I assume you are using the Max2Play Spotify Connect and not the Spotty plugin’s new feature for Spotify Connect?
In that case, please try clicking „reinstall“ to get the latest version of librespot on which this plugin is based.
Also, you can add the hw volume control, similarly to Squeezelite.
edit: Du kannst außerdem versuchen, bei den Command Line Options “–device hw:0” oder “–device hw:1” einzutragen. Je nachdem, welchen Slot deine Soundkarte hat (wenn Build-In Audio deaktivier ist, ist es 0, wenn nicht, ist es 1).
5. November 2017 at 23:42 #32299Hi Heiner,
you are right. I am using the Max2Play Spotify Connect.
I have followed your instructions but unfortunately there is still the same behavior. B. t. w., I have the same effect with an other Raspi (Raspi3, same max2play software, but Hifi Berry Digi+)Regards
Thorsten7. November 2017 at 17:16 #32329Hi Thorsten,
Do you have the Spotify/Squeezelite automatic Audio-Switch activated? Also, is your shairport autostart deactivated.
Furthermore, have you tried running Spotty on the LMS to see whether the same problem occurs in this setup?
18. Januar 2019 at 10:08 #43873This is the same issue I have. Running Rasp pi and IQAudio with Max2play Spotify connect on premium account. Spotty works fine through LMS (havent tried spotify connect through LMS – apparently is an option) but i wanted to switch to using Spotify connect directly on Max2play using the plugin. It works for a few days then the Raspi disappears from devices i can connect to in spotify app. I find that the issue can happen and spotify connect is service stays running but on the last occasion it has stopped. Log talks about panicking and something about rust…
I have the hw card select for audio output in spotify connect settings. Also have command line option: –initial-volume 50.
Also shairport is not set to autostart (squeezelite is).Tried re-installing Spotify connect plugin but not full Max2play re-install (yet) to no avail. Is there any obvious solution that I am overlooking or should I try re-installing a complete fresh install?
I thought maybe it might be to do with something else taking the access to the audio card but the only thing is squeezelite which is also set up but the issue happens without me playing anything on Squeezelite (maybe having it running is the issue)?
Log file:
INFO:librespot_playback::player: Loading track „One Love“ with Spotify URI „spotify:track:3VGggSf2S6P3779YgPjYEW“
INFO:librespot_playback::player: Track „One Love“ loaded
thread ‚main‘ panicked at ‚connection closed‘, libcore/option.rs:914:5
stack backtrace:
0: 0x9cb9ab – std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h9a3642c9f6f9c72d
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0x9d4b47 – std::sys_common::backtrace::print::h857488e4ca7f183a
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: 0x9ba3c7 – std::panicking::default_hook::{{closure}}::h69d8f4842e718136
at libstd/panicking.rs:211
3: 0x9ba057 – std::panicking::default_hook::h6dcc687f188bf47f
at libstd/panicking.rs:227
4: 0x9baadb – std::panicking::rust_panic_with_hook::hc321908595307e8d
at libstd/panicking.rs:463
5: 0x9ba617 – std::panicking::begin_panic_fmt::hc982e1fd1fa0bf7c
at libstd/panicking.rs:350
6: 0x9ba5df – rust_begin_unwind
at libstd/panicking.rs:328
7: 0xa1a3b3 – core::panicking::panic_fmt::h604cff786c7fe009
at libcore/panicking.rs:71
8: 0xa23317 – core::option::expect_failed::h5d2f9fad1c053e1a
at libcore/option.rs:914
9: 0x5fa1f3 – <librespot_core::session::DispatchTask<S> as futures::future::Future>::poll::hd19e7eab5344521d
10: 0x66d343 – <futures::future::join::Join<A, B> as futures::future::Future>::poll::he0d34dc52a6dc15e
11: 0x68bbeb – <futures::future::map::Map<A, F> as futures::future::Future>::poll::h72914db6de5c0dc2
12: 0x6a432f – <futures::future::map_err::MapErr<A, F> as futures::future::Future>::poll::hff5a33e13aa63299
13: 0x8e7b3f – futures::task_impl::std::set::h11fbde663e9da23e
14: 0x8e5ee3 – <futures::task_impl::Spawn<T>>::poll_future_notify::h1f5dadf17dc6fed0
15: 0x8ea807 – tokio::executor::current_thread::CurrentRunner::set_spawn::hbea13e558bfa84f5
16: 0x8ef1d3 – <tokio::executor::current_thread::scheduler::Scheduler<U>>::tick::hd8a23f66e53862f4
17: 0x8e5ba7 – <scoped_tls::ScopedKey<T>>::set::hc32e64633834effa
18: 0x8f2603 – <std::thread::local::LocalKey<T>>::with::hf2008c182fa53f44
19: 0x8f1ccf – <std::thread::local::LocalKey<T>>::with::h613425a247458594
20: 0x8f20af – <std::thread::local::LocalKey<T>>::with::hb0b1f89fcde726c3
21: 0x8edc0b – tokio_core::reactor::Core::poll::h854a3e1b89a82b9b
22: 0x5033b7 – tokio_core::reactor::Core::run::ha4d6f8476bb012d1
23: 0x4fd57f – librespot::main::h95a6d9f6a736a6db
24: 0x51c1bf – std::rt::lang_start::{{closure}}::ha1ba30460373e372
25: 0x9ba51f – std::panicking::try::do_call::h7e51fbf12cacd474
at libstd/rt.rs:59
at libstd/panicking.rs:310
26: 0x9dbaab – __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:105
27: 0x9bad4b – std::rt::lang_start_internal::h407c85f0b0630649
at libstd/panicking.rs:289
at libstd/panic.rs:374
at libstd/rt.rs:58
28: 0x4fe1bf – main
29: 0x76c92677 – __libc_start_main#### Librespot Command Line Options ####
error: Required option ’name‘ missing
Usage: /opt/spotifyconnect/librespot [options]Options:
-c, –cache CACHE Path to a directory where files will be cached.
–disable-audio-cache
Disable caching of the audio data.
-n, –name NAME Device name
–device-type DEVICE_TYPE
Displayed device type
-b, –bitrate BITRATE
Bitrate (96, 160 or 320). Defaults to 160
–onevent PROGRAM
Run PROGRAM when playback is about to begin.
-v, –verbose Enable verbose output
-u, –username USERNAME
Username to sign in with
-p, –password PASSWORD
Password
–proxy PROXY HTTP proxy to use when connecting
–disable-discovery
Disable discovery mode
–backend BACKEND
Audio backend to use. Use ‚?‘ to list options
–device DEVICE Audio device to use. Use ‚?‘ to list options if using
portaudio
–mixer MIXER Mixer to use
–initial-volume VOLUME
Initial volume in %, once connected (must be from 0 to
100)
–zeroconf-port ZEROCONF_PORT
The port the internal server advertised over zeroconf
uses.
–enable-volume-normalisation
Play all tracks at the same volume
–normalisation-pregain PREGAIN
Pregain (dB) applied by volume normalisation
–linear-volume
increase volume linear instead of logarithmic.24. Januar 2019 at 12:23 #44132Hi daveyboi,
Please try using Spotty’s Connect feature and see if the issue is present there.
3. Februar 2019 at 18:33 #44328Hi,
I’m running Max2Play Version 2.47 on Raspberry PI 3 with HiFiBerry AMP 2.
Only Spotify connect pluggin is running there.
Issue is very similar – Spotify connect service is running but after 6, till 24 hours (don’t know presicley), Max2Play spofity service is not listed on spofity app on phone. Only way to fix that is to restart the service.
I have this issue for some time (more than month).
Spotify connect was reinstalled – didn’t helped.As a workaround I’d like to restart this service every 4-8 hours, or on some defined hours (10pm, 5am). Is that possible?
Below debug from plugin:
#### Librespot Output #### INFO:librespot: librespot 431be9e (2018-05-18). Built on 2018-05-30. Build ID: YlMJ8i49 INFO:librespot_core::session: Connecting to AP "gew1-accesspoint-b-dvf3.ap.spotify.com:4070" INFO:librespot_core::session: Authenticated as "user" ! DEBUG:librespot_core::session: new Session[0] DEBUG:librespot_connect::spirc: new Spirc[0] DEBUG:librespot_core::mercury: new MercuryManager DEBUG:librespot_playback::player: new Player[0] INFO:librespot_playback::audio_backend::alsa: Using alsa sink DEBUG:librespot_connect::spirc: input volume:52428 to mixer: 16464 DEBUG:librespot_core::session: Session[0] strong=3 weak=2 INFO:librespot_core::session: Country: "PL" DEBUG:librespot_core::mercury: unknown subscription uri=hm://remote/3/user/user/57d16b810c182ccea6639ef961c2c474d639a041 DEBUG:librespot_core::mercury: subscribed uri=hm://remote/3/user/user/ count=0 DEBUG:librespot_connect::spirc: kMessageTypeNotify "Salon" 57d16b810c182ccea6639ef961c2c474d639a041 872833506 1549208542993 #### Librespot Command Line Options #### error: Required option 'name' missing Usage: /opt/spotifyconnect/librespot [options] Options: -c, --cache CACHE Path to a directory where files will be cached. --disable-audio-cache Disable caching of the audio data. -n, --name NAME Device name --device-type DEVICE_TYPE Displayed device type -b, --bitrate BITRATE Bitrate (96, 160 or 320). Defaults to 160 --onevent PROGRAM Run PROGRAM when playback is about to begin. -v, --verbose Enable verbose output -u, --username USERNAME Username to sign in with -p, --password PASSWORD Password --proxy PROXY HTTP proxy to use when connecting --disable-discovery Disable discovery mode --backend BACKEND Audio backend to use. Use '?' to list options --device DEVICE Audio device to use. Use '?' to list options if using portaudio --mixer MIXER Mixer to use --initial-volume VOLUME Initial volume in %, once connected (must be from 0 to 100) --zeroconf-port ZEROCONF_PORT The port the internal server advertised over zeroconf uses. --enable-volume-normalisation Play all tracks at the same volume --normalisation-pregain PREGAIN Pregain (dB) applied by volume normalisation --linear-volume increase volume linear instead of logarithmic.
4. Februar 2019 at 16:33 #44336Hi domino,
You can use HTTP requests to add commands from the Max2Play web interface anywhere.
To start and stop the Spotify Connect player, you can use the following commands:
http://IPADDRESS/plugins/spotifyconnect/controller/Setup.php?action=start http://IPADDRESS/plugins/spotifyconnect/controller/Setup.php?action=stop
However, you can also try out the Squeezebox Server solution and see whether this solves your issue.
4. Februar 2019 at 19:25 #44344Hi,
commands are working, I’ll see if scheduled cron stript will solve that issue.
Are there any other HTTP command available, like „status“, is there any documentation for that listed?I don’t know how to setup Squeezebox Server with Spotify and how it might help here.
Best,
- This reply was modified 5 years, 9 months ago by domino.priv.
5. Februar 2019 at 11:38 #44351Hi domino,
Check out our API-Examples plugin (preinstalled). There is all documentation on commands available in our web interface.
-
You must be logged in to reply to this topic.