Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use this Skill to control Raspotify #151

Open
nilskretschmer opened this issue Sep 10, 2020 · 5 comments
Open

Use this Skill to control Raspotify #151

nilskretschmer opened this issue Sep 10, 2020 · 5 comments

Comments

@nilskretschmer
Copy link

Hey there,

is it possible under the current circumstances to bypass the API Token problem by controlling raspotify directly? So using Voice commands to send them to raspotify which then skips songs etc.?
Raspotify has it's own config which provides an option for username and password and it should be available as a device for the skill then right?
Greetings and thank you for your work!

@forslund
Copy link
Owner

I don't think raspotify has any direct controls (I could be wrong) and requires to use the Spotify Connect api to start playback etc. So to access the device created by raspotify, access to the API is needed. At least as far as I know.

@nilskretschmer
Copy link
Author

nilskretschmer commented Sep 11, 2020

You seem to be right. Sorry I just read through raspotify and saw that it's just a librespot wrapper and has no API on its own. But I found something interesting - even when it's over 2 years old: Thread

So as far as I understand this is not possible in case of raspotify (and not possible using mycroft), because:

  1. Raspotify acts just as a Spotify Connect Client
  2. The mobile app on your phone is some kind of streaming server
  3. All authenticating is handled by the mobile app - not librespot or raspotify itself
  4. API Access is done by the app

So to get this working again we need to get the authentication working again in your skill so it can access spotify's web API and playback audio by itself right? If I can help you along with modifying the skill to pass in everyone's own token let me know.

@forslund
Copy link
Owner

forslund commented Sep 12, 2020

Thanks. I think I'm about halfway done creating a replacement auth class that uses creds from a json (basically extending spotipy's own auth class).

Gonna try to get something pushed this weekend that can be used with some manual intervention...and that will probably need testing and comments and stuff. And if you want to hack on a solution yourself feel free. I have quite limited time these days so my expected delivery may not be 100 % correct :/

@forslund
Copy link
Owner

I've pushed the branch feature/local-api-key which seem to work Ok with a cached spotipy oauth. Next step is to create a small wrapper and a script to setup the cached spotpy-oauth token along with instructions...

@joshuajaharwood
Copy link

I've pushed the branch feature/local-api-key which seem to work Ok with a cached spotipy oauth. Next step is to create a small wrapper and a script to setup the cached spotpy-oauth token along with instructions...

If someone could tell me briefly how to manually generate and store an oauth credential for the skill, I'd be more than happy to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants