Hi @Greg_Shepperd , welcome to the community. See below for my comments to your questions, and feel free to let me know if this helps or additional details are needed.
Does this happen every time or do you know a specific pattern how to reproduce it? Can you test out the following things to help me troubleshoot?
when this issue occurs, if you click on the “available devices” and select another device, then try to change the track again, does this error go away? I am wondering if there is an edge case that the “active” device" from Spotify and this custom tile is out of sync. ex: the device “ABC” is playing now and considered as the “active device”, but this demo Spotify is sending track control command against to another device “EFG”, and received 403 Forbidden error. Some Spotify Player API returns 403 when missing premium plan, so this can be confusing in terms of the cause.
If the previous step doesn’t help, can you refresh the page, then select a device, then try the track control again?
Do you mean 2 out of 20 devices are not showing up? What type of the devices are they? Did they never show up?
The access_token in’t required to be input by the user because the code will get it automatically using the refersh_token and stores in userSettings.token.
Hi @Valantis_Levas , welcome to the community. For this specific Spotify demo tile, you won’t be able to do much without Spotify premium account. According to the Spotify APIs, pulling the available devices and playlists doesn’t require Spotify premium, but every other control in this demo tile requires the Spotify premium, such play/pause, skip, prev, and shuffle.
Everything worked well for me from the first try. However, does the tile provide the possibility to select a particular song (drop down menu with songs) under a playlist? As I am able to select only playlist at a time and change the songs with the forward/back controls.
Is this feature not working for me or it is not included in the demo? Thanks!
@Empire_Home Glad to hear that you liked this demo tile. No, the song list is not currently included in this demo. I can take a look when I have a chance. May be play the playlist and show the song list when a playlist is selected, and allow user to go back to the playlist menu by tapping a back button somewhere?
Hello James - that would be a great feature indeed! If the selection a particular song in a playlist is not feasible, having the visibility of the underlying song playlist would be super helpful!
You could probably modify the code to hide that part. I think you would still need some way to select which device to play on (which shares that same list space), but that could probably be done in a pop-up using stio.showList().
If you or another community developer want to give a try, please share your results!
Lots of discussion but can’t really understand the basics of Spotify tile. Someone could clarify for me couple of things.
Being able to search streaming devices from tile, spoitfy application has to be installed to that laptop/tablet?
User has to be logged to that account which “refresh token” was used?
Tile doesn’t update any other streaming devices than device itself…or max one streaming device if it used at the moment in Spotify application?
So I’m not able to get anything else to device list than my laptop and if I manually stream music to one of the google homes in my spotify app, then custom Spotify tile can see that particular streaming devicde.
It’s all done through Spotify’s API, so you don’t need anything installed on the device that’s displaying the dashboard. That being said, the API is pretty limited with what is considers an ‘active’ device that’s available in the API.
I’m not sure exactly what you mean by this, but yes, it’s all based on what the authenticated user has access to. So you’ll want to make sure to use the same Spotify account on your devices as well as when authenticating this Custom Tile.
The tile can control a single ‘device’ at a time, but you can switch which device you are controlling and control other devices. I find the Spotify API a bit odd though – if you open up the Spotify app, it finds all the different devices on your network including Google Cast devices, etc… but the API seems to be more limited. In my experience, most of my devices that show up as ‘Spotify Connect’ in the Spotify app, like my Onkyo AV Receiver, are always available as targets, but the various Google devices in my house don’t show up through the API.
Well then I got an issue with it. I followed “easy” instructions and can’t get device list in tile if Spotify app isn’t running background. I need to have spotify app open and I have to be logged in with that same account which was used in custom tile authenticating. Otherwise tile doesn’t list any devices.
I just tested this with other pc too and it¨s behaving same way.
When I’m getting that refresh token there is an option to test device list. That does not list anything either.
I have 6 google home’s and couple of chromecasts and it only lists max 2 devices at time depending if I’m streaming with app to that particular device.
That’s just the nature of the Spotify API and is what I was linking to in the previous post:
Devices not Appearing on Device List
Connect Web API relies on local network connections to discover and interact with some devices.
For example, when:
A new device is added to the network
A device is in “sleep” mode
A device on the local network is currently tied to another user account, or
Other reasons specific to the device
As a result, some devices that appear in the Connect picker within the Spotify application may not always be visible or available on the Connect Web API Endpoints.
Their concept of “sleep” is really limiting. The only devices that I see as always available for me are things like my Onkyo AV Receiver that have the native ‘Spotify Connect’ integration. All my Google devices, my desktop, and things like PS5 only show up if they very recently played something.
Depending on what you are trying to accomplish, if your hub has a Google Cast integration, you might be able to use that as a starting point?
My plan was to create spotify tile which would allow me to choose what music to play and with what google home or chromecast device. I guess that will not happen because of all the examples listed.