Giter Site home page Giter Site logo

volumio-snapcast-plugin's Introduction

DISCONTINUED in favor of separate plugins

SnapServer: https://github.com/Saiyato/volumio-snapserver-plugin

SnapClient: https://github.com/Saiyato/volumio-snapclient-plugin

volumio-snapcast-plugin

Volumio 2 SnapCast plugin, to easily manage SnapCast functionality

Quick start

  1. SSH into server
  2. Download .zip of repository and unzip or clone repository
  3. CD into volumio-snapcast-plugin directory
  4. Remove the volumio-snapcast-plugin.zip if you don't do this, the install will fail because it will try and mv two zips, volumio-snapcast-plugin.zip and the one created by the next command (snapcast.zip) to one location in /tmp.
  5. Type the command: volumio plugin install
  6. Wait a few minutes for message saying install was successful.
  7. Login to Volumio IU
  8. Configure the output format (sampling, bit depth, codec, etc.).
  9. Configure the soundcard for the client.
  10. In the case of a slave device disable the server and connect to the running server; a. This can be either a Volumio host (drop down) or any other SnapCast server (define custom host -> fill in the IP-address) b. You cannot select a stream from within the plugin at this time, you can use the Android app for this. Default the first stream will be selected; in the case of this plugin that will be the MPD stream.
  11. Enjoy in-sync music in high fidelity.

The package will install both the client and server, you can en- or disable any component in the plugin settings.

Please note that I did not write the SnapCast application, I merely supplied means to easily install it. You can find the SnapCast project and all the information you need here: https://github.com/badaix/snapcast

More elaborate explanation

On popular demand hereby a more elaborate description of the settings. They all relate to either snapcast, MPD or any of the Spotify implementations already in place.

The multiroom environment

The image below shows how a multiroom environment using SnapCast could look like. The main device, let's call that the server, will be hosting the audio chunks to all clients in the network. All music services on the server will have a fifo or pipe output defined, meaning they will not output to ALSA anymore.

The flow of the audio is as follows: Audio service -> FIFO/PIPE -> the SnapServer component will read the FIFO file (maybe even resample) and serve it -> The SnapClient component is able to receive the audio chunks and send them to an ALSA device -> ALSA -> Amplifier -> your speakers

The clients, either on the server or on another device, will be connected to the server (and the desired stream, because the server can host multiple streams). They can be configured in a hybrid way, so you can use them as SnapClient or stand-alone instance of Volumio, depening on your moods and desires.

How do you configure a hybrid device?

  1. Install the SnapCast plugin
  2. Disable the SnapServer on the hybrid device
  3. Connect to your SnapServer (on the other device)
  4. Configure all audio services to output to ALSA (NOTE: if you are not using a mix device you might need to wait a few seconds if you switch between SnapClient and another audio service)

Alt text

SnapServer settings

This section configure the server-part behavior, disabling the server will stop the snapserver-service entirely.

Alt text

  1. Enable SnapServer: this switch toggles whether the snapserver-service should be started.
  2. Name of the main stream: this is the name shown in e.g. the Android app, it only has an aesthetical purpose.
  3. Sample rate: the rate to which any input is recalculated and streamed (default = 48000Hz).
  4. Bit depth: the bit depth to which any input is recalculated and streamed (default = 16 bit).
  5. Sound channels: the number of channels to which any input is recalculated and streamed (default = 2 = stereo).
  6. Codec to use: the codec used to stream the audio to the clients (default = FLAC).
SnapClient settings

This section configure the client-part behavior, disabling the client will stop the snapclient-service entirely.

Alt text

  1. Enable SnapClient: this switch toggles whether the snapclient-service should be started.
  2. Volumio host: this drop-down is populated using the Volumio-DNS function, it allows for easy configuration of a Volumio host (server).
  3. Define a custom host: this switch exposes (or hides) a free-text box to fill any hostname or IP in to connect to.
  4. SnapCast host (name/IP): A textbox to define a custom host to connect to, this overwrites any selected Volumio host.
  5. Soundcard to use for playback: a drop-down populated using the same function as Volumio, this should show all soundcards configured in Volumio.
MPD settings

This section allows for (re)configuration of MPD tailored to your needs. It will modify the existing mpd.conf, so you can always reconfigure should Volumio decide to write a new one.

Alt text

  1. Patch mpd.conf: this toggles whether the mpd.conf file should actually be patched when saving.
  2. MPD sample rate: the rate to which MPD recalculates for playback.
  3. MPD bit depth: the bit depth to which MPD recalculates for playback.
  4. MPD channels: the number of channels to which MPD recalculates for playback.
  5. ALSA output for MPD: this en- or disables ALSA output for MPD, you can simultaneously use ALSA and FIFO outputs (even to different soundcards).
  6. FIFO output for MPD: this en- or disables FIFO output for MPD, you can simultaneously use ALSA and FIFO outputs (even to different soundcards).
Patch ALSA configuration

This section has the option to write (or modify) the existing ALSA configuration (asound.conf). It will gather the needed settings from the plugin (spotify FIFO and sample rate) and write the needed section in asound.conf.

Alt text

  1. ALSA configuration file: this setting is read-only, it shows which file will be edited upon save.
Spotify integration settings

The Spotify integration settings section exposes a host of settings for the chosen Spotify implementation. Some options are related to one another, but I was unable to add that dimension to the web form.

