Comments (11)
Hi, what platform are you on? I assume you chose to save the credentials, I wonder if Mycroft is run on a different user than the one setting up the auth?
from spotify-skill.
Running a Mycroft Mark 1 with 21.2.0 software
from spotify-skill.
I saved the credentials in the skill settings, although there was no "connect" button in the skill settings to click (which the directions said to click). Also ran the auth script with all the dev account API stuff
from spotify-skill.
Also changed the user in the systemd service here:
"
[Unit]
Description=Raspotify
After=network.target
[Service]
User=pi
Group=pi
Restart=always
RestartSec=10
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -m 0755 -p /var/cache/raspotify ; /bin/chown raspotify:raspotify /var/cache/raspotify
Environment="DEVICE_NAME=raspotify (%H)"
Environment="BITRATE=160"
Environment="CACHE_ARGS=--disable-audio-cache"
Environment="VOLUME_ARGS=--enable-volume-normalisation --volume-ctrl linear --initial-volume 100"
Environment="BACKEND_ARGS=--backend alsa"
Environment="DEVICE_TYPE=speaker"
EnvironmentFile=-/etc/default/raspotify
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} --device-type ${DEVICE_TYPE}
[Install]
WantedBy=multi-user.target
"
from spotify-skill.
Also activated the mycroft-core venv before running auth.py with this:
source /opt/venvs/mycroft-core/bin/activate
from spotify-skill.
On the Mark-1 Mycroft is run by a service user called mycroft. So it might be that you do this from the pi user and the config is saved in the incorrect user's config folder. I think you should do the following (if you haven't already):
sudo su mycroft
source /opt/venvs/mycroft-core/bin/activate
python /opt/mycroft/skills/mycroft-spotify.forslund/auth.py
Then to be certain, restart Mycroft
from spotify-skill.
In the latest readme / settings page the "click connect" instructions has been removed (as far as I know). Where did you read those instructions?
from spotify-skill.
OK! running auth from the mycroft user surely fixed it!
I've looked through the code on some of your skills, and thought about making some modifications and pushing them. Is there any specific reason you are doing this authentication from a python script, rather than having the user store these credentials in the skill's settings? I thought about rewriting your skill to make it easier for non-programmers, and perhaps pushing a merge request (if you find the code to be good).
from spotify-skill.
This is a bit of a stop-gap solution. The oauth system was integrated with the Mycroft cloud in a "fairly" secure manner but Spotify shut down my client id for violation of their terms (using the API for voice interactions). So I knocked out this script so the the skill could still be used...
Possibly a hybrid solution could be done. You enter the credentials one time on the cloud when they're synced they can be removed from there.
I'm happy to accept a PR if you come up with a good solution.
from spotify-skill.
On the Mark-1 Mycroft is run by a service user called mycroft. So it might be that you do this from the pi user and the config is saved in the incorrect user's config folder. I think you should do the following (if you haven't already):
sudo su mycroft source /opt/venvs/mycroft-core/bin/activate python /opt/mycroft/skills/mycroft-spotify.forslund/auth.py
Then to be certain, restart Mycroft
Thank you for this - I had been trying for a long time to get the auth process to work - it was these 3 lines I needed. I don't know how many users are using a MK1 rather than a picroft or something else, but it might be worth adding these to the readme?
from spotify-skill.
@amil109 yes, you are correct. it should be added to the readme. will handle that
from spotify-skill.
Related Issues (20)
- Missing lower() at regex functions HOT 2
- Notice of diabled API HOT 4
- -cli-client HOT 1
- Followed new credential instructions but still no matches HOT 1
- Spotify devices do not match due to case-sensitivity HOT 2
- Auth.py missing; wrong import for SpotifyOAuth HOT 39
- Docker instructions HOT 5
- clear solution explanation for authentication HOT 2
- volume level control HOT 1
- Can't obtain song meta information HOT 6
- Play a random album from an artist HOT 4
- auth.py file missing HOT 7
- No device detected though installation went well HOT 8
- Command to search for new spotify devices HOT 6
- Unable to authorize with the spotify service HOT 4
- Can't find XDG_CONFIG HOT 2
- package change in spotipy HOT 1
- Playback Control doesnt't find the Spotify Skill HOT 2
- Any plan to port this skill to OVOS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotify-skill.