Hmmm. I just had my system and card set to SpotifyPlus, nothing playing. Used my phone (spotify) to start music. It appears in a few seconds, that is like artist title, coverart … all the entities in the SpotifyPlus card I assume is from SpotifyPlus integration.
Leaving the player on does not hurt anything. It just consumes very limited resources. It will poll the Spotify Web API for updates every 30 seconds (just like the HA Spotify does). When the player is turned off it does not poll.
Correct. SpotifyPlus will poll the Spotify Web API every 30 seconds for changes, so it can take anywhere from 1 to 30 seconds for it to recognize changes made by an external Spotify Connect client.
SpotifyPlus updates immediately when the player is controlled from HA of course.
Pooling Spotify API while OFF would not make sense to detect playback initiated from another device too?
I will try to automate as well to turn on entity media_player.spotifyplus at each HA start and see the behave with other media_player entities.
I’ve been doing this, my issue is the player never goes to idle after something was played, at least on an Alexa.
It stays on “Paused” but after some time if you press play it wont play, you have to load a new “session” by triggering music via alexa or spotify.
The official integration, when this happens, it goes to Idle
Other than that, seems to be working fine
FYI - just released a new version of the SpotifyPlus integration
Be sure to check out the SpotifyPlus Card Dashboard as well.
[ 1.0.68 ] - 2024/12/06
- Updated service
player_transfer_playback
to resume play ifplay=True
andforce_activate_device=True
. If forcefully activating a device, then we need to resume play manually ifplay=True
was specified; this is due to the device losing its current status since it was being forcefully activated (e.g. disconnected and reconnected). - Updated underlying
spotifywebapiPython
package requirement to version 1.0.123.
@z3p337
I just pushed out SpotifyPlus v1.0.68 release. Can you give the new release a try with the Denon HEOS error that you reported?
I added some logic in the underlying spotifywebapiPython package GetSpotifyConnectDevice
method that first checks to see if the specified device is already in the device list. If found, then it will not disconnect / reconnect the device. Prior to this, it would always disconnect / reconnect the device. My thought there is that if the device is already in the list, then it should be connected and ready for immediate use.
Please let me know.
UPDATE - 2024/12/09 - The guy that ran the traces for me reports that the v1.0.68 changes fixed his Connection refused
issues for the Denon AVR that he has.
@NathanCu
I just pushed out SpotifyPlus v1.0.68 release. Can you give the new release a try with the Denon AVR / HEOS errors that we have been corresponding on?
I added some logic in the underlying spotifywebapiPython package GetSpotifyConnectDevice
method that first checks to see if the specified device is already in the device list. If found, then it will not disconnect / reconnect the device. Prior to this, it would always disconnect / reconnect the device. My thought there is that if the device is already in the list, then it should be connected and ready for immediate use.
Please let me know, and thanks for your help.
BTW, another guy supplied some traces for me (for Denon AVR anyway), so I no longer need the traces we talked about.
UPDATE - 2024/12/09 - The guy that ran the traces for me reports that the v1.0.68 changes fixed his Connection refused
issues for the Denon AVR that he has.
Hi, great job for this integration:) i just discovered this… but i have question: after recent API changes there is no more option to fetch than 10 fabourite Playlist? i noticed thato on official spotify integration alsonthere is only 10 fetched…
@mackbeth
Can you be more specific as to the specific SpotifyPlus service that you are calling which only returns 10 items?
- get_playlist_favorites
- get_playlists_for_user
The recent API changes did not limit (AFAIK) the number of playlists that can be returned for the above services. You might also check the limit
and limit_total
values on your service call to ensure you are not limiting the results to 10 items.
I have 12 playlists that I have as favorites, and it returned all 12 of them (using SpotifyPlus Card, which uses SpotifyPlus get_playlist_favorites
service):
Hi,
Just strat play with this integration, I;m not even sure, If I follow all steps and integration is installed properly to be honest, jsust fast during work day installation to check what it is
I just set up basic card:
Onestly I didin;t read whole instruction and in integration configuration probably I di not put proper things…
I manage just to play/ pause my current spotify song… Hmm…
I noticed in log:
Maybe I delete whole integration and try again setup step by step. Ouath I had previous as I used Spotcast
Also I noticed, that from your card, I;m able only to play pause. But in spotify Plus service, I;m able to browse media, play playlist (stil only 10 is fetched from my loong list of favourite…
and las onow I read whole manual:
Ok, so now I have to independent application, spotify and spotify plus now have different application credential. I setup integration. It uses proper application credential. I create basic card.
And card also not work at all. Even if it fetch as you see above 10 my favorite playlist, clicking on them does nothing… Only play/ pause works as expected…
Ah… and connected devices in my case are: My mobile phone when I just play something (it is visible) Android Tv, Web Browser when I log into Spotify Web app…
None of them work… I suspect, that there is something with authorisation still…
Even If I link app with integration, I have proper redirect urls (i put many in app just in case)
What I surprise for me… card not work at all, nothing… I use HA 2024.12 Core version, I have Spotcast integration, I have Spotify native Integration…
My plan I premium Duo,
Btw… thanks for fast repsonse. I’m IT Test engineer, so you may add a little more details how it works ,I should understand or how to debug better.
I play with service, and when I tried get playlists:
I played with this… Call return proper number of my fav playlist (52) but uiin response I got json only for 10, exactly the same as displayed in card.
BTW… official Spotify integration, when I browse media returns exactly same result - only 10 playlist…
@mackbeth
Your SpotifyPlus configuration options look correct; the fact that you are returning 10 playlist favorites results tells me the authentication and callback id is setup correctly.
The Failed to perform action spotifyplus_get_featured_playlists. SAM1010E ...
error is expected, due to Spotify Developer team deprecating that feature. For more information on that, check out the SpotifyPlus Card Troubleshooting Guide wiki page; there were a few functions that Spotify Developers suddenly (and without warning) removed from their Spotify Web API.
If you want to get YOUR favorite playlists, then use the SpotifyPlus Get Favorite Playlists service. It appears (based on your screen capture) that you are not specifying a Limit Total
argument, which causes the service to use a default value of 10. Try this (adjust the entity_id
if necessary):
service: spotifyplus.get_playlist_favorites
data:
entity_id: media_player.spotifyplus_mackbeth1
limit_total: 100
Also, you should only need the https://my.home-assistant.io/redirect/oauth
entry in the Spotify Developer App Redirect URIs settings, but it will work the way you have it. You will get better performance if you just have the one https://my.home-assistant.io/redirect/oauth
redirect URI.
Try the above YAML, and let me know if that works or not.
Hmm…
Checked… and
Still only 10 results in returned json.
To be honest, functionality which I search in HA for Spotify is to card with my favorite playlist, browse Spotify playlist, and play Spotify with selected playlist from automation
You card gives all Spotify functionalities, evens search songs, play any song from any plalist… so it is what I was searching in last 2 years
Hi!
How can i remove the numbers and percentes from the volume slider? I need only the sider.
thx
What I noticed… on PC I tested card on Chrome and Brave and edge browser… nothing happened after click on card… but on mobile phone, also Chrome or Edge it works…
@Grandmasterseven
There is currently no way to do that. Please submit a feature request on the GitHub page and I should be able to add the ability though.
This will be implemented in the next release …
Added playerVolumeControlsHideLevels
config option to the player volume controls editor. This will hide volume level numbers and percentages in the volume controls area of the Player section form. Volume slider control is not affected by this setting.
@mackbeth
To confirm, the SpotifyPlus get_playlist_favorites service returns more than 10 results when it is called on your mobile phone browser?
But the service only returns 10 entries when called on your desktop browser?
If that is the case, then it sounds like the problem might be a browser caching issue. Try clearing your cache on the desktop browser.
@thlucas Nope
I tried same service call from my mobile:)
Is anything in logs, what I can check? I enabled debug…
5mins later…
Cleared cache on all browsers, and same result:
So to summary:
- call service on desktop browser (Chrome, Brave Edge) - 52 items, but in yaml only 10 entry
-
- call service on mobile browser (Chrome, Brave Edge) - 52 items, but in yaml only 10 entry
- call service on HA app - 52 items, but in yaml only 10 entry
SpotifyPlus Card on desktop browser doesnt react to anything almost excpet play, pause. When I click on any album, nothing happen
Spotify Cards on mobile browser react - able to play any playlist (1 of those 10 in my favourite, etc.)
For favorite albums card display correct number of them, also service returns correct data:
For track - only 50 items
Can it be problem with parsing paginated results?
I set limit per page to 10… and only 10 results…
As you see, the next field contains “null” - so look like next page with result is not created…
@mackbeth
What do you get when you execute the Spotify Web API Get Current Users Playlists endpoint? Go to the link above, enter limit 50
and 0
offset, and click Try It
. What do you see for the "total":
value in the response?
In my example below, I have 17 playlists in my favorites: