Spotify Connect / volspotconnect

The Username, Password and Initial Volume UI elements seem to be missing on my Spotify Connect / volspotconnect2 plugin settings!

EDIT: Reviewing volspotconnect2/index.js, I found the following code, with some choice bits about initial volume control not being needed. For what it’s worth, it seems that hiding the element leads to initial volume being set to zero - which does in fact prevent it from working. I propose disabling this check - or at the very least, figuring out a better idea of when the circumstances appropriate to hiding it are (presumably where the entry would be irrelevant?) Either way, setting it to 0 seems like the wrong approach - is there a better “null” config option - maybe just "" ?

ControllerVolspotconnect.prototype.getUIConfig = function () {
  var defer = libQ.defer();
  const langCode = this.commandRouter.sharedVars.get('language_code');
  this.commandRouter.i18nJson(path.join(__dirname, `/i18n/strings_${langCode}.json`),
    path.join(__dirname, '/i18n/strings_en.json'),
    path.join(__dirname, '/UIConfig.json'))
    .then((uiconf) => {
      // Do we still need the initial volume setting?
      const mixname = this.commandRouter.sharedVars.get('alsa.outputdevicemixer');
      logger.debug(`config <${mixname}>: toggling initvol/volume_ctrl`);
      if ((mixname === '') || (mixname === 'None')) {
        uiconf.sections[0].content[0].hidden = false;
        uiconf.sections[0].content[6].hidden = false;
      } else {
        uiconf.sections[0].content[0].hidden = false; //true
        uiconf.sections[0].content[6].hidden = false; //true

      // Asking for trouble, map index to id?
      uiconf.sections[0].content[0].config.bars[0].value = this.config.get('initvol');
      uiconf.sections[0].content[1].value = this.config.get('normalvolume');
      uiconf.sections[0].content[2].value.value = this.config.get('bitrate');

Original Post continues, no longer relevant probably, other than "where’s the code?"

From screenshots as well as browsing the code, it looks like there should be some fields there. I only noticed this because the initial volume is set to 0!

Is this an issue on my own system? A Volumio 3 plugin-update issue? And, should I be digging into this myself and submitting a pull request? Is the current version the master branch in volumio/volumio-plugins on github? (I don’t see updates since Oct 2020)

The generated volspotify.toml appears to have the expected fields generated, just not populated with anything due to the lack of UI.

(At the end, to aid in forum previews being relevant): Hey folks - my first post here, but I’m an intermediate old hat around FOSS projects; hoping to help!

Software Version Notes
Volumio 3.175 Raspberry Pi 3B
volspotconnect2 3.0.7 per package.json
1 Like

Volumio plugins source code for Volumio 3 can be found at GitHub - volumio/volumio-plugins-sources: Volumio plugins source code for Volumio 3

I guess @balbuze or @ashthespy maybe can answer your questions about Spotify Connect

Username and password appears only if ‘single use’ is used.
Initial volume is available only if ‘no mixer’ is set in volumio playback options.
There is nothing wrong in the code…

In my situation, the code as it interacts with my configuration leads to Spotify Connect starting with volume set to 0, so when I try to use it, I get no output until I remember I need to adjust the volume (in Spotify, generally) to get it to work. I’m sure that’s not the intended outcome!

I do have a guess as to a cause, though: I’m using the software mixer, and my amplifier as a USB DAC. The latter, however, means that the DAC unplugs when the amp is off / asleep. So, there may be times when Volumio doesn’t have a (software) mixer, because the puppy interface doesn’t exist. I’m going to dig into that a little / try doing a full power cycle with the amplifier powered on.

As for username/password not being available; that’s a reasonable design decision. I may disagree with it (as remote access can be helpful / there may be network topologies where it’s relevant), but I’m glad it’s not a bug, and certainly can respect the decision there! Trimming unneeded UI vs. having every option available is a delicate balance that always means compromise; I recognize that it’s a matter of preference.

Though, again, the Spotify Connect volume situation leads to Unexpected Behavior in my configuration, which isn’t a particularly uncommon one, I suspect.

I just loaded a new (v3.197) update on my Mini86 PC, and the Spotify plug-in is not in the system to install. Only the Spotify Connect 2 plug-in is there… but it doesn’t have a way to identify your Spotify credentials, and so Spotify does not show up at all in the list of music sources… any ideas?

You use the Spotify app for Spotify Connect, look for Volumio as output.

Hello Pongfan101,
To identify your Spotify account you have to set Multi User device to off.
I have the same problem, though, the Spotify does not show up at all in the list of music sources
Did you manage to make it work?

I finally got is to work. Volumio 3 and spotify connect 2.
There’s no button or other reference to Spotify in the interface, which is confusing. After installing, in settings for the spotify plug-in, is set multi-user device to OFF, and enter your credentials.
Then, on your phone or other device, in the Psotify settings, cklick on devices. After a while, you volumio device should appear. You can now connect you phone to your volumio device and select it as output.
Took me a while. I expected some kind of button on the browse screen in Volumio…