Dashticz - Module - Spotify (new version!)

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: robgeerts, htilburgs

EastXIII
Posts: 19
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Dashticz - Module - Spotify (new version!)

Post by EastXIII » Saturday 13 October 2018 9:56

Lokonli wrote:Spotify in Dashticz works as a remote control via Spotify Connect. You must have Spotify running somewhere in your network. Do you have that?
Yes I do. Also tried this on several devices.

What I don’t understand is the redirect part. When I set the redirect in Spotify Dev I don’t get errors. But, say an hour, later Dashticz won’t start because of the redirect is not right??

*edit: Now I can’t even start Dashticz anymore. Stops at invalid redirect URI. I’ve tried all options for the redirect URI.

Lokonli
Posts: 111
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by Lokonli » Saturday 13 October 2018 10:22

Spotify Dev will not create any error: it just adds the redirect you specify to the list of allowed redirects.

Is spotify in Dashticz initially working, but it stops after one hour? Or doesn't it work at all?

The spotify token needs to be refreshed after one hour. This should happen automatically with a reload of dashticz. The dashticz url is redirected to Spotify to get the new token. After that Spotify redirects back to dashticz.

EastXIII
Posts: 19
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by EastXIII » Saturday 13 October 2018 10:23

It never worked. Not with any of the redirect URI’s.


Verzonden vanaf mijn iPhone met Tapatalk

Lokonli
Posts: 111
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by Lokonli » Saturday 13 October 2018 11:33

What is the URL of your dashticz? You use exactly the same as redirect? With a slash at the end?
Which browser ar you using for Dashticz?

EastXIII
Posts: 19
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by EastXIII » Saturday 13 October 2018 11:39

My dash is running on http://localhost:port/dashticz_v2/

I’ve tried all different redirct links suggested in this thread but to no avail.

I’ve checked on Chromium, Chrome, Safari, Firefox.
Maybe, just maybe, is there something in Spotify.js that does not correlate?



Verzonden vanaf mijn iPhone met Tapatalk

Lokonli
Posts: 111
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by Lokonli » Saturday 13 October 2018 12:15

Try with the real IP address:
If you use http://192.168.1.20:8080/dashticz_v2/
then add as redirect uri in spotify dev exactly the same:
http://192.168.1.20:8080/dashticz_v2/
Don't forget to press the save button at the bottom of the page.

I suppose you've checked already that your are using the correct spotify cliend ID in CONFIG.js ...

EastXIII
Posts: 19
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by EastXIII » Saturday 13 October 2018 12:23

Thanks, also tried this... Does not work either.
I’m getting headaches...

I’ve triple checked the ID, even made a new one; same issue.

I’m on the latest beta, 2.4.0 so thats not it either.
Is it possible/an option to manually set the URI in spotify.js? And copy that exact URI in the Spot Dev?

Lokonli
Posts: 111
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by Lokonli » Saturday 13 October 2018 12:37

spotify.js just uses the current location as redirect URI which is send to Spotify. I don't think you can change that, because then the refresh mechanism won't work. spotify.js checks whether it's called with a refresh token in the URL. In that case it uses the new token to the subsequent calls to Spotify.

Can you try in an incognito window in Chrome? Then the spotify login should open. Can you add an exact description of the error you are getting after that? Preferably with a screen dump.

EastXIII
Posts: 19
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by EastXIII » Saturday 13 October 2018 15:07

Done. Litarally all white with only this line: INVALID_CLIENT: Invalid redirect URI

EastXIII
Posts: 19
Joined: Monday 08 October 2018 13:56
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by EastXIII » Saturday 13 October 2018 15:52

Allright it works. I made a backup of the CONFIG, removed all of dashticz, removed all API's from Spotify and started over.
Somehow it worked right away. I must have made a mistake somewhere, just don't know where. Bit frustrating but hey, it works.
Thanks for your guidance @Lokonli, I would have given up otherwise.

Lokonli
Posts: 111
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Module - Spotify (new version!)

Post by Lokonli » Saturday 13 October 2018 23:00

Good to know you have it working. Enjoy :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests