Giter Club home page Giter Club logo

Comments (16)

htilly avatar htilly commented on September 16, 2024 2

Spotify recently changed so that you need a API key to do search etc.
To get the keys, log in to Spotify and go to:
https://developer.spotify.com/my-applications/#!/applications
Create an app and get the two values:
Client ID and Client Secret.

When you have received these values, encode them with Base64.
Head over to https://www.base64encode.org and decode to base64.

You should paste something like:
dfh543455dfgr44455dfgbgd4544fff:r55666655444333fbg332de34f444f4r
(note the : between ClientID and Client Secret)

You should now have received something like:
GhgyGKHJK45HJKHSDdvkjhKJHkjhdfkjKJHkjh334kjhKJhkjdh777JKJHCXKJCJKkj234kjkjhKJHkjhdcvdcj=

Put this value in the config.json as "apiKey":
"apiKey": ""

BR
Tilly

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024 1

Figured it out. Works now! Thanks :-D

from zenmusic.

htilly avatar htilly commented on September 16, 2024

Hmm.. I assume the sonos is configured correctly with Spotify and works standalone?

What version of node are you running?
No firewalls blocking the communication ?
What platform are you running it on? OSX?
BR
Tilly

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

Thanks for getting back to me.

I'm using a Raspberry Pi.

pi@raspberrypi:/opt/zenmusic $ node --version
v7.10.0
pi@raspberrypi:/opt/zenmusic $ npm --version
4.6.1

No firewalls and the Sonos itself works just fine.

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

To be honest, I also tried this on my mac and had the same exact problem.

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

@htilly just pinging you to see if you saw my response.

thanks

ajp

from zenmusic.

htilly avatar htilly commented on September 16, 2024

Hi! Did see the response.
Do you still have the same problem after the implementation of Spotify key?
(see README for more info).

However, I don´t think that is the problem since it´s RTMClient that seems to have problems. And that is the function of actually communication with Slack :/

BR
Tilly

from zenmusic.

htilly avatar htilly commented on September 16, 2024

Have you checked firewalls etc?
Tried from another network ?

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

Checking. Not sure what you mean by spotify key.

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

So where does the spotify key actually go?

from zenmusic.

anthonyangel avatar anthonyangel commented on September 16, 2024

@apanzerj what was the fix for this? I'm having the same issues, running node 9.0.0 and npm 5.5.1 on a rpi1 (in docker)

I've validated that the Spotify API key is good, I can use it to manually generate a token and query the API

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

I also had issues with the IP of the sonos speakers changing too

from zenmusic.

apanzerj avatar apanzerj commented on September 16, 2024

but that's all I remember. I no longer work at a company with Sonos Speakers ¯\(ツ)

from zenmusic.

htilly avatar htilly commented on September 16, 2024

Quick question @anthonyangel
Are you using a US or Non US spotify account?

from zenmusic.

anthonyangel avatar anthonyangel commented on September 16, 2024

I'm in the UK, I've set market=GB in config

from zenmusic.

htilly avatar htilly commented on September 16, 2024

Ok, just to make sure, have you changed the following lines in index.js ?

// Old version.. New is supposed to fix 500 problem...
// sonos.addSpotifyQueue(spid, function (err, res) {

                        sonos.addSpotify(spid, function (err, res) {

If Non US, try the OLD version..
So your code should be:

// Old version.. New is supposed to fix 500 problem...
sonos.addSpotifyQueue(spid, function (err, res) {

                        // sonos.addSpotify(spid, function (err, res) {

Note that you need to change this in multiple places in the index.js
I know.. should really fix the code so it autodetect what region...

BR
Tilly

from zenmusic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.