[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Discuss, contribute and orient Volumio development!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby ashthespy » Fri Nov 23 2018 20:03

thomasweg wrote:As far as i understand vollibrespot was installed?

Code: Select all
volumio@volumio:~$ ls /data/plugins/music_service/volspotconnect2/
SpotConnController.js  logger.js          startconnect.sh
UIConfig.json          node_modules       uninstall.sh
config.json            onstart1.sh        vollibrespot-armv6l.tar.xz
i18n                   package-lock.json  volspotconnect2.service.tar
index.js               package.json       volspotconnect2.tmpl
install.sh             remove.sh


Nope, it has been downloaded, but has been unable to extract it. Strange.
You could try removing the archive and re-downloading/extracting it via that script I posted:
Code: Select all
rm  vollibrespot-armv6l.tar.xz
curl https://gist.githubusercontent.com/ashthespy/8f86f1825acbd716fc4b78c63d7ce683/raw/06f9a33ff9e39f6a7b83d97ab758cbe98ef64f9e/getVollibrespot.sh | bash

Or, you can try extracting the archive manually with:
Code: Select all
tar -xf  vollibrespot-armv6l.tar.xz
# Test the new binary
./vollibrespot -v

thomasweg wrote:Maybe i try a new installation of volumio this evening.
BTW i am running on raspberry pi zero w.


That shouldn't be an issue - I run it on a pi zero myself :-)
User avatar
ashthespy
Objectivist
Objectivist
 
Posts: 288
Joined: Fri Jul 22 2016 08:16

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby dvpaassen » Fri Nov 23 2018 21:36

Had some questions about the volume.
because now when I restart the plugin it resets the volumio volume to 33 or
whatever volume the initial volume is set.

you mentioned setting the volume to the start volume of volumio, but wouldn't it be much
better to check the volume of volumio at the start of each song?
this way it will never be to soft or to loud?

cheers
Dennis
Volumio2 raspbery pi3B, audiophonics sabre dac v3, PS Audio Sprout 100, Wharfedal Diamond 10.1
User avatar
dvpaassen
Sunday DIYer
Sunday DIYer
 
Posts: 16
Joined: Wed Sep 28 2016 11:59
Location: Eindhoven


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby thomasweg » Fri Nov 23 2018 22:04

ashthespy wrote:Nope, it has been downloaded, but has been unable to extract it. Strange.
You could try removing the archive and re-downloading/extracting it via that script I posted:
Code: Select all
rm  vollibrespot-armv6l.tar.xz
curl https://gist.githubusercontent.com/ashthespy/8f86f1825acbd716fc4b78c63d7ce683/raw/06f9a33ff9e39f6a7b83d97ab758cbe98ef64f9e/getVollibrespot.sh | bash

Or, you can try extracting the archive manually with:
Code: Select all
tar -xf  vollibrespot-armv6l.tar.xz
# Test the new binary
./vollibrespot -v



After removing and downloading again:
Code: Select all
volumio@volumio:/data/plugins/music_service/volspotconnect2$ curl https://gist                                  ithubusercontent.com/ashthespy/8f86f1825acbd716fc4b78c63d7ce683/raw/06f9a33ff9e3                                  9f6a7b83d97ab758cbe98ef64f9e/getVollibrespot.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1657  100  1657    0     0   8481      0 --:--:-- --:--:-- --:--:--  8541
Detected cpu architecture as armv6l
Supported device (arch = armv6l), downloading required packages
https://github.com/ashthespy/Vollibrespot/releases/download/v0.1.2/vollibrespot-                                  armv6l.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   617    0   617    0     0    923      0 --:--:-- --:--:-- --:--:--   923
100 4441k  100 4441k    0     0  1202k      0  0:00:03  0:00:03 --:--:-- 1921k
Extracting...
-rw-r--r-- 1 volumio volumio 4548188 Nov 23 22:01 vollibrespot-armv6l.tar.xz
tar (child): lbzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now


volumio@volumio:/data/plugins/music_service/volspotconnect2$ ls
SpotConnController.js  logger.js          startconnect.sh
UIConfig.json          node_modules       uninstall.sh
config.json            onstart1.sh        vollibrespot-armv6l.tar.xz
i18n                   package-lock.json  volspotconnect2.service.tar
index.js               package.json       volspotconnect2.tmpl
install.sh             remove.sh



If i try to extract it manually i get the same error.
Random avatar
thomasweg
Sunday DIYer
Sunday DIYer
 
Posts: 13
Joined: Tue Feb 27 2018 07:15


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby ashthespy » Sat Nov 24 2018 09:13

thomasweg wrote:If i try to extract it manually i get the same error.


My oversight, fixed it only for armv7 - it should now work properly for your armv6 as well - can you remove the archive and retry the script?


dvpaassen wrote:Had some questions about the volume.
because now when I restart the plugin it resets the volumio volume to 33 or
whatever volume the initial volume is set.

you mentioned setting the volume to the start volume of volumio, but wouldn't it be much
better to check the volume of volumio at the start of each song?
this way it will never be to soft or to loud?

cheers
Dennis


Well - the initial volume flag was left in place for people who don't have a mixer in their volumio setup - but the more I think of it, the more I feel this flag is redundant now that we hook into the alsa subsystem directly.
To clarify though - when you start playing a new song from Spotify - it uses the last volume set on the player, this flag is only for when the daemon is initialised.
Last edited by ashthespy on Sat Nov 24 2018 19:44, edited 1 time in total.
User avatar
ashthespy
Objectivist
Objectivist
 
Posts: 288
Joined: Fri Jul 22 2016 08:16


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby thomasweg » Sat Nov 24 2018 12:50

Thanks it works now!
Random avatar
thomasweg
Sunday DIYer
Sunday DIYer
 
Posts: 13
Joined: Tue Feb 27 2018 07:15


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby totyc » Sat Dec 22 2018 18:18

Hi,

I have two VOLUMIO on ODROID C2 boards. Both are very similar ... One is for daily play ( let me say stable previous configuration), and the another is for testing ( new updates) ...

The latest volspotconnect2 version 0.8.0 does not start on latest volumio odroid-c2 version 2.513.
But volspotconnect2 version 0.7.4 on latest volumio odroid-c2 version 2.513 runs well and
volspotconnect2 version 0.8.0 on previous stable volumio odroid-c2 version 2.344 runs well to.

The log :

As volspotconnect2 is enabled on volumio UI, the volspotconnect2 DAEMON fall into endless start-panic-fail-stop -> start-panic-fail-stop -> .... cycles.
Starting Volspotconnect2 Daemon...
Started Volspotconnect2 Daemon.
vollibrespot v0.1.2 edd446b 2018-11-24 (librespot e386736 2018-10-16) -- Built On 2018-11-24
[Vollibrespot] : Connecting to AP "gew1-accesspoint-b-49kw.ap.spotify.com:4070"
[Vollibrespot] : Authenticated as "******" !
[Vollibrespot] : Setting up new mixer: card:hw:2 mixer:XMOS Clock Selector,1 index:0
thread 'main' panicked at 'Couldn't find SelemId', libcore/option.rs:1000:5
stack backtrace:
0: 0xab3c7f97 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h3608b871673a8803
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0xab3b788f - std::sys_common::backtrace::print::hef947be8cf8e8f55
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: 0xab3b53cb - std::panicking::default_hook::{{closure}}::haac47ed356699ffe
at libstd/panicking.rs:211
3: 0xab3b5043 - std::panicking::default_hook::h95ba73384225983b
at libstd/panicking.rs:227
4: 0xab3b5af3 - std::panicking::rust_panic_with_hook::ha1106c0ce43cea72
at libstd/panicking.rs:477
5: 0xab3b56b7 - std::panicking::continue_panic_fmt::h875c7946721c05c9
at libstd/panicking.rs:391
6: 0xab3b559f - rust_begin_unwind
at libstd/panicking.rs:326
7: 0xab405e8b - core::panicking::panic_fmt::h429a06507aba9228
at libcore/panicking.rs:77
8: 0xab405efb - core::option::expect_failed::h4c79c3aae6612643
at libcore/option.rs:1000
9: 0xaaf9b8fb - <librespot_playback::mixer::alsamixer::AlsaMixer as librespot_playback::mixer::Mixer>::open::h6f2c7cc27583be1a
10: 0xaaf0816b - librespot_playback::mixer::mk_sink::h1fe9d479b03e9d6a
11: 0xaaf03dc7 - <vollibrespot::Main as futures::future::Future>::poll::h9aa5702efe23765c
12: 0xaaf2079f - futures::task_impl::std::set::hc5b42f5e4a012d33
13: 0xaaf0ece7 - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::h54cc7a708f9559ee
14: 0xaaf2061f - futures::task_impl::std::set::habc81e09c1531b30
15: 0xaaf1121b - <std::thread::local::LocalKey<T>>::with::hb83e9a52fad8eee0
16: 0xaaeee323 - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h97f1a330ddac7d85
17: 0xaaf10177 - <std::thread::local::LocalKey<T>>::with::h03605704adac2fed
18: 0xaaf11347 - <std::thread::local::LocalKey<T>>::with::he233178a0ce1c9b9
19: 0xaaf109d3 - <std::thread::local::LocalKey<T>>::with::h5c354a02f2820963
20: 0xaaf216f7 - <scoped_tls::ScopedKey<T>>::set::h5355effb08029532
21: 0xaaf16327 - tokio_core::reactor::Core::run::h95b80267a8f1c284
22: 0xaaf067eb - vollibrespot::main::h07f4ad7e4bd4c28c
23: 0xaaf1703b - std::rt::lang_start::{{closure}}::hb66c7d9e0090f80d
24: 0xab3b5517 - std::panicking::try::do_call::haa4d884de44899fd
at libstd/rt.rs:59
at libstd/panicking.rs:310
25: 0xab3d0f57 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:103
26: 0xab3b455f - std::panic::catch_unwind::h90512a021818b18b
at libstd/panicking.rs:289
at libstd/panic.rs:392
27: 0xab3b2f1b - std::rt::lang_start_internal::h2c5a86fd7f2a32eb
volspotconnect2.service: main process exited, code=exited, status=101/n/a
Unit volspotconnect2.service entered failed state.
at libstd/rt.rs:58
28: 0xaaf0763f - main
29: 0xf74d1631 - __libc_start_main
Stopping Volspotconnect2 Daemon...
Stopped Volspotconnect2 Daemon.
Stopped Volspotconnect2 Daemon.


Any idea ? Suggestion ? Where to start debugging ?
Config : VOLUMIO 2.513 / ODROID-C2 with VU7

Best Regards,

totyc
Random avatar
totyc
Serious Listener
Serious Listener
 
Posts: 68
Joined: Wed Oct 05 2016 17:08
Location: Budapest, Hungary


Re: [PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby Atca » Sun Dec 23 2018 16:25

How can I capitalise the system name? I.e. shows streamer and I want to show Streamer?

The ssh name and hostname is capitalised.
Random avatar
Atca
Sunday DIYer
Sunday DIYer
 
Posts: 47
Joined: Sat Jun 20 2015 18:05


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby ashthespy » Mon Dec 24 2018 13:57

totyc wrote:Hi,

I have two VOLUMIO on ODROID C2 boards. Both are very similar ... One is for daily play ( let me say stable previous configuration), and the another is for testing ( new updates) ...

The latest volspotconnect2 version 0.8.0 does not start on latest volumio odroid-c2 version 2.513.
But volspotconnect2 version 0.7.4 on latest volumio odroid-c2 version 2.513 runs well and
volspotconnect2 version 0.8.0 on previous stable volumio odroid-c2 version 2.344 runs well to.

Any idea ? Suggestion ? Where to start debugging ?


From the logs the issue is in determining the right ALSA device:
Code: Select all
[Vollibrespot] : Setting up new mixer: card:hw:2 mixer:XMOS Clock Selector,1 index:0
thread 'main' panicked at 'Couldn't find SelemId', libcore/option.rs:1000:5
stack backtrace:


I haven't looked into what has changed fr0m 2.344 => 2.513, they could have made some changes to the card naming scheme, got to check.
In the meantime, can you share your alsa setup from`startconnect.sh` file and from `aplay -l`?


Atca wrote:How can I capitalise the system name? I.e. shows streamer and I want to show Streamer?

The ssh name and hostname is capitalised.

change the `--name` flag in `startconnect.sh` - but this will be rewritten on every reboot. I started working on this from the Volumio side, but got side tracked as there were to many other things to fix first (like persistent UI warnings and others).
For something more permanent, just hard-code it into the `volspotconnect2.tmpl` file and remove the `'${devicename}'` entry.
User avatar
ashthespy
Objectivist
Objectivist
 
Posts: 288
Joined: Fri Jul 22 2016 08:16


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby totyc » Mon Dec 24 2018 18:44

Currently I'm using HiFi Shield 2 as the output device. VSC2 dev 0.8.0 works well. But here are your requested results :

/data/plugins/music_service/volspotconnect2//startconnect.sh :
#this file is generated by the plugin. You should not edit it unless you know what you do. It will $
cd /data/plugins/music_service/volspotconnect2
./vollibrespot -b 320 -c /tmp \
--disable-audio-cache \
--name 'vu7Volumio' --initial-volume 100\
--device plughw:1 \
--mixer alsa \
--mixer-name 'Digital' --mixer-card 'hw:1' \
# --verbose


aplay -l :
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDDAC2 [ODROID-DAC2], device 0: I2S pcm512x-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0


My next post will contains results with Topping D30 USB DAC as output device
Config : VOLUMIO 2.513 / ODROID-C2 with VU7

Best Regards,

totyc
Random avatar
totyc
Serious Listener
Serious Listener
 
Posts: 68
Joined: Wed Oct 05 2016 17:08
Location: Budapest, Hungary


[PLUGIN] Volspotconnect2 - SpotifyConnect for Volumio2

Postby totyc » Mon Dec 24 2018 19:10

Currently I'm using Topping D30 USB DAC as the output device. Here are your requested results :
After changing output device from HiFi Shield 2 to Topping D30 USB DAC.
VSC2 dev ver 0.8.0 was NOT RESTARTED !!

/data/plugins/music_service/volspotconnect2/startconnect.sh
#this file is generated by the plugin. You should not edit it unless you know what you do. It will $
cd /data/plugins/music_service/volspotconnect2
./vollibrespot -b 320 -c /tmp \
--disable-audio-cache \
--name 'vu7Volumio' --initial-volume 100\
--device plughw:1 \
--mixer alsa \
--mixer-name 'Digital' --mixer-card 'hw:1' \
# --verbose

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ODROIDHDMI [ODROID-HDMI], device 0: I2S dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ODROIDDAC2 [ODROID-DAC2], device 0: I2S pcm512x-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: D30 [D30], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0


VSC2 dev ver 0.8.0 was RESTARTED !! VSC" ON->OFF->ON the endless loop start again, and the startconnect.sh changed !

/data/plugins/music_service/volspotconnect2/startconnect.sh :
#this file is generated by the plugin. You should not edit it unless you know what you do. It will be overwrite by the plugin each time a change in config is$
cd /data/plugins/music_service/volspotconnect2
./vollibrespot -b 320 -c /tmp \
--disable-audio-cache \
--name 'vu7Volumio' --initial-volume 100\
--device plughw:2 \
--mixer alsa \
--mixer-name 'XMOS Clock Selector,1' --mixer-card 'hw:2' \
# --verbose


The journal is :
sudo journalctl -f -o cat -u volspotconnect2.service :
Starting Volspotconnect2 Daemon...
Started Volspotconnect2 Daemon.
vollibrespot v0.1.2 edd446b 2018-11-24 (librespot e386736 2018-10-16) -- Built On 2018-11-24
[Vollibrespot] : Failed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
[Vollibrespot] : Connecting to AP "gew1-accesspoint-b-wc57.ap.spotify.com:4070"
[Vollibrespot] : Authenticated as "totyc" !
[Vollibrespot] : Setting up new mixer: card:hw:2 mixer:XMOS Clock Selector,1 index:0
thread 'main' panicked at 'Couldn't find SelemId', libcore/option.rs:1000:5
stack backtrace:
0: 0xab195f97 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::h3608b871673a8803
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0xab18588f - std::sys_common::backtrace::print::hef947be8cf8e8f55
at libstd/sys_common/backtrace.rs:71
at libstd/sys_common/backtrace.rs:59
2: 0xab1833cb - std::panicking::default_hook::{{closure}}::haac47ed356699ffe
at libstd/panicking.rs:211
3: 0xab183043 - std::panicking::default_hook::h95ba73384225983b
at libstd/panicking.rs:227
4: 0xab183af3 - std::panicking::rust_panic_with_hook::ha1106c0ce43cea72
at libstd/panicking.rs:477
5: 0xab1836b7 - std::panicking::continue_panic_fmt::h875c7946721c05c9
at libstd/panicking.rs:391
6: 0xab18359f - rust_begin_unwind
at libstd/panicking.rs:326
7: 0xab1d3e8b - core::panicking::panic_fmt::h429a06507aba9228
at libcore/panicking.rs:77
8: 0xab1d3efb - core::option::expect_failed::h4c79c3aae6612643
at libcore/option.rs:1000
9: 0xaad698fb - <librespot_playback::mixer::alsamixer::AlsaMixer as librespot_playback::mixer::Mixer>::open::h6f2c7cc27583be1a
10: 0xaacd616b - librespot_playback::mixer::mk_sink::h1fe9d479b03e9d6a
11: 0xaacd1dc7 - <vollibrespot::Main as futures::future::Future>::poll::h9aa5702efe23765c
12: 0xaacee79f - futures::task_impl::std::set::hc5b42f5e4a012d33
13: 0xaacdcce7 - <futures::future::lazy::Lazy<F, R> as futures::future::Future>::poll::h54cc7a708f9559ee
14: 0xaacee61f - futures::task_impl::std::set::habc81e09c1531b30
15: 0xaacdf21b - <std::thread::local::LocalKey<T>>::with::hb83e9a52fad8eee0
16: 0xaacbc323 - <tokio::executor::current_thread::Entered<'a, P>>::block_on::h97f1a330ddac7d85
17: 0xaacde177 - <std::thread::local::LocalKey<T>>::with::h03605704adac2fed
18: 0xaacdf347 - <std::thread::local::LocalKey<T>>::with::he233178a0ce1c9b9
19: 0xaacde9d3 - <std::thread::local::LocalKey<T>>::with::h5c354a02f2820963
20: 0xaacef6f7 - <scoped_tls::ScopedKey<T>>::set::h5355effb08029532
21: 0xaace4327 - tokio_core::reactor::Core::run::h95b80267a8f1c284
22: 0xaacd47eb - vollibrespot::main::h07f4ad7e4bd4c28c
23: 0xaace503b - std::rt::lang_start::{{closure}}::hb66c7d9e0090f80d
24: 0xab183517 - std::panicking::try::do_call::haa4d884de44899fd
at libstd/rt.rs:59
at libstd/panicking.rs:310
25: 0xab19ef57 - __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:103
26: 0xab18255f - std::panic::catch_unwind::h90512a021818b18b
at libstd/panicking.rs:289
at libstd/panic.rs:392
27: 0xab180f1b - std::rt::lang_start_internal::h2c5a86fd7f2a32eb
at libstd/rt.rs:58
28: 0xaacd563f - main
29: 0xf7122631 - __libc_start_main
volspotconnect2.service: main process exited, code=exited, status=101/n/a
Unit volspotconnect2.service entered failed state.
volspotconnect2.service holdoff time over, scheduling restart.
Stopping Volspotconnect2 Daemon...
Starting Volspotconnect2 Daemon...
Started Volspotconnect2 Daemon.
Config : VOLUMIO 2.513 / ODROID-C2 with VU7

Best Regards,

totyc
Random avatar
totyc
Serious Listener
Serious Listener
 
Posts: 68
Joined: Wed Oct 05 2016 17:08
Location: Budapest, Hungary

PreviousNext

Return to Development talks

Who is online

Users browsing this forum: No registered users and 0 guests