Spotify Connect plugin does not autostart on boot

Max2Play Home Forums Max2Play on Raspberry PI Spotify Connect plugin does not autostart on boot

Viewing 8 posts - 1 through 8 (of 8 total)
  • 9. Januar 2021 at 7:21 #50565

    Hi,

    My Spotify Connect service does not autostart on boot, although I have selected the „Autostart Spotify Connect Service on Boot“ option. The plugin works fine when started manually.

    Any advice would be appreciated, thanks.

    M2P Version 2.53
    Raspberry PI 4B 4GB
    I have disabled IPv6′ in Raspberry Pi Settings

    Debug information:#### Librespot Output ####

    #### 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
    –ap-port AP_PORT
    Connect to AP with specified port. If no AP with that
    port are present fallback AP will be used. Available
    ports are usually 80, 443 and 4070
    –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 or alsa
    –mixer MIXER Mixer to use (alsa or softmixer)
    -m, –mixer-name MIXER_NAME
    Alsa mixer name, e.g „PCM“ or „Master“. Defaults to
    ‚PCM‘
    –mixer-card MIXER_CARD
    Alsa mixer card, e.g „hw:0“ or similar from `aplay
    -l`. Defaults to ‚default‘
    –mixer-index MIXER_INDEX
    Alsa mixer index, Index of the cards mixer. Defaults
    to 0
    –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.

    12. Januar 2021 at 16:35 #50594

    Hi OOC,

    Please try to reset all settings in the Spotify Connect plugin and only activate the autostart. Please do not enter a username and password either. All input fields should be empty. What does your debug info look like when you restart your device like this? Does the Spotify Connect service start?

    13. Januar 2021 at 9:00 #50601

    Hi Mario,

    Thanks for the suggestion.

    The files that were set on the Spotify Connect Plugin were: Username, Password, Output Device and Spotify/Squeezelite automatic Audio-Switch.

    I cleared the above fields with the exception of Spotify/Squeezelite automatic Audio-Switch, which I could not clear.

    I clicked the reinstall Spotify Connect Service, and rebooted .

    The Spotify Connect Service is unfortunately, still not running.

    At some point I will need to repopulate the Spotify/Squeezelite automatic Audio-Switch parameter.

    Here’s the debug information:

    #### Librespot Output ####
    [2021-01-13T06:48:35Z INFO librespot] librespot 4e3576b (2019-06-01). Built on 2019-07-17. Build ID: PCNDMk8x
    thread ‚main‘ panicked at ‚called Result::unwrap() on an Err value: Os { code: 19, kind: Other, message: „No such device“ }‘, src/libcore/result.rs:1051:5
    stack backtrace:
    0: 0x9e77fc – backtrace::backtrace::libunwind::trace::hb6a132d591ca7611
    at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
    1: 0x9e77fc – backtrace::backtrace::trace_unsynchronized::h57632732de182e95
    at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
    2: 0x9e77fc – std::sys_common::backtrace::_print::h6cb4809c66c99661
    at src/libstd/sys_common/backtrace.rs:47
    3: 0x9e77fc – std::sys_common::backtrace::print::h6669d3820c576c3e
    at src/libstd/sys_common/backtrace.rs:36
    4: 0x9e77fc – std::panicking::default_hook::{{closure}}::h0ade7ad8763731e3
    at src/libstd/panicking.rs:200
    5: 0x9e73e0 – std::panicking::default_hook::hd3ea7a3eadd333fe
    at src/libstd/panicking.rs:214
    6: 0x9e7fc0 – std::panicking::rust_panic_with_hook::hce5e0d6d2351d34c
    at src/libstd/panicking.rs:477
    7: 0x9e7b84 – std::panicking::continue_panic_fmt::h442f516a43aa110c
    at src/libstd/panicking.rs:384
    8: 0x9e7a70 – rust_begin_unwind
    at src/libstd/panicking.rs:311
    9: 0xa015dc – core::panicking::panic_fmt::hffa19936292f87b2
    at src/libcore/panicking.rs:85
    10: 0x50b4d4 – core::result::unwrap_failed::hac78c8f2ff037971
    11: 0x4e86b4 – librespot::main::h71ab04162931f1e7
    12: 0x4ef800 – std::rt::lang_start::{{closure}}::h2c5bdf993942fb67
    13: 0x9e79e8 – std::rt::lang_start_internal::{{closure}}::hcdb405dd64721e03
    at src/libstd/rt.rs:49
    14: 0x9e79e8 – std::panicking::try::do_call::hfebf9402a8333320
    at src/libstd/panicking.rs:296
    15: 0x9eef38 – __rust_maybe_catch_panic
    at src/libpanic_unwind/lib.rs:82
    16: 0x9e843c – std::panicking::try::h4211c5f7da29f2ec
    at src/libstd/panicking.rs:275
    17: 0x9e843c – std::panic::catch_unwind::h59ca36657f00e168
    at src/libstd/panic.rs:394
    18: 0x9e843c – std::rt::lang_start_internal::ha24163ef22e56cef
    at src/libstd/rt.rs:48
    19: 0x4e8dc4 – main
    20: 0xb6e5f718 – __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
    –ap-port AP_PORT
    Connect to AP with specified port. If no AP with that
    port are present fallback AP will be used. Available
    ports are usually 80, 443 and 4070
    –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 or alsa
    –mixer MIXER Mixer to use (alsa or softmixer)
    -m, –mixer-name MIXER_NAME
    Alsa mixer name, e.g „PCM“ or „Master“. Defaults to
    ‚PCM‘
    –mixer-card MIXER_CARD
    Alsa mixer card, e.g „hw:0“ or similar from `aplay
    -l`. Defaults to ‚default‘
    –mixer-index MIXER_INDEX
    Alsa mixer index, Index of the cards mixer. Defaults
    to 0
    –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.

    13. Januar 2021 at 13:35 #50604

    Hi OOC,

    „No such device“ indicates that the sound output was not selected or it is not recognized. Please select your sound card there and try again.

    13. Januar 2021 at 16:13 #50605

    Hi Mario,

    In Spotify Connect
    1.My sound card is selected as follows. Output Device: hw:sndrpihifiberry – sndrpihifiberry, hw:sndrpihifiberry (written here as listed)

    2. Spotify/Squeezelite automatic Audio-Switch is set to the IP of the Squeezebox-Server

    3. All other settings are blank.

    All is working well, apart from the fact that on reboot, Spotify Connect does not start automatically.

    #### Librespot Output ####

    #### 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
    –ap-port AP_PORT
    Connect to AP with specified port. If no AP with that
    port are present fallback AP will be used. Available
    ports are usually 80, 443 and 4070
    –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 or alsa
    –mixer MIXER Mixer to use (alsa or softmixer)
    -m, –mixer-name MIXER_NAME
    Alsa mixer name, e.g „PCM“ or „Master“. Defaults to
    ‚PCM‘
    –mixer-card MIXER_CARD
    Alsa mixer card, e.g „hw:0“ or similar from `aplay
    -l`. Defaults to ‚default‘
    –mixer-index MIXER_INDEX
    Alsa mixer index, Index of the cards mixer. Defaults
    to 0
    –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.

    Regards,
    Maurice.

    14. Januar 2021 at 16:53 #50613

    Hi Maurice,

    Please deactivate Squeezelite and remove it from the autostart. Does Spotify Connect autostart now?

    21. Januar 2021 at 13:15 #50627

    Hi Mario,

    No change unfortunately.

    I had a spare SD card, so today have completed the following steps
    Flash the sd card with m2p_buster_rpi-v253_new.img
    Installed my HiFi Berry DAC + Pro
    Rebooted.
    Selected the „Advanced: A real multiroom audio player“ option
    Rebooted
    Installed and configured the M2P Spotify Connect Plugin, including the option to restart the service on reboot
    Installed and configured the Spotty Plugin.
    Tested. Spotify is playing via my HiFi Berry DAC+ Pro successfully.

    Rebooted via the M2P Setting/Reboot Option.
    Result: The Spotify Connect Service is not running.

    Are you able to test the above to determine if you experience the same issue please?

    For completeness, here’s the debug log from the Spotify Connect Tab, as reported following the above reboot:

    [2021-01-21T11:11:45Z INFO librespot] librespot 4e3576b (2019-06-01). Built on 2019-07-17. Build ID: PCNDMk8x
    thread ‚main‘ panicked at ‚called Result::unwrap() on an Err value: Os { code: 19, kind: Other, message: „No such device“ }‘, src/libcore/result.rs:1051:5
    stack backtrace:
    0: 0x94f7fc – backtrace::backtrace::libunwind::trace::hb6a132d591ca7611
    at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88
    1: 0x94f7fc – backtrace::backtrace::trace_unsynchronized::h57632732de182e95
    at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66
    2: 0x94f7fc – std::sys_common::backtrace::_print::h6cb4809c66c99661
    at src/libstd/sys_common/backtrace.rs:47
    3: 0x94f7fc – std::sys_common::backtrace::print::h6669d3820c576c3e
    at src/libstd/sys_common/backtrace.rs:36
    4: 0x94f7fc – std::panicking::default_hook::{{closure}}::h0ade7ad8763731e3
    at src/libstd/panicking.rs:200
    5: 0x94f3e0 – std::panicking::default_hook::hd3ea7a3eadd333fe
    at src/libstd/panicking.rs:214
    6: 0x94ffc0 – std::panicking::rust_panic_with_hook::hce5e0d6d2351d34c
    at src/libstd/panicking.rs:477
    7: 0x94fb84 – std::panicking::continue_panic_fmt::h442f516a43aa110c
    at src/libstd/panicking.rs:384
    8: 0x94fa70 – rust_begin_unwind
    at src/libstd/panicking.rs:311
    9: 0x9695dc – core::panicking::panic_fmt::hffa19936292f87b2
    at src/libcore/panicking.rs:85
    10: 0x4734d4 – core::result::unwrap_failed::hac78c8f2ff037971
    11: 0x4506b4 – librespot::main::h71ab04162931f1e7
    12: 0x457800 – std::rt::lang_start::{{closure}}::h2c5bdf993942fb67
    13: 0x94f9e8 – std::rt::lang_start_internal::{{closure}}::hcdb405dd64721e03
    at src/libstd/rt.rs:49
    14: 0x94f9e8 – std::panicking::try::do_call::hfebf9402a8333320
    at src/libstd/panicking.rs:296
    15: 0x956f38 – __rust_maybe_catch_panic
    at src/libpanic_unwind/lib.rs:82
    16: 0x95043c – std::panicking::try::h4211c5f7da29f2ec
    at src/libstd/panicking.rs:275
    17: 0x95043c – std::panic::catch_unwind::h59ca36657f00e168
    at src/libstd/panic.rs:394
    18: 0x95043c – std::rt::lang_start_internal::ha24163ef22e56cef
    at src/libstd/rt.rs:48
    19: 0x450dc4 – main
    20: 0xb6daa718 – __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
    –ap-port AP_PORT
    Connect to AP with specified port. If no AP with that
    port are present fallback AP will be used. Available
    ports are usually 80, 443 and 4070
    –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 or alsa
    –mixer MIXER Mixer to use (alsa or softmixer)
    -m, –mixer-name MIXER_NAME
    Alsa mixer name, e.g „PCM“ or „Master“. Defaults to
    ‚PCM‘
    –mixer-card MIXER_CARD
    Alsa mixer card, e.g „hw:0“ or similar from `aplay
    -l`. Defaults to ‚default‘
    –mixer-index MIXER_INDEX
    Alsa mixer index, Index of the cards mixer. Defaults
    to 0
    –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.

    Regards,
    Maurice.

    22. Januar 2021 at 15:16 #50631

    Hi Maurice,

    I tested your configuration and Spotify Connect started automatically on the device. I made the following settings in the Spotify plugin: Autostart, username, password, output device, automatic audio switch. I set Squeezelite to the same output and activated the autostart there as well. Both services started automatically after a restart of the device.

    If you use the Spotty plugin for the Squeezebox server, you don’t necessarily need our Spotify Connect plugin. You can set Spotify Connect Players in the Spotty plugin too.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Register here