Alt text

  1. Dedicated stream for Spotify: this en- or disables a dedicated (named) stream for the chosen Spotify implementation. If you don't want this, remember to pause any other application streaming to the same FIFO file or you will hear both outputs.
  2. Name of the Spotify stream: only applies if you chose to use a dedicated stream (which is implicitly chose when a standalone option is used).
  3. Spotify implementation: select the Spotify implementation you want to use (remember you still need to install needed plugins/binaries!). If you want to use a standalone Librespot library, you will automatically get a dedicated stream, since this uses a different approach. Either stick to the rules or don't use this option, it's more advances and requires some know-how.
  4. Sample rate: the sample rate for the Spotify stream, recalculated by the snapserver-service.
  5. Bit depth: the bit depth for the Spotify stream, recalculated by the snapserver-service. NB: this option defaults to 16 bits when not using a dedicated stream.
  6. Sound channels: the number of channels for the Spotify stream, recalculated by the snapserver-service. NB: this option defaults to 2 when not using a dedicated stream.
  7. Expose Librespot settings: shows or hides the advanced Librespot settings.
  8. Location of the Librespot library: the absolute location of the Librespot library you want to use.
  9. Username: the username you want to use for the Librespot library.
  10. Password: the password matching the filled in username you want to use for the Librespot library.
  11. Devicename: the propagated devicename to Spotify.
  12. Spotify bitrate: controls the sound quality used by the Librespot library.
Patch Spotify configuration templates

This patches the volspotconnect templates for future use, note you will need to save (again) afterwards in the Spotify plugin for the changes to take effect.

Alt text

  1. Selected implementation: this shows the currently selected implementation (will only refresh upon page load!). If the selected implementation is librespot, patching will not change anything.
Configure SnapServer streams

This is a semi state-less section, only the first drop-down is populated when settings exist.

Alt text

  1. Select the client for which you want to control the volume for: this should show all clients known to the configured server. You can control the volume using the Volumio volume knob for the selected client.
  2. Switch stream for a client (group): exposed additional drop-downs to switch streams.
  3. Client to link to a specified stream: enumerates all known clients (but used their group-id, because groups are assigned streams, not clients) on the server.
  4. Select the stream you want to add the client to: enumerates all known streams (e.g. MPD/Spotify) on the server.

If you have used the Android app to add clients to groups, this means the whole group is assigned a new stream.

Current Volumio sound config

Shows the currently configured sound settings in Volumio.

Alt text

  1. Output device: configured device for output in Volumio (this does not affect the snapclient-service).
  2. Mixer: configured mixer for output in Volumio, not sure how this affects playback yet.

Troubleshooting

Any problems with the plugin should be solvable by (re)patching files and saving settings in the corresponding plugins.

How should I get started?

The following step-by-step is just an example, you can configure way more settings if you want to.

  1. Install all plugins you wish to use; Snapcast, Spotify Connect (e.g. volspotconnect(1|2), Spotify for Volumio 2 (spop), a stand-alone Librespot library, Qobuz, Youtube etc...
  2. If you wish to use Spotify; continue, else you only need to edit the first two sections if you want to deviate from standard behavior. So, assuming you want to use Spotify too, go to the "Spotify integration settings" section:

Decide whether you want a single stream for snapcast or not; single stream means connecting to the server is enough, with dedicated streams you need to switch streams for Spotify (either with an app, or the integrated stream selection in the plugin -> not very visually clarifying). Should you decide to go for a dedicated stream for Spotify you can choose a name for it in the next option.

Let's, for the sake of argument, work with an integrated stream, since I believe this is the most common setup (this is now the default).

The sample rate applies to all implementations, bit depth and channels don't apply to the spop implementation.

Flicking the expose Librespot switch exposes settings which are only needed when you use a stand-alone Librespot library for playback. Note: this is for advanced users only, you ought to know what you are doing if you want this to work.

Once all settings have been updated you can save them.

  1. Re-open the snapcast plugin and patch the corresponding plugin template.

  2. Now you need to save the settings in the plugin whose template you just patched, this will activate the new configuration and restart any needed binaries.

Contributing

Packaging this project

zip -r volumio-snapcast-plugin.zip \
    UIConfig.json \
    config.json \
    index.js \
    node_modules \
    package.json \
    spotififo.service \
    uninstall.sh \
    i18n \
    install.sh \
    options \
    templates

volumio-snapcast-plugin's People

Contributors

beankylla avatar bramoosterhuis avatar cschwede avatar heiderich avatar mikegilchrist avatar saiyato avatar sjol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

volumio-snapcast-plugin's Issues

install error

these are my steps

volumio@volumio:/volumio-snapcast-plugin-master$ rm volumio-snapcast-plugin.zip
volumio@volumio:
/volumio-snapcast-plugin-master$ volumio plugin install

This command will install the plugin on your device

Compressing the plugin
No modules found, running "npm install"
/bin/rm: cannot remove 'package-lock.json': No such file or directory
Error installing node modules: Error: Command failed: /bin/rm package-lock.json
/bin/rm: cannot remove 'package-lock.json': No such file or directory

/bin/mv: cannot stat '*.zip': No such file or directory
child_process.js:644
throw err;
^

Error: Command failed: /bin/mv .zip /tmp/plugins/snapcast.zip
/bin/mv: cannot stat '
.zip': No such file or directory

at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at install (/volumio/pluginhelper.js:680:9)
at Object.<anonymous> (/volumio/pluginhelper.js:741:9)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)

volumio@volumio:~/volumio-snapcast-plugin-master$

Volumio Snapcast-> Spotify and radios

Hello Saiyato,

First of all thanks for your amazing work regarding this awesome plugin!

As a background I had a running setup with manual installed snapcast server and client V0.11 and librespot. Currently I am facing the problem that I cannot get an output via the Spotify “stream” with VolSpotConnect2 nor librespot (standalone).
My volumio version is 2.201 and I have installed your plugin (server and client v0.13 and then the volspotplugin2).
The volspotplugin is working in standalone (I can connect with Spotify and play music).

