Spotify Connect Binding

Not sure what ou mean by flash briefing. Spotify only allows 1 device to play at once. The device that is active is the device that can be controlled. But it doesn’t say anything about playing status.

What version of the binding do you run? I made some changes related to 204. 204 basically means that Spotify tells you that it already send that information just recently and therefor the api won’t return anything. I’m under the impression this was changed fairly recently by them and in the past they always returned the data. I made a change to the binding to be able to handle such situations better. (The marketplace version of this binding has timestamp 09/12/2019 in the name in PaperUI).

I’ve upgraded to the latest openHAB version (2.5 Stable Release) and installed the binding via the PaperUI. It doesnt mention the version unfortunatley. When you say marketplace, is this the github link in the OP? If so, how do I go about installing it from there?

Many thanks as always :slight_smile:

Im sorry - posted this to completely wrong thread.

The version in 2.5 release is the same as the marketplace version so no need to install something else. (The link in OP is for an older version, which should only be installed on openHAB older version 2.3.0)

I can be the devices are not visible via the Spotify Api. If you run with level TRACE it should show the returned data from Spotify (Note: is privacy sensitive data) So it can give an indication.

Also can you try to play something? Does this change the returned data (no 204) and does this change if you than get devices/playlists (Try also a refresh of the UI).

Perfect, thanks for the confirmation.

Now, I’ve ran the TRACE and it does return everything as expected in JSON format. I’ve provided an example below anonymised:

2019-12-17 23:38:29.323 [TRACE] [potify.internal.api.SpotifyConnector] - Response Data: {

  "devices" : [ {

    "id" : "1234567890",

    "is_active" : true,

    "is_private_session" : false,

    "is_restricted" : false,

    "name" : "Bedroom speaker",

    "type" : "CastAudio",

    "volume_percent" : 36

  }, {

    "id" : "123456789",

    "is_active" : false,

    "is_private_session" : false,

    "is_restricted" : false,

    "name" : "SM-G975F",

    "type" : "Smartphone",

    "volume_percent" : 100

  } ]

}

I can also see the playlist information too, Im just not able to see these in as a selection item on the sitemap…

image
image

When i try to click the selection, nothing appears at all. Everything else seems to be working as expected, including images etc.

I’ve noticed when I play spotify on my smartphone, my Google Home (bedroom speaker) dissappears from the device list

Also, when i close the app on my phones devices are empty:

2019-12-17 23:45:41.252 [TRACE] [potify.internal.api.SpotifyConnector] - Response Data: {

  "devices" : [ ]

}

Many thanks,

Today i’ve changed from the older 2.3.0 binding to the new 2.5.0. binding. Everything was quick and easy after setting up the player bridge and change the Thing ID in my items.
But one thing doesn’t work, that was working on 2.3.0. I have a button on my habpanel sending INCREASE or DECREASE to spotify_player_deviceVolume. I see the command is received:

14:05:45.679 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘spotify_player_deviceVolume’ received command INCREASE

But the volume isn’t changing. Is this available in the new binding? I’ve red that every binding need the manually add this option:

Hi friends,
I have recently upgraded to OpnHab 2.5 without problems. Also, the Spotify bridge worked fine.
When I checked this morning I got an error on the connction with Spotify:

Status: OFFLINE - CONFIGURATION_ERROR Exception in oauth communication, grant type authorization_code

I deleted and reinstalled the bridge and also deleted and re-createdthe Spotify API access (including a new ID and secret) but still receiving the same error message.

When I authorize access via MyIP:8080/connectspotify I also see the error: Call to Spotify failed with error: Exception in oauth communication, grant type authorization_code

Can somebody please help to find a solution or what I could try to identify the issue?

Much appreciated,
mroggi

same here,
worked perfectly for weeks, on 2.5
now suddenly OFFLINE - CONFIGURATION_ERROR
but with ‘Bad http response, http code 503’

re-authorizing made it work again…
any reason this could have happened?

Can anyone help with the issue I’m facing?

Perfect, thanks for the confirmation.

Now, I’ve ran the TRACE and it does return everything as expected in JSON format. I’ve provided an example below anonymised:

2019-12-17 23:38:29.323 [TRACE] [potify.internal.api.SpotifyConnector] - Response Data: {

  "devices" : [ {

    "id" : "1234567890",

    "is_active" : true,

    "is_private_session" : false,

    "is_restricted" : false,

    "name" : "Bedroom speaker",

    "type" : "CastAudio",

    "volume_percent" : 36

  }, {

    "id" : "123456789",

    "is_active" : false,

    "is_private_session" : false,

    "is_restricted" : false,

    "name" : "SM-G975F",

    "type" : "Smartphone",

    "volume_percent" : 100

  } ]

}

I can also see the playlist information too, Im just not able to see these in as a selection item on the sitemap…

image
image

When i try to click the selection, nothing appears at all. Everything else seems to be working as expected, including images etc.

I’ve noticed when I play spotify on my smartphone, my Google Home (bedroom speaker) dissappears from the device list

Also, when i close the app on my phones devices are empty:

2019-12-17 23:45:41.252 [TRACE] [potify.internal.api.SpotifyConnector] - Response Data: {

  "devices" : [ ]

}

Many thanks,
[/quote]

1 Like

hi @hilbrand i use openhabian 2.4.0-1 release build and just did an update/upgrade. Could you please tell me where to find the Eclipse Market place in paper ui? in configuration system there is no Eclipse Mareket place, where exactly do i have to look?
and another question: is this binding working with a spotify premium account or is ok to have a standard spotify account? i followed their instruction on how to get the client id and client secret and i got them with a standard account.
thanks for any info.
regards.

Hi, does anyone know how to access Eclipse market to authorize it with maturity level beta? Where exactly do I have to look? In paper ui/systems I couldn’t see it!
Any info is much appreciated.
Thanks.

I have the same problem with the active devices. I think this is a general problem of the binding not only at your openhab instance.

1 Like

@ewgor
Configuration - System - MarketPlace

1 Like

Thank you for your replay man. The problem is that I don’t have this market place in: paper ui / system! Do I have to download something in order to get this market place in papaer ui? I have openHABian 2.4.0 with the latest update/upgrade.
Thanks again.

Marketplace is an add-on that needs to be installed, it’s under misc

Thank you, this is the information i need to move on. i finally managed to install the spotify bridge, filled the client id and client secret and when i go to myip:8080/connectspotify pressing the authorize player button it says:

`INVALID_CLIENT: Invalid redirect URI`

also the spotify status in paper ui says OFFLINE - CONFIGURATION_ERROR
thanks for any advice

1 Like

Go back to the first post and read again step 7

Can anyone tell me why my track progress starts at 30:00 and track duration is 30:00 plus the actual duration of the song?

No you need to have a premium account to be able to control Spotify.

Oh, thanks, on the site it doesn’t mention you need premium to connect with any app, they let you make id and get these client Id and client secret. 5 euro / month it doesn’t worth it just to listen once or twice a week or less :frowning:
Anyhow thanks for the answers.