GithubHelp home page GithubHelp logo

thorpelawrence / alexa-spotify-connect Goto Github PK

View Code? Open in Web Editor NEW
97.0 14.0 53.0 1.22 MB

Control Spotify Connect devices with Alexa

License: MIT License

JavaScript 99.96% Procfile 0.04%
amazon alexa echo spotify connect node nodejs js

alexa-spotify-connect's Introduction

alexa-spotify-connect (Connect Control for Spotify)

Greenkeeper badge

Build Status Maintainability Test Coverage Coverage Status

Control Spotify Connect devices with Alexa

Alexa Skill Store

UK: https://www.amazon.co.uk/Lawrence-Thorpe-Connect-Control-Spotify/dp/B074KFNWFD
US: https://www.amazon.com/Lawrence-Thorpe-Connect-Control-Spotify/dp/B074KFNWFD

Contribution and development

To get started, fork this repository to make changes. If those changes would be useful in the project, feel free to make a pull request.

Deploy the skill

  1. Create a Spotify developer app at developer.spotify.com, get a client ID and client secret
  2. Create an Amazon Alexa skill, choosing custom. When you get to the part in the Alexa developer console where you can upload/paste in JSON, run skill/skill.js to generate the JSON required
$ node skill/skill.js
  1. Enter the application ID from the developer console into package.json, under the key alexa.applicationId.
  2. Turn on Account linking, choosing "Auth Code Grant". Set "Authorization URI" to https://accounts.spotify.com/authorize, "Access Token URI" to https://accounts.spotify.com/api/token, set client ID and secret, add scopes user-read-playback-state and user-modify-playback-state, and the three redirect URLs from the account linking details in your developer console for the skill
  3. Deploy this webapp to somewhere that supports HTTPS (required for Alexa skills), for example Render
  4. Configure the skill to use an HTTPS endpoint of https://<your-url>/<app-name> where app-name is the name specified in alexa.app('app-name'), connect by default

Adding a language

  1. Check that the locale is supported by Amazon (see list of supported locale codes) and get your locale code (e.g. en-GB)
  2. Create a locale file in locales/{LOCALE-CODE}.json (see existing locales for formatting), please do not change the placeholder value names (in double curly brackets e.g. {{name}})
  3. Create a localised interaction model used by Skill Builder in skill/locales/{LOCALE-CODE}.json (please only change the values for the samples for each intent and not the intent names or slots). The formatting should be similar to the other locales, but if more (or fewer) samples are required for the language add as many as possible (more samples mean better accuracy) (formatting done by alexa-utterances)
  4. Add the locale to the list of locales in skill/skill-i18n.js (follow the format used by other locales)
  5. Please also provide publishing information as a comment in your pull request so that it can be localised and published to Amazon in the new language
  6. (Optional: for deployment) To create the JSON data required by Skill Builder run
$ node skill/skill-i18n.js

Deploy to Render

License

MIT

Disclaimer

This product is not endorsed, certified or otherwise approved in any way by Spotify. Spotify is the registered trade mark of the Spotify Group.

alexa-spotify-connect's People

Contributors

dependabot[bot] avatar diegom4riano avatar greenkeeper[bot] avatar greenkeeperio-bot avatar infopz avatar john-d-oh avatar mediocaballero avatar mrchazaaa avatar nat80 avatar nicoweio avatar rafaferreirasantos avatar thorpelawrence avatar visadb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alexa-spotify-connect's Issues

An in-range update of i18n is breaking the build 🚨

The dependency i18n was updated from 0.8.3 to 0.8.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

i18n is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/i18n-0.8.4 at 85.915% (Details).

Release Notes for 0.8.4 - General Maintenance

Added

  • Support for empty strings in translation files (#261)
  • Greenkeeper integration (#414)
  • Tidelift integration Learn more.
  • Travis OS X build

Fixed

Removed

  • AppVeyor integration (will be replaced by Travis Windows Builds)
Commits

The new version differs by 43 commits.

  • e0dbcc4 Merge branch 'release/0.8.4' into npm
  • 7f4c5da version bumb & docs
  • 94db9e7 Merge pull request #261 from emmerich/master
  • 0e7b67a feat(messageformat): backward compat parsing
  • 1f6f10e test: re-enabled messageformat tests
  • 599cfbd chore(dotfiles): better local dev setup
  • 1f732ef Create SECURITY.md
  • e8dcd30 Create FUNDING.yml
  • 22fb910 audit fix
  • 9dcea0d greenkeeper badge to top
  • 00c8e17 Merge pull request #414 from mashpie/greenkeeper/initial
  • a238551 skip windows CI for now
  • 8a037d4 travis +osx +windows
  • 8133cf1 chore: adapt code to updated dependencies
  • 3d498a4 chore(package): update lockfile package-lock.json

There are 43 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Rename connect control

Is connect control a standard value which you can't change? Otherwise it would be handy to call it spotify connect. So Alexa, ask spotify connect ....

And would it also possible to ask connect control to play song X?

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 11.3.2 to 11.3.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/nock-11.3.3 at 84.859% (Details).

Release Notes for v11.3.3

11.3.3 (2019-09-05)

Bug Fixes

Commits

The new version differs by 256 commits ahead by 256, behind by 251.

  • a700fa2 fix(types): DataMatcher to allow valid JSON scalars. (#1703)
  • 9d5cda0 docs(README): adapt badges for @latest release
  • cfc129c chore(deps): bump eslint-utils from 1.4.0 to 1.4.2 (#1698)
  • 21733b4 refactor: Remove the last of the real hostnames (#1691)
  • f00f0f3 test: Replace test_s3 with test of Expect: 100-continue (#1690)
  • b83e720 fix(types): use export = and declares (#1695)
  • 66799f3 refactor: Refactor net connect tests (#1688)
  • dafa35b docs: Add "Common issues" section documenting got automatic retrying (#1687)
  • 11a9517 style: Minor style improvements (#1693)
  • 50c821b test: Add todo test for conflict between hostnames (#1109)
  • a334e92 fix: add extension to main field in package.json (#1683)
  • c0372a2 refactor: replace some lodash usage with native (#1685)
  • 8bc6ea8 Update eslint-config-standard to the latest version πŸš€ (#1681)
  • da840fe feat: afterRecord support for custom formatting after recording. (#1682)
  • 41be884 feat(socket): propagate errors from destroy method (#1675)

There are 250 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of p-event is breaking the build 🚨

The devDependency p-event was updated from 2.2.0 to 2.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

p-event is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v2.3.0
  • Add limit option to pEvent.iterator() (#16) 8b49e21
  • Make pEvent.iterator() implement return() correctly (#20) 68d745a
  • Add support for multiple event names (#19) db3203f

v2.2.0...v2.3.0

Commits

The new version differs by 5 commits.

  • 0a8c9cb 2.3.0
  • e4badc5 Meta tweaks
  • 8b49e21 Add limit option to pEvent.iterator() (#16)
  • 68d745a Make .iterator() implement return() correctly (#20)
  • db3203f Add support for multiple event names (#19)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

More precise volume control

My sound system is so powerful that the usable volume range is 1-15%, so currently I can set three volume levels:
0 = 0%: mute
1 = 10%: quite loud
2 = 20%: waaaaay too loud

So basically I would like to revert the part of #5 that changes the volume range from 0-99 to 0-10.

Dev setup instructions - applicationId

The following should be added to the developer setup instructions:

  • deploy a fork so that you can make changes
  • how to get your applicationId (I did it by logging but I guess it can be found somewhere in the Alexa skill config)
  • edit package.json to include your applicationId
  • deploy

Volume "louder / turn volume up / down"

Hi everyone,

Would it be possible to integrate a volume up / down command, instead of just having to set it to a fixed value? Normally when I'm listening to music I've got no idea to what level it is currently set, and I just want to turn it up or down. I dug around the Spotify api a little, and it seems like the "GET https://api.spotify.com/v1/me/player" can output the current set volume. Therefore it would be just to read it, and then add / subtract e.g. 15 to / from it.

Normally I would just have created a pull request - but I've never developed an Alexa skill nor anything in nodejs.. Therefore if someone here would be willing to put that effort in I would highly appreciate it! For sure I'm happy to help digging around and try to solve issues.

Cheers,
Flacedoo

An in-range update of coveralls is breaking the build 🚨

The devDependency coveralls was updated from 3.0.7 to 3.0.8.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/coveralls-3.0.8 at 85.915% (Details).

Commits

The new version differs by 24 commits.

There are 24 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Spotify Free +Alexa

Make it possible to listen to Spotify Free with Alexa on Denon receivers! PLEASE!

Mexican Alexa store

Hi,
I want to try this skill but I can't find it in the mexican amazon store. Is it still available?

Device list

hi, when i say "Alexa, ask Connect control to play on device 1", Alexa answers me by telling me the list of devices. I laugh again dipositive 1 and finally reproduces. How come?
thanks

Cannot find device coming form Spotty Spotify for Squeezebox

The device is visible and can be accessed in the spotify apps but connect control seems not to see it. I have added the echo as a device and this was immediately added to the list of available devices in connect control so it seems to work in general. Any ideas?

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 10.0.1 to 10.0.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/nock-10.0.2 at 93.776% (Details).

Release Notes for v10.0.2

10.0.2 (2018-11-03)

Bug Fixes

Commits

The new version differs by 18 commits.

  • 598245c Merge pull request #1250 from vwxyutarooo/master
  • 8453191 test: add case of nockBack with filteringRequestBody opiton
  • 1b4b9c6 test: add case of nockBack with filteringPath option
  • 6d5bca2 fix(#1041): apply filteringPath from nockBack before option
  • 048c07d Merge pull request #1247 from j0k3r/patch-1
  • 5b69d06 docs: Fix anchor in README
  • 35936eb Merge pull request #1246 from chrisulanowicz/master
  • e63de1a docs: fixed typos
  • 7f41138 Merge pull request #1220 from nock/feat/github-apps-note
  • 33da255 Merge pull request #1163 from nock/feat/add-contributors
  • 1a845a5 docs: Update list and instructions
  • c1f608a docs: Add note about GitHub Apps
  • 2c9f427 docs: Add description to Contributors file
  • f907c3f docs: rename CONTRIBUTORS.md, add section to CONTRIBUTING
  • 0885b5f docs: remove contribs file

There are 18 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Support more utterances for switching devices

The first two phrases that came to my mind when trying to use this skill:

"Ask connect control to switch to my Echo dot"
"Ask connect control to use my Echo dot"

Neither of these accomplished what I intended, instead they made Alexa tell me the name of the current song. I believe these phrasings should be supported for DeviceTransferIntent

Some other phrasings that people may use:
"Ask connect control to swap to my Echo dot"
"Ask connect control to move to my Echo dot"

Cache devices

I added the Skill recently and it works pretty well!

As of now it seems you do: "Alexa ask Connect Control to list devices" "Alexa ask Connect Control to transfer to Device 1" ... if soon after I say "Alexa ask Connect Control to pause", it works! Also, if I try to transfer to another device, it works.

However, after a while (I'm not sure the cut off), no commands work until I again ask to "list devices" ... even though the device numbers remained the same. So if I say "Alexa ask Connect Control to transfer to Device 1" it will say it does not know any device named Device 1 until I first ask it to list devices.

Is there a way to make it hold onto the previous configuration? My device numbers seem to be static, I'd love to just keep them that way and not have to ask to list devices.

Volume control

Hi there! thanks so much for writing this wonderful skill! I was so happy to find it. I wasn't using the Alexa cause it was so useless without being able to control my home speakers.
I tried my hand at adding a volume setting skill - I'm sure it needs some refining, but should work. Hope this is helpful for you and other users.

Doesn't work on Fire 8 tablet with multiple devices

I have a Sony RX amp with Spotify Connect enabled, and via the Spotify app it connects fine. However, having enabled the skill (and clicking on the link etc) then Alexa ask connect control to list devices works fine but transfer to device 2 does not affect the tablet - it keeps playing locally on the tablet.

cannot make this work

Hello, I tried different commands, but none seems to work.
Upon "Alexa ask Connect Control to list devices"
I get something like "I don't see anything to connect. Go to your Alexa app".

Add device names

Instead of using numbers for devices, being able to assign devices names would make it easier to remember which is which

I have linked my Spotify account but the skill doesn't recognize it

Hi, after I have deployed the webapp, I try to use it on my Echo device and it keeps telling me that I have not linked my Spotify account but I have. What could be the problem? I tried to unlink and link my Spotify account twice but nothing seems to change. In my Spotify account I can see Amazon Alexa as an approved application. I can use Spotify without using this skill so I guess it is well-connected?

Btw, I have another doubt: when I deploy this app to heroku using github, it gives me build error because I have two lock files (yarn.lock and package-lock.json and yarn.lock... As far as I understand yarn.lock is just used to run the test so if I delete it, should I have any problem?

Thank you in advance!!

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 10.0.2 to 10.0.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v10.0.3

10.0.3 (2018-12-03)

Bug Fixes

Commits

The new version differs by 4 commits.

  • 5ae978b docs: show usage of beforeFunc in nockback (#1263)
  • 88fbdc2 fix: filtering by regex (#1089)
  • 6cd119b chore(package): update superagent to version 4.0.0
  • 4194106 docs(README): recorder.reset -> recorder.clear (#1248)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

The devDependency coveralls was updated from 3.0.5 to 3.0.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/coveralls-3.0.6 at 87.324% (Details).

Commits

The new version differs by 3 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

The devDependency coveralls was updated from 3.0.3 to 3.0.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

coveralls is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/coveralls-3.0.4 at 85.915% (Details).

Commits

The new version differs by 5 commits.

  • 8ac4325 version bump
  • 9d9c227 Bump extend from 3.0.1 to 3.0.2 (#226)
  • 33119a7 Bump js-yaml from 3.11.0 to 3.13.1 (#225)
  • f5549c7 Bump handlebars from 4.1.0 to 4.1.2 (#224)
  • 4df732b Style fix (#211)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Spotify Log In Problems

Hello Thorpelawrence,

I wanted to try this Alexa skill, downloaded it connected my spotify and now my Password has been changed?

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 11.3.4 to 11.3.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).
  • βœ… coverage/coveralls: First build on greenkeeper/nock-11.3.5 at 87.324% (Details).

Release Notes for v11.3.5

11.3.5 (2019-09-20)

Bug Fixes

Commits

The new version differs by 7 commits.

  • 59b345c fix(types): data matcher for body and query. (#1725)
  • 6b88dff Add TypeScript version to bug template (#1709)
  • ed47e59 refactor: Inline setHeader() function (#1722)
  • e35b370 refactor: Rename request_overrider -> intercepted_request_router (#1716)
  • f6e319d refactor: Avoid unnecessary call to setRequestHeaders after matching (#1719)
  • 96a6862 refactor: Remove unnecessary getHeader() function (#1717)
  • 7dca510 refactor: Split playbackInterceptor into its own module (#1712)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add support for Spanish (Spain)

This looks great! I'm very interested in using this in my spanish account. :-)

If I provide a pull request with the internationalization files (as per the readme instructions), would you update it and add it to the spanish market, please?

Chromecast support

Chromecast works with Spotify but I suspect uses their own API rather than Spotify Connect.

Would it be possible to add Spotify Chromecast support to this integration?

Happy to work on this myself if you have any pointers.

Can't connect to my LG TV

My LG TV shows in Spotify and works fine, but I can't connect to it using this skill. It may be because it has a stupid (and non changeable) name: [LG] WebOS TV OLED55PLA.

I've tried making a routine with that exact name but no dice.

Thanks very much for the excellent work on this app.

Best wishes.
Jon

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.