cat /data/plugins/music_service/volspotconnect2/startconnect.sh
gives me
./librespot -b 320 -c /tmp --name 'wohnzimmer' --backend alsa --device plughw:1 --disable-audio-cache --initial-volume 33

I have manually changed to pipe and /tmp/spotififo but after every restart it goes back to alsa and plughw:1.

What is the exact settings of volumio and your plugin to get all that working?
When i play internet radio this only works after a restart later there appear mpd problems.
How can i solve that?

My goal is to get volumio/Spotify/Airplay (Shairport sync running with snapcast.

Where is my failure?
Hope you can help me to get it running again.
Thank you in advance.

Best regards,
Dominik

Tutorial / Explanation?

Hey,

I came across your plugin and got very happy. I installed on both my volumio instances and activated server and client on one side and activated client on the other side. On my server I chose host on the snapclient setting and on the other device I chose the server in the snapclient setting. I think the rest must be ok. My question is how do I actually send music to both speaker? The Readme doesn't really contain an indication as to what to do...

how to upgrade

Hello
as you are pulling the last release of snapcast in your plugin
whats the process to upgrade your plugin and snapcast
especially now that the upload plugin function has been removed from volumio
thks

/tmp filling up - music stops playing

@Saiyato, please reference the below-linked discussion we had a few months ago on volumio forums. I had stopped using your plugin because of this issue and have been having no issues using volspotconnect2 with volumio for months now. I have just yesterday downloaded the latest version of your plugin and reinstalled. Again I'm seeing the /tmp folder filling up after 4 or so hours of playing; a reboot will empty it out and give me another 4 hours until it stops playing again.

Were you ever able to implement the change you mentioned in your last forum message - Getting rid of the cache option from the volspotconnect2 template?
I'm still seeing -c /tmp in startconnect.sh...

image

Forum Discussion:
https://volumio.org/forum/tmp-partition-filling-using-snapcast-spotify-t8020.html?hilit=snapcast#p40538

Thanks!

Can't get multiroom synchronized play to work

Hi,

I have 2 rapsberry pi 3 with the latest volumio image. I've also installed this plugin and followed the instructions, but I can't play them in sync.
I can stream from my iOs Spotify client to either one of them, but not in sync.
Is there an easy, minimal setup instruction to get this to work?

Thanks!

Music sped up when playing

My setup is one Pi Zero W as the server (and a client), streaming to a couple of other Pi Zero W clients.

When I play music, across them all, it's perfectly in sync, but always appears to be slightly sped up on all of them. It's subtle but noticeable. I presume this is just part of the sync process.

Does the master (or clients) have to be a more powerful Pi than a Pi Zero? Or could it possibly be that my wireless network isn't quite up to scratch for multi room audio? I haven't been able to test wired connections due to the Pi Zeros not supporting it.

Could it be something else causing this issue?

Specify snapcast server and client CLI flags

It would be nice to be able to specify CLI arguments in snapcast settings for both snapclient and snapserver. You could manually edit the files in /etc/default, but that is not very user friendly. Also if you change any other setting which overwrite these files, you have to go in and change them again.

I've been tweeking with buffersize for snapserver. This parameter specify the delay between audio is fed to the fifo pipe, and when the client reads the data. The default is 1000ms which in my opinion adds to much delay for responsive audio control. Too be able to specify this in the plug-in settings would be nice.

For the client, there is a latency flag which can be used to correctly sync clients depending on the response time on different audio systems. This setting have to be tuned by hand for the best experience, which is why it would be perfect to put it in the plug-in settings GUI.

Volumio and Snapcast

To start, I'm very pleased with the work you have done.
As you might suspect, I am attempting a muti-room, sonos-like playback of music from my network and I have it working --for the most part. The system consists of a Pi3 as the server, four Pi2's and two Pi0's as the clients. the Pi0's have a HiFiberry compatible DACs and work just fine.

However, two of My Pi2's have the Pi2 Design 503 Hybrid Tube Amp and when I install the SnapCast they stop working altogether--this is without even activating SnapCast. My hypothesis is that SnapCast does list the correct "Soundcard to Use for Playback" in the setup. The pictures below hopefully illustrate the problem.

image

Unfortunately, this option does not appear in the SnapCast Settings.
image

Is there a config file I can modify to get the correct playback options

Thanks,
-hpw

Settings not saved

After updating to the version of juli 10th 2017 settings are not saved after hitting the save buttons at the specific sections.

Reboot when entering snapcast plugin settings

I installed this plugin on volumio 2.376. When entering the settings page of the snapcast plugin, volumio seems to initiate a reboot and I cannot change anything anymore. Is this a known problem?

The output of sudo journalctl -f is:

Mar 13 18:09:58 volumio volumio[12496]: info: CoreCommandRouter::getUIConfigOnPlugin
Mar 13 18:09:58 volumio volumio[12496]: info: CoreCommandRouter::executeOnPlugin: appearance , getConfigParam
Mar 13 18:09:58 volumio volumio[12496]: info: Received Get System Version
Mar 13 18:09:58 volumio volumio[12496]: info: CoreCommandRouter::executeOnPlugin: system , getSystemVersion
Mar 13 18:10:01 volumio volumio[12496]: info: [{"prettyName":"SnapCast","name":"snapcast","category":"miscellanea","version":"2.2.2","icon":"fa fa-podcast","enabled":true,"active":true}]
Mar 13 18:10:03 volumio volumio[12496]: info: CoreCommandRouter::getUIConfigOnPlugin
Mar 13 18:10:03 volumio volumio[12496]: info: Loaded the previous config.
Mar 13 18:10:03 volumio volumio[12496]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , getDevices
Mar 13 18:10:03 volumio volumio[12496]: info: ## populating UI...
Mar 13 18:10:03 volumio volumio[12496]: info: 1/7 server settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: 2/7 client settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: 3/7 MPD settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: 4/7 asound settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: 5/7 spotify settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: 6/7 template settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: 7/7 environment settings loaded
Mar 13 18:10:03 volumio volumio[12496]: info: Populated config screen.
Mar 13 18:10:04 volumio volumio[12496]: |||||||||||||||||||||||| WARNING: FATAL ERROR |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mar 13 18:10:04 volumio volumio[12496]: SyntaxError: Unexpected end of JSON input
Mar 13 18:10:04 volumio volumio[12496]: at Object.parse (native)
Mar 13 18:10:04 volumio volumio[12496]: at /data/plugins/miscellanea/snapcast/index.js:1085:25
Mar 13 18:10:04 volumio volumio[12496]: at Socket.<anonymous> (/data/plugins/miscellanea/snapcast/node_modules/json-socket/lib/json-socket.js:67:17)
Mar 13 18:10:04 volumio volumio[12496]: at emitOne (events.js:101:20)
Mar 13 18:10:04 volumio volumio[12496]: at Socket.emit (events.js:188:7)
Mar 13 18:10:04 volumio volumio[12496]: at readableAddChunk (_stream_readable.js:176:18)
Mar 13 18:10:04 volumio volumio[12496]: at Socket.Readable.push (_stream_readable.js:134:10)
Mar 13 18:10:04 volumio volumio[12496]: at TCP.onread (net.js:547:20)
Mar 13 18:10:04 volumio volumio[12496]: |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mar 13 18:10:05 volumio sudo[12985]: volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/journalctl --since=2018-03-13 18:09
Mar 13 18:10:05 volumio sudo[12985]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 13 18:10:05 volumio sudo[12985]: pam_unix(sudo:session): session closed for user root
Mar 13 18:10:06 volumio volumio-remote-updater[559]: [2018-03-13 18:10:06] [error] handle_read_frame error: websocketpp.transport:7 (End of File)
Mar 13 18:10:06 volumio volumio-remote-updater[559]: [2018-03-13 18:10:06] [disconnect] Disconnect close local:[1006,End of File] remote:[1006]
Mar 13 18:10:06 volumio systemd[1]: volumio.service: main process exited, code=exited, status=1/FAILURE
Mar 13 18:10:06 volumio systemd[1]: Unit volumio.service entered failed state.
Mar 13 18:10:06 volumio systemd[1]: Starting dynamicswap service...
Mar 13 18:10:06 volumio systemd[1]: Started dynamicswap service.
Mar 13 18:10:06 volumio systemd[1]: volumio.service holdoff time over, scheduling restart.
Mar 13 18:10:06 volumio systemd[1]: Starting dynamicswap service...
Mar 13 18:10:06 volumio systemd[1]: Started dynamicswap service.
Mar 13 18:10:06 volumio systemd[1]: Stopping Volumio Backend Module...
Mar 13 18:10:06 volumio systemd[1]: Starting Volumio Backend Module...
Mar 13 18:10:06 volumio systemd[1]: Started Volumio Backend Module.
Mar 13 18:10:10 volumio volumio[13007]: info: -------------------------------------------
Mar 13 18:10:10 volumio volumio[13007]: info: -----            Volumio2              ----
Mar 13 18:10:10 volumio volumio[13007]: info: -------------------------------------------
Mar 13 18:10:10 volumio volumio[13007]: info: -----          System startup          ----
Mar 13 18:10:10 volumio volumio[13007]: info: -------------------------------------------

Simply doesn't work and breaks the volumio installation

Plugin never switches to active, doesn't work and uninstall does not revert the changes that were made to config files, so it leaves your installation broken. I am excited about the initiative though.

Volumio version 2.185

TypeError: Cannot read property 'name'

When i try to upload the plugin, i get:

The following error occurred when installing the plugin: TypeError: Cannot read property 'name' of undefined

I am using Rapsberrypi and new install of volumio

What have I missed ?

Create librespot settings

Create librespot settings

  • find out how to enable the pipe backend
  • patch existing settings files / plugin index (to prevent saves to break snapcast output)

Not an Issue :)

