[APP][Pro] Spotify Connect (beta - ready for testers)

@pendojoshua maybe the second real-world user here :smiley:

I just installed it and by following your instructions, itā€™s really easy and not that much of extra work. The extra 1 minute work is worth just to have the album art and more control over my speakers :+1:

Couple of things I have seen:

  1. If you could change the name so that we can easily distinguish the two Spotify app would be welcome. When adding a new device, this is what I see:

  2. I assume this is because Google Nest hub is NOT a Spotify connect speaker but instead use Google Cast (Google doing their Google :man_facepalming:), but I canā€™t see the album art when using a Google Speaker. I think this is expected but just wanted to confirm it with you.

Iā€™ll keep using it and provide feedback if I can see anything.

Great work Joshua! Thanks

Knowing your use case I get the disadvantage of the Sonos app. But since my version would do the exact same calls via the Sonos API I donā€™t see any way or workaround that is able to fix this. Iā€™m looking into adding the playtime/-state card for you to this app but it will only work for the Spotify Connect speaker.

Feel free to message me privately if you think Iā€™m missing something that could work. I guess thatā€™s easier in Dutch for the both of us.

@Didier_SmartHome glad to have you on board as user! Welcome :saluting_face:

Iā€™ll check into the name (and icon) in the next version. It was supposed to be called ā€œSpotify Connectā€ already, like the app name. But I must have missed the naming somewhere right before releasing. I will also update the device icon and let it have a black circle so it matches the app cover image.

My guess is that the Google device uses Chromecast as back-end for the speaker. Which, similar to Sonos, allows the device to turn up as a Spotify Connect speaker but wonā€™t work with the Spotify API (which is the backbone of this app).

1 Like

Who can help me please? I downloaded the spotify app and it there there are no devices? How and where Can I log in?

We need more input to help. Because if downloading is all youā€™ve done then itā€™s pretty obvious why things donā€™t work. Did you follow and read all instructions in the first post?

  • :white_check_mark: Download the app
  • :grey_question: Create a Spotify app as a developer
  • :grey_question: Add Spotify app credentials to the app settigns in Homey
  • :grey_question: Make sure that the app is installed with the same Spotify account as you use on your phone / pc
  • :grey_question: Make sure that the speaker is connected to said account since this app cannot search your network but only your active devices
  • :grey_question: Make sure youā€™re not using a Sonos or Chromecast speaker

Hi @pendojoshua, thanks so much for creating this appā€”Iā€™m following its progress with a lot of excitement!

You mentioned an issue that Iā€™ve run into as well: managing different Spotify accounts on the same device. While the party/jam mode does work, it requires a bit of explaining and consistency from the family at home.

Since the other account playing on the same device is usually a household member, would it be possible to explore the feasibility of linking multiple accounts to the same ā€œdeviceā€? This could potentially allow a single widget to control the device across multiple accounts, making things much smoother!

Hi Erik,

Iā€™ve thought about that too, but the way these Homey apps work is that you connect a single (Spotify) account to a single speaker (and itā€™s widget). So a widget is by design connected to a single speaker which by design is connected to a single Spotify account (user).

I donā€™t even think itā€™s possible to install the app multiple times using other accounts to be honest. But Iā€™m not 100% sure on this one. If it is possible - thatā€™s the only workaround but it ainā€™t a pretty one: install the app multiple times with multiple Spotify accounts. Then connect the speaker to each account and add the speaker in Homey, repeat for each Spotify account. Now you can add multiple widgets to the dashboard and use the one thatā€™s enabled by the API in one of the accounts.

// Edit:

And for the updates: theyā€™re still on the way. Havenā€™t had much to spend on side project lately. But Iā€™ve just requested publishing version 1.0.1 that changes the app name to distinguish it from the official Spotify app.

@pendojoshua great work on the community Spotify app. I have it working on my dashboard! :clap:

2 Likes

Hi @pendojoshua,

Thanks for your detailed response! I understand the current limitations with how the app connects Spotify accounts to speakers and widgets. However, I think there might be a way to address this within the appā€™s design itself.

Instead of tying the Spotify credentials to the app instance, would it be possible to configure them at the device level? For example, when adding a speaker in the app, you could provide an option to input multiple Spotify accounts directly within the deviceā€™s configuration. Then, the app could handle the logic to switch between accounts dynamically.

