YIO-Remote / integration.spotify

🔌 Spotify Integration for YIO
GNU General Public License v3.0
2 stars 3 forks source link

Spotify can't get token ? #15

Closed B-Hartley closed 4 years ago

B-Hartley commented 4 years ago

Spotify: 0.4.2 remote: 0.4.7

YIO-remote-software-v0.4.7-12-g5813bbaf-20200531_155953-RPi0-release YIO-integration.spotify-v0.4.2-RPi0-release YIO-integration.home-assistant-v0.4.7-10-g2da234e-20200530_101638-RPi0-release

have removed Spotify entity and integration and re-added it.

Successfully added, but in the log it says......

DEBUG api Sent response to client QWebSocket(0x17e99d8) WARN spotify "Error transferring https://accounts.spotify.com/api/token - server replied: Bad Request" WARN default QObject::startTimer: Timers cannot have negative intervals

martonborzak commented 4 years ago

Could you please describe describe the issue in a bit more detail? Please use the issue template:

Description

How to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Your Environment

Additional context

B-Hartley commented 4 years ago

How to Reproduce Steps to reproduce the behavior:

Remove spotify entity and integration. Re-install spotify integtation, supply API keys. Complete installation. Add entity add to favourites page.

restart remote from ssh. read log....

Your Environment Versions as given above. Running on YIO remote

martonborzak commented 4 years ago

Does the integration work or you just see error messages in the log?

B-Hartley commented 4 years ago

no, doesn't work

B-Hartley commented 4 years ago

actually, I take that back. it shows the track that is playing, but the pause button etc. don't work.

martonborzak commented 4 years ago

Could you tail the log and see if there's any error message when you press pause? tail -f logfile

B-Hartley commented 4 years ago

It says: WARN spotify ERROR WITH PUT REQUEST 403 "{\n \"error\" : {\n \"status\" : 403,\n \"message\" : \"Restricted device\"\n }\n}"

Is that something in the API settings that I should have set ?

martonborzak commented 4 years ago

Looks like you didn't give permission to control devices or your account is restricted for some reason. Do you have a premium account? These features only work with that.

B-Hartley commented 4 years ago

Yes, premium. Let me make sure I used the right spotify account and that i don't have 2 or something

B-Hartley commented 4 years ago

it's a premium famliy account

martonborzak commented 4 years ago

That should work. When setting up the your API keys, did you allow control of your devices?

martonborzak commented 4 years ago

After reading on this Restricted device thing, I found that there could be some devices that show up and display info, but they are restricted and cannot be controlled. Seems like you have a device like that. However, I should add this to the integration, that it filters out these restricted devices.

B-Hartley commented 4 years ago

I never seemed to have any questions about what I was allowing with the API, where are those options ? I'm playing Spotify on a SONOS btw. and I can control it with other things, so I would expect to be able to control it ?

martonborzak commented 4 years ago

I don't have Sonos speakers, but I've removed and re-added the integration and it works fine here. I'd suggest to remove the integration. Go to your Spotify Developer Dashboard. Reset the client secret. Then reboot the remote just to be sure. Add the integration again.

martonborzak commented 4 years ago

I don't know how but managed to reproduce the issue :) I'm on it!

martonborzak commented 4 years ago

Go to your spotify account page, choose Apps in the left sidebar remove access to the YIO app then update remote software to v0.4.8 spotify integration to v0.4.3 and webconfig to v0.1.9 after this you should be able to add it and it should work