Nice to see someone's thinking about this.

Have you tried with librespot to see if Spotify will work as well?

Spotify Connect (Snapcast not appearing as Spotify connect option)

Hi,

i'm having an issue getting snapcast to appear inside spotify with spotify connect. I am using volspotconnect2 v0.40 with a RPI 3B using a hifiberry Digi+ Pro and a Pifi Dac. I am able to get snapcast working for both web radio and local files from my NAS using the volumio web app.
I have volumio 2.246 and I have your latest plugin from the 18th/19th august on both the client and server. I have spotify on both the mac desktop client as well as the iOS app but cannot see the Snapcast option on either.

However I cannot for the life of me see an option to get a snapcast stream appearing as a spotify connect option. Is there something stupid I am doing here? I have tried the settings on both the client and server but have not once seen a new spotify connect option. I only see the standard client and server streams that I had using volspotconnect prior to installing the snapcast plugin. I have tried with and without my spotify password and username i've attached my configuration within snapcast please let me know if there is any more info you need that will help.

Server
screen shot 2017-08-21 at 20 08 47

Client
screen shot 2017-08-21 at 20 09 31

Spotify settings - Pitched songs

Hi! I'm trying to setup with your plugin(great job!), and I've almost done. My setup is:
1 RPI 3 as server and client at same time;
2 RPI B+ as only clients;