This would allow a single widget to manage the speaker across multiple accounts without the need for separate app installations or widgets, right?

That said, I also understand that Homeyā€™s approach is generally to set up devices as single-purpose entities, and this type of multi-account logic isnā€™t typically how things are designed to work. It might simply be one of those limitations we have to accept.

Hi, Just starting to test the Spotify appit out, but would it be possible to make the Set relative volume % to go to minus, so youā€™ll be able to turn the music down as well as turning it up?

Also it seems like amazon devices arent supported?

Best Regards Allan

@Harwin great to to hear! If you have any suggestions feel free to let me know!

@Erikvl87 Iā€™m on the same page in the way you thing about the solution. Itā€™s similar to an idea I have for a ā€œStart playlist widgetā€ that is able to control all connected devices via a dropdown for example. But I lack knowledge on Homey and I am not completely familiar with front-end coding. As a back-end developer Iā€™m used to a completely different stack and I was lucky enough in being able to look at the right examples to built this app so far.

It would involve creating an empty shell app and fully rebuilding the oauth flow in a custom setup method for devices. And even if I got this to work, there are still other challenges. Like, how are we going to switch the active account? Would we rebuild the current speaker widget just to add extra controls to select the active user? Would it be flow buttons that have a ā€œSet account X as activeā€ actions? It would also mean that we would need to save per-device-per-account states (most important one being current volume).

I would love to create a solution but at the moment it feels like thatā€™s a bridge too far for me to work on.

@AliBozis: can you please explain what you mean with an example? As far as I know all capabilities are programmed to do what you would expect them to.

1 Like

@ pendojoshua
When I use Set relative volume, I can set it to ex. 10% and push a button and the sound goes up 10%, I miss the option to make it -10% to make it go 10 % down when button is pushed. So the slider needs to go from -100 to +100. Hopes that makes sence? Its possible in other apps :slight_smile:

Can you show me the widget / component where you can set the relative volume? I built all capabilities and just used the default widgets and options that Homey provides. It doesnā€™t sound like this is something my app can fix for you.

@ pendojoshua
This is from the < group > app
I have seen it in other apps to :slight_smile:

Looks like you added capabilitiesOptions for the volume_set capability, that will also overwrite the ā€œset_relative_volumeā€ to that specified range (0.00 - 1.00) for some reason.

Youā€™re refering to these lines I guess? nl.pendo.spotify/drivers/spotify-connect/driver.compose.json at b3a554e6b8f28bb855a7bf8e014d4e85e801aa55 Ā· PendoNL/nl.pendo.spotify Ā· GitHub

Just to make things clear for me as I havenā€™t used < group > yet. If my current volume is at 50%, then ā€œset relative volume -10%ā€ should result in 45% volume? Or do you expect the volume to go to 40%?

// Edit:
I installed < group > and the last scenario is what I see happening. Given the example above, my speaker being at 50%, then pressing the flow sets my volume to 40%.

Just FYI, itā€™s not (< group >) app specific.

In theory any device with a volume capability has a flow card ā€˜set relative volumeā€™ range from -100% to +100%

Thanks for pointing out! But based on my test with < group > in this case, it does seem to work. Right? Or is there something Iā€™m missing?

1 Like

@ pendojoshua
Just tried it with the Amazon alexa app, and it works fine there :slight_smile:

Ahhh, I think I see what you mean. The ā€œthenā€ flow card does not allow values below 0. Iā€™ll try to figure out why that is as soon as possible.

1 Like

So it turned out to be the capabilityOptions setting as @Caseda mentioned. Thereā€™s an update on itā€™s way that allows the volume to be set anywhere between -100% and +100%. Which fixes the relative volume card.

Howeverā€¦ it allows a -100% value for regular volume as well which is a bit odd. I havenā€™t checked if this bugs the API. If I remember correctly I had to use min/max (0/1) and steps (0.1) because otherwise the values Homey returns from the controls got mapped to max volume on the speakers instantly. A possible fix would be to convert the Homey values to 0.00 - 1.00 values before sending them over the API to Spotify.

Iā€™ll look into that fix asap, but for now this update at least allows you to use the relative volume card.