Setup without Spotify works almost well. But I can hear two problems when I switch, with android app, in Spotify playback.
1- The song has some lag before starts to play(if server plays songs too).
2- Songs are out of tone(pitch up) when server is playing with the others clients. If server work as it is, without activate client mode, songs plays as usual.

Thanks in advance!

Directory in step 3 does not exist

  1. CD into volumio-snapcast-plugin directory

root@music1:/# find / -type d -name "volumio-snapcast-plugin"

Not coming up with anything... Do I need to create this dir, and if so, where? If not, please provide the full path.

Install Failed

I am trying to install the plugin on volumio-2.296 on a Raspberry Pi 2 and am getting the following error:

Downloading plugin at http://127.0.0.1:3000/plugin-serve/ddae6b07-0554-4f72-9387-d757ac5ac4e8.zip END DOWNLOAD: http://127.0.0.1:3000/plugin-serve/ddae6b07-0554-4f72-9387-d757ac5ac4e8.zip Creating folder on disk Unpacking plugin The following error occurred when installing the plugin: TypeError: Cannot read property 'name' of undefined

I don't know where to start with this. Could you offer any advice?

Install fails on volumio-2.348-2017-12-22-pi with TypeError: Cannot read property 'name' of undefined

Hi

As per the heading.
Running Volumio 2.348 on a RPi2 B.
The full log text is:

Downloading plugin at http://127.0.0.1:3000/plugin-serve/d3243555-503a-45a9-afa7-0afe585ff4d9.zip
END DOWNLOAD: http://127.0.0.1:3000/plugin-serve/d3243555-503a-45a9-afa7-0afe585ff4d9.zip
Creating folder on disk
Unpacking plugin
The following error occurred when installing the plugin: TypeError: Cannot read property 'name' of undefined

The output of journalctl -f is:

Dec 30 20:52:01 media volumio[844]: Uploading: volumio-snapcast-plugin-master.zip
Dec 30 20:52:01 media volumio[844]: Created safe filename as 'a201fc1c-05b7-4fb1-a3c3-da7021817be6.zip'
Dec 30 20:52:02 media volumio[844]: Upload Finished of volumio-snapcast-plugin-master.zip as a201fc1c-05b7-4fb1-a3c3-da7021817be6.zip
Dec 30 20:52:02 media volumio[844]: info: Downloading plugin at http://127.0.0.1:3000/plugin-serve/a201fc1c-05b7-4fb1-a3c3-da7021817be6.zip
Dec 30 20:52:03 media volumio[844]: info: END DOWNLOAD: http://127.0.0.1:3000/plugin-serve/a201fc1c-05b7-4fb1-a3c3-da7021817be6.zip
Dec 30 20:52:03 media volumio[844]: info: Folder /tmp/plugins removed
Dec 30 20:52:03 media volumio[844]: info: Checking if plugin already exists
Dec 30 20:52:03 media volumio[844]: info: An error occurred installing the plugin. Rolling back config
Dec 30 20:52:03 media volumio[844]: info: Plugin folders cleanup
Dec 30 20:52:03 media volumio[844]: info: Scanning into folder /volumio/app/plugins/
Dec 30 20:52:03 media volumio[844]: info: Scanning category audio_interface
Dec 30 20:52:03 media volumio[844]: info: Scanning category miscellanea
Dec 30 20:52:03 media volumio[844]: info: Scanning category music_service
Dec 30 20:52:03 media volumio[844]: info: Scanning category plugins.json
Dec 30 20:52:03 media volumio[844]: info: Scanning category system_controller
Dec 30 20:52:03 media volumio[844]: info: Scanning category user_interface
Dec 30 20:52:03 media volumio[844]: info: Scanning into folder /data/plugins/
Dec 30 20:52:03 media volumio[844]: info: Plugin folders cleanup completed
Dec 30 20:52:03 media volumio[844]: info: Error: Error
Dec 30 20:52:03 media volumio[844]: info: Folder /tmp/plugins removed
Dec 30 20:52:03 media volumio[844]: info: Folder /tmp/downloaded_plugin.zip removed
Dec 30 20:52:03 media volumio[844]: info: Folder /tmp/downloaded_plugin.zip removed
Dec 30 20:52:04 media volumio[844]: info: Folder /data/temp removed

Cheers!

Snapcast+Volspotconnect2+Spop - no Spotify Stream to Client

Hey Saiyato! Love the project, thanks for all that you do... not sure if I am having problems similar to others or something new. Posted on the Volumio forum but not getting very far...

Am using your snapcast installer, Volumio's built in SPOP plugin for Spotify and balbuze's volsporconnect2 plugin. I have Snapcast up and running fine with local music and web radio - server (hostname volumio) and client (hostname volumio2) are in perfect synch. Also, Spotify works fine on both server and client locally via SPOP. Per your readme I installed volspotconnect2 on both server and client, on the server I changed the stream to volspotconnect2, saved, patched, and saved the plugins to execute. On the client I disabled dedicated stream, set to volspotconnect2 and saved (no patch). Rebooted both devices... I can't seem to get a Spotify song I play in my server to stream to both devices in synch. If I use the Spotify app on my phone I can connect to each device individually remotely - again, not streaming to each other.

Here is the volspotconnect2 config:

Server:
volumio@Volumio:/data$ cat /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 detected
cd /data/plugins/music_service/volspotconnect2
./librespot -b 320 -c /tmp --name 'Volumio' --backend pipe --device /tmp/spotififo

Client:
volumio@volumio2:~$ cat /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 detected
cd /data/plugins/music_service/volspotconnect2
./librespot -b 320 -c /tmp --name 'Volumio2' --backend alsa --device plughw:1 --disable-audio-cache --onstart ./onstart1.sh

Any help is appreciated - sorry for the newbie questions!

Can't start service

Hey there, would like to test your plugin. I did installed on both devices as you wrote in the installation manual of this plugin. Well on my mail volumio player raspberry pi3 with allo boss DAC it worked to start the service and i can configure in the backed, but i fail to do same with raspberry pi zero w. Even plugin was installed successfully i get following error when i try to start the service:

Sep 03 17:47:23 volumio-arbeitszimmer systemd[1]: snapclient.service: control process exited, code=exited status=127
Sep 03 17:47:23 volumio-arbeitszimmer systemd[1]: Failed to start Snapcast client.
Sep 03 17:47:23 volumio-arbeitszimmer systemd[1]: Unit snapclient.service entered failed state.
Sep 03 17:47:24 volumio-arbeitszimmer systemd[1]: snapclient.service holdoff time over, scheduling restart.
Sep 03 17:47:24 volumio-arbeitszimmer systemd[1]: Stopping Snapcast client...
Sep 03 17:47:24 volumio-arbeitszimmer systemd[1]: Starting Snapcast client...
Sep 03 17:47:24 volumio-arbeitszimmer systemd[1]: snapclient.service start request repeated too quickly, refusing to start.
Sep 03 17:47:24 volumio-arbeitszimmer systemd[1]: Failed to start Snapcast client.
Sep 03 17:47:24 volumio-arbeitszimmer systemd[1]: Unit snapclient.service entered failed state.

Reboot of both units don't help somehow. Do you have an idea what i could check?

p.s. after i did apt-get update and apt-get upgrade the system warned me that a package

libatomic1

is needed for you plugin as depency but it is not installed.

edit2:

Okay i figured it out that i need to start manually from console in the directory /etc/default/

if i do start there snapserver then it works. How to get it running without console?

edit3:

I guess something is wrong with system.d snapserver as when i stop and start it then look with status it says:

● snapserver.service - Snapcast server
Loaded: loaded (/lib/systemd/system/snapserver.service; enabled)
Active: failed (Result: start-limit) since Mon 2018-09-03 22:53:48 UTC; 7s ago
Process: 10660 ExecStart=/usr/bin/snapserver -d $USER_OPTS $SNAPSERVER_OPTS (code=exited, status=0/SUCCESS)
Main PID: 10661 (code=exited, status=1/FAILURE)

but when i start from /usr/bin/snapserver or /etc/default/snapserver then it works fine, weird.

Beside that it runs very good with 16 bit and 48khz, everything runs from youtube, local mp3 or flac as any radio streams till now this is just awesome! Probably you can tell me how to fix the issue that after reboot the server is not started right somehow, the client service works fine, even i don't see the config anymore in the backend. I see that if click on settings of the plugin from the client it tries to connect to: 169.254.185.103 but that's not my ip range that's why i guess no backend settings.

Spotify Sample Rate not working correctly

Hi, Im having an issue where the music is playing too fast and at a high pitch via spotify. I have the sample rate set in the Spotify integration settings to 44100khz and the SnapServer setttings set at 48000khz.

If i change the snapserver settings to 41000khz as well as the Spotify Integration settings at 41000khz then Spotify plays correctly at the right speed and pitch. However by doing this when playing local files or web radio it causes frequent dropouts and and plays at the wrong speed and pitch and is unlistenable.

Likewise if I set both Spotify Integration settings and Snapserver sample rates to 48000khz Spotify plays to fast and at the wrong pitch.

I'm using RPI3 for both client and server. I have the Snapcast Release from 24th September, volspotconnect2 v0.46 28th September release and Volumio 2.282

I had the same issue when using volspotconnect2 v0.40, Snapcast release 13th September and Volumio 2.246

Any help would be appreciated

Can't get Spotify to work.

Hi,
First of all, thanks for this plugin, it helps me a lot! Secondly, im quite new to working with rPi's etc. But I got the snapcast working for the webradio, but i can't get spotify to work aswell, spotify only plays on 1 rPi instead of the intended 2. I downloaded the volspot plugin in volumio2. I hope you can help me out!

webUI setting page does not come

Hi!
I've just installed your plugin. Thank for all the work you have done.
device is pine64.
Install ok but can't display plugin settings ( empty page )
sudo journalctl -f returns 👍

Aug 06 10:06:30 volumio-pine64 volumio[979]: info: snapserver started
Aug 06 10:06:30 volumio-pine64 volumio[979]: info: Done.
Aug 06 10:06:30 volumio-pine64 sudo[2638]: volumio : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl restart snapclient
Aug 06 10:06:30 volumio-pine64 sudo[2638]: pam_unix(sudo:session): session opened for user root by (uid=0)
Aug 06 10:06:30 volumio-pine64 systemd[1]: Starting Snapcast client...
Aug 06 10:06:30 volumio-pine64 snapclient[2641]: daemon started
Aug 06 10:06:30 volumio-pine64 systemd[1]: Started Snapcast client.
Aug 06 10:06:30 volumio-pine64 sudo[2638]: pam_unix(sudo:session): session closed for user root
Aug 06 10:06:30 volumio-pine64 volumio[979]: info: snapclient started
Aug 06 10:06:30 volumio-pine64 snapclient[2641]: Connected to 127.0.0.1
Aug 06 10:06:30 volumio-pine64 snapserver[2632]: StreamServer::NewConnection: 127.0.0.1
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: CoreCommandRouter::getUIConfigOnPlugin
Aug 06 10:06:42 volumio-pine64 systemd[1]: Starting Cleanup of Temporary Directories...
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: Loaded the previous config.
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: CoreCommandRouter::executeOnPlugin: volumiodiscovery , getDevices
Aug 06 10:06:42 volumio-pine64 systemd[1]: Started Cleanup of Temporary Directories.
Aug 06 10:06:42 volumio-pine64 snapserver[2632]: ControlServer::NewConnection: 127.0.0.1
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: ## populating UI...
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: 1/7 server settings loaded
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: 2/7 client settings loaded
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: 3/7 MPD settings loaded
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: 4/7 asound settings loaded
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: 5/7 spotify settings loaded
Aug 06 10:06:42 volumio-pine64 volumio[979]: info: 6/7 template settings loaded
Aug 06 10:06:42 volumio-pine64 snapserver[2632]: Exception in ControlSession::reader(): read_until: End of file
Aug 06 10:06:42 volumio-pine64 snapclient[2641]: Exception in Controller::worker(): sum timeout exceeded 10s
Aug 06 10:06:42 volumio-pine64 snapserver[2632]: Exception in StreamSession::reader(): read_some: End of file
Aug 06 10:06:42 volumio-pine64 snapserver[2632]: Session inactive. Removing
Aug 06 10:06:43 volumio-pine64 snapclient[2641]: Connected to 127.0.0.1
Aug 06 10:06:43 volumio-pine64 snapserver[2632]: StreamServer::NewConnection: 127.0.0.1
`

Create spotify-web-connect settings

Create spotify-web-connect settings

[X] find out how to enable the pipe backend -> startconnect
[ ] patch existing settings files / plugin index (to prevent saves to break snapcast output)

Enhance security

The default password is used when performing some configuration actions, this fails when you change the password.

There must be a way to work around this.

install error

I do these steps:

volumio@volumio:$ git clone https://github.com/Saiyato/volumio-snapcast-plugin.git
Cloning into 'volumio-snapcast-plugin'...
remote: Counting objects: 1061, done.
remote: Total 1061 (delta 0), reused 0 (delta 0), pack-reused 1061
Receiving objects: 100% (1061/1061), 16.97 MiB | 1.52 MiB/s, done.
Resolving deltas: 100% (446/446), done.
Checking connectivity... done.
volumio@volumio:
$ cd volumio-snapcast-plugin/
volumio@volumio:/volumio-snapcast-plugin$ sudo rm volumio-snapcast-plugin.zip
volumio@volumio:
/volumio-snapcast-plugin$ sudo volumio plugin install

This command will install the plugin on your device

Compressing the plugin
No modules found, running "npm install"
/bin/rm: cannot remove 'package-lock.json': No such file or directory
Error installing node modules: Error: Command failed: /bin/rm package-lock.json
/bin/rm: cannot remove 'package-lock.json': No such file or directory

/bin/mv: cannot stat '*.zip': No such file or directory
child_process.js:644
throw err;
^

Error: Command failed: /bin/mv .zip /tmp/plugins/snapcast.zip
/bin/mv: cannot stat '
.zip': No such file or directory

at checkExecSyncError (child_process.js:601:13)
at execSync (child_process.js:641:13)
at install (/volumio/pluginhelper.js:680:9)
at Object.<anonymous> (/volumio/pluginhelper.js:741:9)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)

what is my error???

Status :The following error occurred when installing the plugin: Error

Hello Saiyato

Thank you very much for providing this plugin - it saves me a lot of work.

However, I ran into some trouble when trying to install it.

Svolumio@VolumioMain:~/volumio-snapcast-plugin$ volumio plugin install

This command will install the plugin on your device

Compressing the plugin
Plugin succesfully compressed
Progress: 10
Status :Downloading plugin
Progress: 30
Status :Creating folder on disk
Progress: 40
Status :Unpacking plugin
Progress: 50
Status :Checking for duplicate plugin
Progress: 60
Status :Copying Plugin into location
Progress: 70
Status :Installing dependencies
Progress: 0
Status :The following error occurred when installing the plugin: Error

I am running the latest version of Volumio on a RaspberryPi 3 Type B.
I am uncertain if there is enough space on the SD card, but I ran df -h and doesn't look bad:

Filesystem                        Size  Used Avail Use% Mounted on
/dev/mmcblk0p2                    2.2G  618M  1.5G  30% /imgpart
/dev/loop0                        273M  273M     0 100% /static
overlay                           4.8G   63M  4.5G   2% /
devtmpfs                          478M     0  478M   0% /dev
tmpfs                             489M     0  489M   0% /dev/shm
tmpfs                             489M  4.7M  484M   1% /run
tmpfs                             5.0M  4.0K  5.0M   1% /run/lock
tmpfs                             489M     0  489M   0% /sys/fs/cgroup
tmpfs                             489M   28K  489M   1% /tmp
tmpfs                              20M   68K   20M   1% /var/log
tmpfs                             489M     0  489M   0% /var/spool/cups
tmpfs                             489M     0  489M   0% /var/spool/cups/tmp
/dev/mmcblk0p1                     61M   35M   26M  58% /boot
//xx.xx.xx.xx/Multimedia/music  3.5T  3.2T  318G  92% /mnt/NAS/Name
tmpfs                              98M     0   98M   0% /run/user/1000

Do you perhaps know what could be the issue, or if I can find more useful information than "Error"? :D

Volspotconnect2 + Snapcast

Hi, I have updated my volspotconnect2 as my old version was no longer working. I installed the 20th march release from volumio. At this point I have also updated to your latest snapcast plugin.

I am able to get web radio /local files working with snapcast. However when i patch the server for spotify and then save the volspotconnect2 plugin again, the Server disappears as a playback option from spotify connect.

I have tried saving the volspotconnect2 plugin multiple times as well as saving the snapcast server settings and rebooting the device, all with no luck.

Has there been some recent changes to the volspotconnect2 plugin that are stopping it from working or is it user error on my part?

Thanks

Andrew

Pifi Dac issue (Hifiberry Dac Clone)

I have updated to the latest version of snapcast and I am now unable to sync music on the client from the server. I believe it may be down to an issue in the plugin where the output device is listed as "no card match."

Previously it was working from Web radio and local files in sync but this was an older version from a few weeks ago.

I have a RPI 3b with pifi dac as the client device.

img_1682
img_1683

No uninstall.sh

There doesn't seem to be an uninstall.sh (get an error from UI).

the plugin does not work on volumio 2.201-2017-06-14-x86

Hi Saiyato,

thanks for this very cool plugin. I have discovered volumio and 45 minutes after, I had a lovely multi-room installation with 3 raspberry pi working :)

I am now trying volumio on a x86 host and it seems that the current release of the plugin does not work on the x86 2.201 version of volumio (2017-06-14) (factory defaults configuration). The plugin installation seems OK but the plugin activation returns the two following messages (red pop-up) on the top-right of the screen.

Startup failed
Could not start the SnapCast plugin in a fashionable manner.
Restart failed
Restarting snapserver failed with error: Error: Command failed: /usr/bin/sudo /bin/systemctl restart snapserver Failed to restart snapserver.service: Unit snapserver.service failed to load: No such file or directory. 

Create volumio native spotify settings

Create volumio native spotify settings.

[x] Find out what is needed to pipe output
[x] Patch settings files -> sox
[x] Fix timeout needed to switch output (file handles?) <- not needed!

Pine64 - Lot's of noise, almost no music sound

I've got the plugin running great on two raspberry pi 2b's but when running it on my Pine64 there's lot's of static noise and almost no music.

Tried the Pine64 without the plugin and it's fine, but with the plugin, as server + client or client only there's more static noise than music so completely unusable.

Do you know any fixes?

installation problem

I tried to install the plugin on volumio 2.368-2018-02-18 as described in the REAME file, but got the following error:

volumio@volumio:~$ git clone https://github.com/Saiyato/volumio-snapcast-plugin
Cloning into 'volumio-snapcast-plugin'...
remote: Counting objects: 989, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 989 (delta 20), reused 24 (delta 13), pack-reused 949
Receiving objects: 100% (989/989), 17.33 MiB | 4.07 MiB/s, done.
Resolving deltas: 100% (394/394), done.
Checking connectivity... done.
volumio@volumio:~$ cd volumio-snapcast-plugin/
volumio@volumio:~/volumio-snapcast-plugin$ volumio plugin install

This command will install the plugin on your device


Compressing the plugin
Plugin succesfully compressed
/bin/mv: target ‘/tmp/plugins/snapcast.zip’ is not a directory
child_process.js:524
    throw err;
    ^

Error: Command failed: /bin/mv *.zip /tmp/plugins/snapcast.zip
/bin/mv: target ‘/tmp/plugins/snapcast.zip’ is not a directory

    at checkExecSyncError (child_process.js:481:13)
    at execSync (child_process.js:521:13)
    at install (/volumio/pluginhelper.js:659:9)
    at Object.<anonymous> (/volumio/pluginhelper.js:719:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)

libatomic1 not installed

I just tried to install the snapcast plugin on a Volumio Version 2.296 (not clean installation) and Volumio Version 2.310 (new and clean installation)
Server could be started but not the client (error message when changing the client settings) "could not start snapclient"

Commandline confirmed this.

Solution: Manually install libatomic1 which was apparently missing via ssh
sudo apt-get install libatomic1

This solves the issue

Snapcast with other media sources than spotify

Hi, great plugin. Works really good for enabling spotify connect on multiroom/multidevice DIY music systems.

However, I cannot get it to work with other media sources (like playing media files from a NAS or Airplay). Does it support other media sources, and how do I enable that on my clients?

Out of Sync (~2sec delay

Hi,

I'm having an issue on the latest version where the client is ~2 secs delayed compared to the server. When i stop the client stream also turns off with the same delay.

Im having this issue with web radio and local files. Previously on older versions the sync worked perfectly but not sure what the issue is as have checked all the settings and they all seem fine.

RPI 3B with Snapcast plugin from aug 18th.

Thanks

Sample rate for spotify integration setting

Running Volumio 2,201, spotconnect2 and the latest snapcast plugin.

Music is played to fast and pitch is too high. When I manually add "sampleformat=44100:16:2" to the snapserver command all is good. Is there a way to set these settings for the spotify integration?

Generated by the plugin :
/usr/bin/snapserver -d --user snapserver:snapserver -d -s pipe:///tmp/snapfifo?name=VOLUMIO-MPD&mode=read&sampleformat=44100:16:2&codec=pcm -s pipe:///tmp/spotififo?name=Spotify&mode=read

Needed to play correct :
/usr/bin/snapserver -d --user snapserver:snapserver -d -s pipe:///tmp/snapfifo?name=VOLUMIO-MPD&mode=read&sampleformat=44100:16:2&codec=pcm -s pipe:///tmp/spotififo?name=Spotify&mode=read&sampleformat=44100:16:2

Also "Name of the Spotify stream" isn't saved between reboots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.